Skip to content

Commit

Permalink
updated test containers dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
olitomlinson committed Sep 19, 2023
1 parent cb6af57 commit 34ef427
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions IntegrationTests/IntegrationTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<PackageReference Include="Dapr.Client" Version="1.11.0" />
<ProjectReference Include="../src/Component.csproj" />
<PackageReference Include="JetBrains.Annotations" Version="2022.3.1" />
<PackageReference Include="Testcontainers" Version="3.3.0" />
<PackageReference Include="Testcontainers.PostgreSql" Version="3.3.0" />
<PackageReference Include="Testcontainers" Version="3.5.0" />
<PackageReference Include="Testcontainers.PostgreSql" Version="3.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
Expand Down
6 changes: 2 additions & 4 deletions IntegrationTests/TestContainers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public sealed class TestContainers : IAsyncLifetime

public TestContainers()

Check warning on line 26 in IntegrationTests/TestContainers.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable field '_daprClient' must contain a non-null value when exiting constructor. Consider declaring the field as nullable.
{
var daprComponentsDirectory = $"{Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location)}/DaprComponents";
var daprComponentsDirectory = new DirectoryInfo(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "/DaprComponents/.");

var containerSuffix = Guid.NewGuid().ToString("N").Substring(23);
_dapr_app_id = $"pluggableapp-{containerSuffix}";
Expand All @@ -52,9 +52,7 @@ public TestContainers()
.WithPortBinding(_dapr_http_port, true)
.WithPortBinding(_dapr_grpc_port, true)
.WithVolumeMount(_socketVolume, "/tmp/dapr-components-sockets")
.WithResourceMapping($"{daprComponentsDirectory}/pluggable-postgres-table.yaml", "/DaprComponents/pluggable-postgres-table.yaml")
.WithResourceMapping($"{daprComponentsDirectory}/pluggable-postgres-schema.yaml", "/DaprComponents/pluggable-postgres-schema.yaml")
.WithResourceMapping($"{daprComponentsDirectory}/standard-postgres.yaml", "/DaprComponents/standard-postgres.yaml")
.WithResourceMapping(daprComponentsDirectory, "/DaprComponents/")
.WithEntrypoint("./daprd")
.WithCommand("-app-id", _dapr_app_id)
.WithCommand("-dapr-http-port", _dapr_http_port.ToString())
Expand Down

0 comments on commit 34ef427

Please sign in to comment.