()
| 18 | |
| 19 | #[test] |
| 20 | fn test_schema_ddl_operations() { |
| 21 | let fixture = get_shared_fixture(); |
| 22 | |
| 23 | // Create a schema within this test's isolated schema namespace |
| 24 | let test_schema = "business_schema"; |
| 25 | |
| 26 | // Test CREATE SCHEMA |
| 27 | fixture.assert_query_succeeds(&format!("CREATE SCHEMA IF NOT EXISTS {}", test_schema)); |
| 28 | |
| 29 | // Test schema creation without IF NOT EXISTS |
| 30 | fixture.assert_query_succeeds("CREATE SCHEMA new_schema"); |
| 31 | |
| 32 | // Test duplicate schema creation should fail |
| 33 | fixture.assert_query_fails("CREATE SCHEMA new_schema", "already exists"); |
| 34 | |
| 35 | // Test IF NOT EXISTS prevents errors |
| 36 | fixture.assert_query_succeeds("CREATE SCHEMA IF NOT EXISTS new_schema"); |
| 37 | |
| 38 | // Test DROP SCHEMA |
| 39 | fixture.assert_query_succeeds("DROP SCHEMA IF EXISTS new_schema"); |
| 40 | |
| 41 | // Test dropping non-existent schema with IF EXISTS |
| 42 | fixture.assert_query_succeeds("DROP SCHEMA IF EXISTS nonexistent_schema"); |
| 43 | |
| 44 | // Test dropping non-existent schema without IF EXISTS should fail |
| 45 | fixture.assert_query_fails("DROP SCHEMA nonexistent_schema_2", "not found"); |
| 46 | } |
| 47 | |
| 48 | #[test] |
| 49 | fn test_drop_schema_basic() { |
nothing calls this directly
no test coverage detected