WIP: Add tests for http functions
This commit is contained in:
15
migrations/007_create_function_tests.sql
Normal file
15
migrations/007_create_function_tests.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
CREATE TABLE IF NOT EXISTS http_function_tests (
|
||||
id SERIAL PRIMARY KEY,
|
||||
http_function_id INTEGER NOT NULL REFERENCES http_functions(id) ON DELETE CASCADE,
|
||||
name VARCHAR(255) NOT NULL,
|
||||
description TEXT,
|
||||
request_method VARCHAR(10) DEFAULT 'POST',
|
||||
request_headers JSONB DEFAULT '{}',
|
||||
request_body JSONB DEFAULT '{}',
|
||||
expected_status VARCHAR(50) NOT NULL DEFAULT 'SUCCESS',
|
||||
expected_output JSONB,
|
||||
created_at TIMESTAMP DEFAULT NOW(),
|
||||
updated_at TIMESTAMP DEFAULT NOW()
|
||||
);
|
||||
|
||||
CREATE INDEX idx_http_function_tests_function_id ON http_function_tests(http_function_id);
|
||||
2
migrations/008_add_test_assertions.sql
Normal file
2
migrations/008_add_test_assertions.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE http_function_tests
|
||||
ADD COLUMN IF NOT EXISTS assertions JSONB DEFAULT '[]';
|
||||
Reference in New Issue
Block a user