Skip to content

Commit

Permalink
TestCommon: Using app registrations created by IaC (#328)
Browse files Browse the repository at this point in the history
  • Loading branch information
kerbou authored Jul 3, 2024
1 parent a6df79f commit 59f49d9
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public ExampleHostsFixture()
HostConfigurationBuilder = new FunctionAppHostConfigurationBuilder();
LogsQueryClient = new LogsQueryClient(new DefaultAzureCredential());

BffAppId = IntegrationTestConfiguration.Configuration.GetValue("AZURE-B2C-BFF-APP-ID");
BffAppId = IntegrationTestConfiguration.Configuration.GetValue("AZURE-B2C-TESTBFF-APP-ID");
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ protected AuthenticationHostFixture(string web04BaseUrl, bool supportNestedToken
{
IntegrationTestConfiguration = new IntegrationTestConfiguration();

BffAppId = IntegrationTestConfiguration.Configuration.GetValue("AZURE-B2C-BFF-APP-ID");
BffAppId = IntegrationTestConfiguration.Configuration.GetValue("AZURE-B2C-TESTBFF-APP-ID");

Web04Host = WebHost.CreateDefaultBuilder()
.ConfigureAppConfiguration((context, config) =>
Expand Down
7 changes: 7 additions & 0 deletions source/TestCommon/documents/release-notes/release-notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# TestCommon Release notes

## Version 6.0.0

- Breaking changes
<!-- markdown-link-check-disable-next-line -->
- TestCommon <= 5.3.0 uses appregistrations which has been renamed in 6.0.0, see [dh3-infrastructure PR-1613](https://github.com/Energinet-DataHub/dh3-infrastructure/pull/1613/files) for details. Legacy app registrations referenced in versions <= 5.3.1 should be considered deprecated and product teams should upgrade to TestCommon 6.0.0 now.
- Once legacy app registrations has been removed from B2C instance, test runs using TestCommon versions <= 5.3.1 will cause authenticationtests to fail.

## Version 5.3.0

- Added extensions to class `DatabricksSchemaManager`:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ private static AzureB2CSettings CreateB2CSettings(IConfigurationRoot configurati
Tenant = configuration.GetValue("AZURE-B2C-TENANT"),
ServicePrincipalId = configuration.GetValue("AZURE-B2C-SPN-ID"),
ServicePrincipalSecret = configuration.GetValue("AZURE-B2C-SPN-SECRET"),
BackendAppId = configuration.GetValue("AZURE-B2C-BACKEND-APP-ID"),
BackendServicePrincipalObjectId = configuration.GetValue("AZURE-B2C-BACKEND-SPN-OBJECTID"),
BackendAppObjectId = configuration.GetValue("AZURE-B2C-BACKEND-APP-OBJECTID"),
BackendAppId = configuration.GetValue("AZURE-B2C-TESTBACKEND-APP-ID"),
BackendServicePrincipalObjectId = configuration.GetValue("AZURE-B2C-TESTBACKEND-SPN-OBJECTID"),
BackendAppObjectId = configuration.GetValue("AZURE-B2C-TESTBACKEND-APP-OBJECTID"),
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ limitations under the License.

<PropertyGroup>
<PackageId>Energinet.DataHub.Core.FunctionApp.TestCommon</PackageId>
<PackageVersion>5.3.0$(VersionSuffix)</PackageVersion>
<PackageVersion>6.0.0$(VersionSuffix)</PackageVersion>
<Title>FunctionApp TestCommon library</Title>
<Company>Energinet-DataHub</Company>
<Authors>Energinet-DataHub</Authors>
Expand Down
2 changes: 1 addition & 1 deletion source/TestCommon/source/TestCommon/TestCommon.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ limitations under the License.

<PropertyGroup>
<PackageId>Energinet.DataHub.Core.TestCommon</PackageId>
<PackageVersion>5.3.0$(VersionSuffix)</PackageVersion>
<PackageVersion>6.0.0$(VersionSuffix)</PackageVersion>
<Title>TestCommon library</Title>
<Company>Energinet-DataHub</Company>
<Authors>Energinet-DataHub</Authors>
Expand Down

0 comments on commit 59f49d9

Please sign in to comment.