Skip to content

Commit

Permalink
Move IPv6 test from schema_push to initialization tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aqrln committed Jul 24, 2023
1 parent 1bf13b1 commit e3c036a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 30 deletions.
25 changes: 25 additions & 0 deletions schema-engine/sql-migration-tests/tests/initialization/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,28 @@ fn connecting_to_a_postgres_database_with_missing_schema_creates_it(api: TestApi
assert!(schema_exists)
}
}

#[test_connector(exclude(Sqlite))]
fn ipv6_addresses_are_supported_in_connection_strings(api: TestApi) {
let url = api.connection_string().replace("localhost", "[::1]");
assert!(url.contains("[::1]"));

let provider = api.provider();

let schema = format!(
r#"
datasource db {{
provider = "{provider}"
url = "{url}"
}}
"#
);

let engine = schema_api(Some(schema.clone()), None).unwrap();
tok(
engine.ensure_connection_validity(schema_core::json_rpc::types::EnsureConnectionValidityParams {
datasource: schema_core::json_rpc::types::DatasourceParam::SchemaString(SchemaContainer { schema }),
}),
)
.unwrap();
}
29 changes: 0 additions & 29 deletions schema-engine/sql-migration-tests/tests/schema_push/issue_18079.rs

This file was deleted.

1 change: 0 additions & 1 deletion schema-engine/sql-migration-tests/tests/schema_push/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
mod issue_18079;
mod views;

use indoc::indoc;
Expand Down

0 comments on commit e3c036a

Please sign in to comment.