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

refac: Use latest TestCommon #2848

Merged
merged 6 commits into from
Oct 2, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Energinet.DataHub.Core.TestCommon" Version="6.3.0" />
<PackageReference Include="Energinet.DataHub.Core.TestCommon" Version="7.0.0" />
<PackageReference Include="FluentAssertions" Version="6.12.1" />
<PackageReference Include="FluentAssertions.Analyzers" Version="0.33.0">
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@ public ServiceBusIntegrationEventSenderFixture()
var integrationTestConfiguration = new IntegrationTestConfiguration();
_serviceBusResourceProvider = new ServiceBusResourceProvider(
new TestDiagnosticsLogger(),
integrationTestConfiguration.ServiceBusFullyQualifiedNamespace);
integrationTestConfiguration.ServiceBusFullyQualifiedNamespace,
integrationTestConfiguration.Credential);

ServiceBusClient = new ServiceBusClient(integrationTestConfiguration.ServiceBusFullyQualifiedNamespace, new DefaultAzureCredential());
ServiceBusClient = new ServiceBusClient(
integrationTestConfiguration.ServiceBusFullyQualifiedNamespace,
integrationTestConfiguration.Credential);

IntegrationEventsOptions = Options.Create(
new IntegrationEventsOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,13 @@ public OrchestrationsAppFixture()

ServiceBusResourceProvider = new ServiceBusResourceProvider(
TestLogger,
IntegrationTestConfiguration.ServiceBusFullyQualifiedNamespace);
IntegrationTestConfiguration.ServiceBusFullyQualifiedNamespace,
IntegrationTestConfiguration.Credential);

ServiceBusListenerMock = new ServiceBusListenerMock(
TestLogger,
IntegrationTestConfiguration.ServiceBusFullyQualifiedNamespace);
IntegrationTestConfiguration.ServiceBusFullyQualifiedNamespace,
IntegrationTestConfiguration.Credential);

HostConfigurationBuilder = new FunctionAppHostConfigurationBuilder();

Expand Down
4 changes: 2 additions & 2 deletions source/dotnet/wholesale-api/Test.Core/Test.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ limitations under the License.
<RootNamespace>Energinet.DataHub.Wholesale.Test.Core</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Energinet.DataHub.Core.FunctionApp.TestCommon" Version="6.3.0" />
<PackageReference Include="Energinet.DataHub.Core.TestCommon" Version="6.3.0" />
<PackageReference Include="Energinet.DataHub.Core.FunctionApp.TestCommon" Version="7.0.0" />
<PackageReference Include="Energinet.DataHub.Core.TestCommon" Version="7.0.0" />
<PackageReference Include="FluentAssertions" Version="6.12.1" />
<PackageReference Include="FluentAssertions.Analyzers" Version="0.33.0">
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ public WholesaleWebApiFixture()

ServiceBusResourceProvider = new ServiceBusResourceProvider(
TestLogger,
IntegrationTestConfiguration.ServiceBusFullyQualifiedNamespace);
IntegrationTestConfiguration.ServiceBusFullyQualifiedNamespace,
IntegrationTestConfiguration.Credential);
}

public WholesaleDatabaseManager<DatabaseContext> DatabaseManager { get; }
Expand Down Expand Up @@ -118,13 +119,13 @@ protected override Task OnDisposeWebApiDependenciesAsync()
}

/// <summary>
/// Create storage container. Note: Azurite is based on the Blob Storage API, but sinceData Lake Storage Gen2 is built on top of it, we can still create the container like this
/// Create storage container. Note: Azurite is based on the Blob Storage API, but since Data Lake Storage Gen2 is built on top of it, we can still create the container like this
/// </summary>
private async Task EnsureCalculationStorageContainerExistsAsync()
{
var dataLakeServiceClient = new DataLakeServiceClient(
serviceUri: AzuriteManager.BlobStorageServiceUri,
credential: new DefaultAzureCredential());
credential: IntegrationTestConfiguration.Credential);

var fileSystemClient = dataLakeServiceClient.GetFileSystemClient(
Environment.GetEnvironmentVariable(nameof(DataLakeOptions.STORAGE_CONTAINER_NAME)));
Expand Down
Loading