Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added e2e test for sqlserver. Unfortunately the test still fails due …
…to missing batch functionality (see golang-migrate/migrate#756 & golang-migrate/migrate#666). Also added 2 missing drop index statements in the golang-migrate down scripts.
- Loading branch information
1 parent
0d72d3f
commit 6abcc86
Showing
6 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
This test can be executed against multiple SQL databases. | ||
It's executed (by running `./run-test.sh`) on all supported databases (postgres, sqlite, mysql) by default. | ||
To perform the test on a specific database, run `./do-test.sh <database>` where `<database>` is one of the supported databases (postgres, sqlite, mysql). | ||
It's executed (by running `./run-test.sh`) on all supported databases (postgres, sqlite, mysql, sqlserver) by default. | ||
To perform the test on a specific database, run `./do-test.sh <database>` where `<database>` is one of the supported databases (postgres, sqlite, mysql, sqlserver). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#!/usr/bin/env bash | ||
./do-test.sh postgres | ||
./do-test.sh mysql | ||
./do-test.sh sqlite | ||
./do-test.sh sqlite | ||
./do-test.sh sqlserver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
function createDB { | ||
$1 exec db /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P 'MyStrong(!)Password' -Q "CREATE DATABASE node_a; CREATE DATABASE node_b;" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
services: | ||
nodeA-backend: | ||
environment: | ||
NUTS_STORAGE_SQL_CONNECTION: sqlserver://sa:MyStrong(!)Password@db:1433/node_a?sslmode=disable | ||
nodeB-backend: | ||
environment: | ||
NUTS_STORAGE_SQL_CONNECTION: sqlserver://sa:MyStrong(!)Password@db:1433/node_b?sslmode=disable | ||
db: | ||
image: mcr.microsoft.com/mssql/server:2022-latest | ||
restart: always | ||
ports: | ||
- "1433:1433" | ||
environment: | ||
MSSQL_SA_PASSWORD: MyStrong(!)Password | ||
ACCEPT_EULA: Y | ||
healthcheck: | ||
test: | ||
["CMD", "/opt/mssql-tools/bin/sqlcmd", "-U", "sa", "-P", "MyStrong(!)Password", "-Q", "SELECT 1"] | ||
interval: 10s | ||
timeout: 5s | ||
retries: 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
storage/sql_migrations/004_discoveryservice_client_registration.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
drop index idx_discovery_presentation_refresh | ||
drop table discovery_presentation_refresh; |