diff --git a/e2e-tests/oauth-flow/rfc021/README.md b/e2e-tests/oauth-flow/rfc021/README.md index 84ba5f180..0f9901e96 100644 --- a/e2e-tests/oauth-flow/rfc021/README.md +++ b/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 ` where `` 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 ` where `` is one of the supported databases (postgres, sqlite, mysql, sqlserver). diff --git a/e2e-tests/oauth-flow/rfc021/run-test.sh b/e2e-tests/oauth-flow/rfc021/run-test.sh index 3f5ffb24e..9811e1b29 100755 --- a/e2e-tests/oauth-flow/rfc021/run-test.sh +++ b/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 \ No newline at end of file +./do-test.sh sqlite +./do-test.sh sqlserver \ No newline at end of file diff --git a/e2e-tests/oauth-flow/rfc021/sqlserver.sh b/e2e-tests/oauth-flow/rfc021/sqlserver.sh new file mode 100755 index 000000000..292700fc6 --- /dev/null +++ b/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;" +} \ No newline at end of file diff --git a/e2e-tests/oauth-flow/rfc021/sqlserver.yml b/e2e-tests/oauth-flow/rfc021/sqlserver.yml new file mode 100644 index 000000000..653a7a94a --- /dev/null +++ b/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 diff --git a/storage/sql_migrations/002_discoveryservice.down.sql b/storage/sql_migrations/002_discoveryservice.down.sql index a15d73f0f..8e2e96e20 100644 --- a/storage/sql_migrations/002_discoveryservice.down.sql +++ b/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; diff --git a/storage/sql_migrations/004_discoveryservice_client_registration.down.sql b/storage/sql_migrations/004_discoveryservice_client_registration.down.sql index 671db016a..f37852f67 100644 --- a/storage/sql_migrations/004_discoveryservice_client_registration.down.sql +++ b/storage/sql_migrations/004_discoveryservice_client_registration.down.sql @@ -1 +1,2 @@ +drop index idx_discovery_presentation_refresh drop table discovery_presentation_refresh;