Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: give different v2 contexts different db to work with #987

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ appsettings.*.json
!appsettings.development.json
!appsettings.e2e.*.json
!appsettings.e2e.json
!appsettings.powerbi.json
!appsettings.projections.json
*.Importer-*.config
wwwroot/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public async Task InitializeAsync()
OaktonEnvironment.AutoStartHost = true;

var configuration = new ConfigurationBuilder()
.AddJsonFile("appsettings.json").Build();
.AddJsonFile("appsettings.projections.json").Build();

ProjectionHost = await AlbaHost.For<ProjectionHostProgram>(ConfigureForTesting(configuration, _dbName));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

using AssociationRegistry.Admin.Schema.PowerBiExport;
using FluentAssertions;
using KellermanSoftware.CompareNetObjects;
using Marten;
using Projections.PowerBiExport;
using ScenarioClassFixtures;
Expand All @@ -13,7 +12,6 @@ public class Given_MultipleFeitelijkeVerenigingenWerdenGeregistreerd : IClassFix
{
private readonly MultipleFeitelijkeVerenigingenWerdenGeregistreerdScenario _setup;
private readonly PowerBiExportContext _context;
private ComparisonConfig _compareVCodeOnly;

public Given_MultipleFeitelijkeVerenigingenWerdenGeregistreerd(
PowerBiExportContext context,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public async Task InitializeAsync()
OaktonEnvironment.AutoStartHost = true;

var configuration = new ConfigurationBuilder()
.AddJsonFile("appsettings.json").Build();
.AddJsonFile("appsettings.powerbi.json").Build();

ProjectionHost = await AlbaHost.For<ProjectionHostProgram>(ConfigureForTesting(configuration, _dbName));

Expand Down
121 changes: 121 additions & 0 deletions test/AssociationRegistry.Test.Admin.Api/appsettings.powerbi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Wolverine": "Warning",
"WolverineFx": "Warning",
"Npgsql.Command": "Warning",
"Npgsql": "Warning",
"Marten": "Warning",
"System": "Warning",
"Microsoft": "Warning"
}
},
"BaseUrl": "http://127.0.0.1:11004/",
"ElasticClientOptions": {
"Uri": "http://127.0.0.1:9200",
"Username": "elastic",
"Password": "local_development",
"Indices": {
"Verenigingen": "test-verenigingsregister-admin-verenigingen-powerbi",
"DuplicateDetection": "test-verenigingsregister-duplicate-detection-powerbi"
}
},
"PostgreSQLOptions": {
"Host": "127.0.0.1",
"database": "verenigingsregister_test_bi",
"username": "root",
"password": "root"
},
"RootPostgreSQLOptions": {
"Host": "127.0.0.1",
"database": "verenigingsregister",
"username": "root",
"password": "root"
},
"OAuth2IntrospectionOptions": {
"ClientId": "association-registry-local-dev-admin",
"ClientSecret": "a_very=Secr3t*Key",
"Authority": "http://127.0.0.1:5051",
"IntrospectionEndpoint": "http://127.0.0.1:5051/connect/introspect"
},
"ProjectionDaemonDisabled": false,
"DistributedLock": {
"Region": "eu-west-1",
"TableName": "__DistributedLocks__",
"LeasePeriodInMinutes": 5,
"ThrowOnFailedRenew": true,
"TerminateApplicationOnFailedRenew": true,
"Enabled": false
},
"ApiDocs": {
"Title": "Basisregisters Vlaanderen Verenigingsregister Beheer API",
"Contact": {
"Name": "Digitaal Vlaanderen",
"Email": "digitaal.vlaanderen@vlaanderen.be",
"Url": "https://beheer.verenigingen.vlaanderen.be"
}
},
"MagdaOptions": {
"Afzender": "1234",
"Hoedanigheid": "1234",
"Ontvanger": "vip.vlaanderen.be",
"GeefOndernemingVkboEndpoint": "http://127.0.0.1:8080/GeefOndernemingVkboDienst-02.00/soap/WebService",
"GeefOndernemingEndpoint": "http://127.0.0.1:8080/GeefOndernemingDienst-02.00/soap/WebService",
"RegistreerInschrijvingEndpoint": "http://127.0.0.1:8080/RegistreerInschrijvingDienst-02.01/soap/WebService"
},
"WiremockMagdaOptions": {
"Afzender": "1234",
"Hoedanigheid": "1234",
"Ontvanger": "vip.vlaanderen.be",
"GeefOndernemingVkboEndpoint": "http://127.0.0.1:8080/GeefOndernemingVkboDienst-02.00/soap/WebService",
"GeefOndernemingEndpoint": "http://127.0.0.1:8080/GeefOndernemingDienst-02.00/soap/WebService",
"RegistreerInschrijvingEndpoint": "http://127.0.0.1:8080/RegistreerInschrijvingDienst-02.01/soap/WebService"
},
"LiveMagdaOptions": {
"Afzender": "override this in your local appsettings/user secrets",
"Hoedanigheid": "override this in your local appsettings/user secrets",
"Ontvanger": "override this in your local appsettings/user secrets",
"GeefOndernemingVkboEndpoint": "http://127.0.0.1:8080/GeefOndernemingVkboDienst-02.00/soap/WebService",
"GeefOndernemingEndpoint": "http://127.0.0.1:8080/GeefOndernemingDienst-02.00/soap/WebService",
"RegistreerInschrijvingEndpoint": "http://127.0.0.1:8080/RegistreerInschrijvingDienst-02.01/soap/WebService"
},
"RebuildConfiguration": {
"TimeoutInMinutes": 120
},
"BeheerProjectionHostBaseUrl": "http://127.0.0.1:8080",
"PublicApiBaseUrl": "http://127.0.0.1:11003/",
"PublicProjectionHostBaseUrl": "http://127.0.0.1:8080",
"SuperAdminClientIds": [
"superAdminClient"
],
"TemporaryMagdaVertegenwoordigers": "{\"TemporaryVertegenwoordigers\": [{\"Insz\": \"1234567890\",\"Voornaam\": \"Ikkeltje\",\"Achternaam\": \"Persoon\"},{\"Insz\": \"0987654321\",\"Voornaam\": \"Kramikkeltje\",\"Achternaam\": \"Persoon\"}]}",
"GrarOptions": {
"Kafka": {
"Enabled": false,
"BootstrapServer": "http://127.0.0.1/",
"Username": "test",
"Password": "test",
"TopicName": "test",
"GroupId": "test",
"Offset": 0
},
"Sqs": {
"GrarSyncQueueUrl": "https://127.0.0.1.localstack.cloud:4566/000000000000/grar-sync",
"GrarSyncQueueName": "verenigingsregister-grarsync",
"GrarSyncDeadLetterQueueName": "verenigingsregister-grarsync-dlq",
"AddressMatchQueueName": "verenigingsregister-addressmatch",
"AddressMatchDeadLetterQueueName": "verenigingsregister-addressmatch-dlq",
"UseLocalStack": true
},
"Wolverine": {
"TransportServiceUrl": "http://127.0.0.1:4566",
"AutoProvision": true,
"OptimizeArtifactWorkflow": false
},
"HttpClient": {
"BaseUrl": "http://127.0.0.1:8080",
"Timeout": 30
}
}
}
121 changes: 121 additions & 0 deletions test/AssociationRegistry.Test.Admin.Api/appsettings.projections.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Wolverine": "Warning",
"WolverineFx": "Warning",
"Npgsql.Command": "Warning",
"Npgsql": "Warning",
"Marten": "Warning",
"System": "Warning",
"Microsoft": "Warning"
}
},
"BaseUrl": "http://127.0.0.1:11004/",
"ElasticClientOptions": {
"Uri": "http://127.0.0.1:9200",
"Username": "elastic",
"Password": "local_development",
"Indices": {
"Verenigingen": "test-verenigingsregister-admin-verenigingen-projections",
"DuplicateDetection": "test-verenigingsregister-duplicate-detection-projections"
}
},
"PostgreSQLOptions": {
"Host": "127.0.0.1",
"database": "verenigingsregister_test_beheer",
"username": "root",
"password": "root"
},
"RootPostgreSQLOptions": {
"Host": "127.0.0.1",
"database": "verenigingsregister",
"username": "root",
"password": "root"
},
"OAuth2IntrospectionOptions": {
"ClientId": "association-registry-local-dev-admin",
"ClientSecret": "a_very=Secr3t*Key",
"Authority": "http://127.0.0.1:5051",
"IntrospectionEndpoint": "http://127.0.0.1:5051/connect/introspect"
},
"ProjectionDaemonDisabled": false,
"DistributedLock": {
"Region": "eu-west-1",
"TableName": "__DistributedLocks__",
"LeasePeriodInMinutes": 5,
"ThrowOnFailedRenew": true,
"TerminateApplicationOnFailedRenew": true,
"Enabled": false
},
"ApiDocs": {
"Title": "Basisregisters Vlaanderen Verenigingsregister Beheer API",
"Contact": {
"Name": "Digitaal Vlaanderen",
"Email": "digitaal.vlaanderen@vlaanderen.be",
"Url": "https://beheer.verenigingen.vlaanderen.be"
}
},
"MagdaOptions": {
"Afzender": "1234",
"Hoedanigheid": "1234",
"Ontvanger": "vip.vlaanderen.be",
"GeefOndernemingVkboEndpoint": "http://127.0.0.1:8080/GeefOndernemingVkboDienst-02.00/soap/WebService",
"GeefOndernemingEndpoint": "http://127.0.0.1:8080/GeefOndernemingDienst-02.00/soap/WebService",
"RegistreerInschrijvingEndpoint": "http://127.0.0.1:8080/RegistreerInschrijvingDienst-02.01/soap/WebService"
},
"WiremockMagdaOptions": {
"Afzender": "1234",
"Hoedanigheid": "1234",
"Ontvanger": "vip.vlaanderen.be",
"GeefOndernemingVkboEndpoint": "http://127.0.0.1:8080/GeefOndernemingVkboDienst-02.00/soap/WebService",
"GeefOndernemingEndpoint": "http://127.0.0.1:8080/GeefOndernemingDienst-02.00/soap/WebService",
"RegistreerInschrijvingEndpoint": "http://127.0.0.1:8080/RegistreerInschrijvingDienst-02.01/soap/WebService"
},
"LiveMagdaOptions": {
"Afzender": "override this in your local appsettings/user secrets",
"Hoedanigheid": "override this in your local appsettings/user secrets",
"Ontvanger": "override this in your local appsettings/user secrets",
"GeefOndernemingVkboEndpoint": "http://127.0.0.1:8080/GeefOndernemingVkboDienst-02.00/soap/WebService",
"GeefOndernemingEndpoint": "http://127.0.0.1:8080/GeefOndernemingDienst-02.00/soap/WebService",
"RegistreerInschrijvingEndpoint": "http://127.0.0.1:8080/RegistreerInschrijvingDienst-02.01/soap/WebService"
},
"RebuildConfiguration": {
"TimeoutInMinutes": 120
},
"BeheerProjectionHostBaseUrl": "http://127.0.0.1:8080",
"PublicApiBaseUrl": "http://127.0.0.1:11003/",
"PublicProjectionHostBaseUrl": "http://127.0.0.1:8080",
"SuperAdminClientIds": [
"superAdminClient"
],
"TemporaryMagdaVertegenwoordigers": "{\"TemporaryVertegenwoordigers\": [{\"Insz\": \"1234567890\",\"Voornaam\": \"Ikkeltje\",\"Achternaam\": \"Persoon\"},{\"Insz\": \"0987654321\",\"Voornaam\": \"Kramikkeltje\",\"Achternaam\": \"Persoon\"}]}",
"GrarOptions": {
"Kafka": {
"Enabled": false,
"BootstrapServer": "http://127.0.0.1/",
"Username": "test",
"Password": "test",
"TopicName": "test",
"GroupId": "test",
"Offset": 0
},
"Sqs": {
"GrarSyncQueueUrl": "https://127.0.0.1.localstack.cloud:4566/000000000000/grar-sync",
"GrarSyncQueueName": "verenigingsregister-grarsync",
"GrarSyncDeadLetterQueueName": "verenigingsregister-grarsync-dlq",
"AddressMatchQueueName": "verenigingsregister-addressmatch",
"AddressMatchDeadLetterQueueName": "verenigingsregister-addressmatch-dlq",
"UseLocalStack": true
},
"Wolverine": {
"TransportServiceUrl": "http://127.0.0.1:4566",
"AutoProvision": true,
"OptimizeArtifactWorkflow": false
},
"HttpClient": {
"BaseUrl": "http://127.0.0.1:8080",
"Timeout": 30
}
}
}
Loading