Skip to content

Commit 603c4d0

Browse files
committed
test(sqlx): add config management tests (41 assertions)
Converted from src/config/config_test.sql Implemented 7 config management tests: - add_and_remove_multiple_indexes: Test adding/removing multiple indexes - add_and_remove_indexes_from_multiple_tables: Multi-table index management - add_and_modify_index: Modify index with options and cast - add_index_with_existing_active_config: Pending config creation with active - add_column_to_nonexistent_table_fails: Error handling for invalid tables - add_and_remove_column: Column lifecycle management - configuration_constraint_validation: Schema validation constraints Key implementation details: - Created config_tables.sql fixture with users and blah tables - Helper function search_config_exists() for config state verification - Note: Empty tables {} is VALID per constraints.sql (config_check_tables only validates field existence, not emptiness) All 7 tests passing.
1 parent 53da200 commit 603c4d0

File tree

2 files changed

+531
-0
lines changed

2 files changed

+531
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
-- Fixture for config tests
2+
-- Converted from src/config/config_test.sql lines 4-19
3+
4+
DROP TABLE IF EXISTS users CASCADE;
5+
CREATE TABLE users (
6+
id bigint GENERATED ALWAYS AS IDENTITY,
7+
name eql_v2_encrypted,
8+
PRIMARY KEY(id)
9+
);
10+
11+
DROP TABLE IF EXISTS blah CASCADE;
12+
CREATE TABLE blah (
13+
id bigint GENERATED ALWAYS AS IDENTITY,
14+
vtha eql_v2_encrypted,
15+
PRIMARY KEY(id)
16+
);

0 commit comments

Comments
 (0)