Skip to content

Commit

Permalink
Added e2e test for sqlserver. Unfortunately the test still fails due …
Browse files Browse the repository at this point in the history
…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
JorisHeadease committed Apr 22, 2024
1 parent 0d72d3f commit 6abcc86
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 3 deletions.
4 changes: 2 additions & 2 deletions e2e-tests/oauth-flow/rfc021/README.md
@@ -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).
3 changes: 2 additions & 1 deletion e2e-tests/oauth-flow/rfc021/run-test.sh
@@ -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
4 changes: 4 additions & 0 deletions e2e-tests/oauth-flow/rfc021/sqlserver.sh
@@ -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;"
}
21 changes: 21 additions & 0 deletions e2e-tests/oauth-flow/rfc021/sqlserver.yml
@@ -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
1 change: 1 addition & 0 deletions storage/sql_migrations/002_discoveryservice.down.sql
@@ -1,3 +1,4 @@
drop index idx_discovery_presentation_expiration;
drop table discovery_service;
drop table discovery_presentation;
drop table discovery_credential;
Expand Down
@@ -1 +1,2 @@
drop index idx_discovery_presentation_refresh
drop table discovery_presentation_refresh;

0 comments on commit 6abcc86

Please sign in to comment.