Skip to content
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 @@ -7,10 +7,10 @@ public class FlagdSyncTestBedContainer
{
public IContainer Container { get; }

public FlagdSyncTestBedContainer()
public FlagdSyncTestBedContainer(string version)
{
Container = new ContainerBuilder()
.WithImage("ghcr.io/open-feature/flagd-testbed:v0.5.21")
.WithImage($"ghcr.io/open-feature/flagd-testbed:v{version}")
.WithPortBinding(8015, true)
.Build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
<None Include="../../spec/specification/assets/gherkin/evaluation.feature" Link="../../../Features/%(Filename)%(Extension)" DestinationFolder="../../../Features/" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>

<!-- TODO: add reconnect tests (remove exclusion) -->
<!-- TODO: add remaining tests -->
<ItemGroup>
<None Include="../../src/OpenFeature.Contrib.Providers.Flagd/flagd-testbed/gherkin/*.feature" Exclude="../../src/OpenFeature.Contrib.Providers.Flagd/flagd-testbed/gherkin/flagd-reconnect.feature" Link="../../../Features/%(Filename)%(Extension)" DestinationFolder="../../../Features/" CopyToOutputDirectory="PreserveNewest" />
<None Include="../../src/OpenFeature.Contrib.Providers.Flagd/flagd-testbed/version.txt" Link="flagd-testbed-version.txt" DestinationFolder="." CopyToOutputDirectory="PreserveNewest" />
<None Include="../../src/OpenFeature.Contrib.Providers.Flagd/flagd-testbed/gherkin/flagd.feature" Link="../../../Features/%(Filename)%(Extension)" DestinationFolder="../../../Features/" CopyToOutputDirectory="PreserveNewest" />
<None Include="../../src/OpenFeature.Contrib.Providers.Flagd/flagd-testbed/gherkin/flagd-json-evaluator.feature" Link="../../../Features/%(Filename)%(Extension)" DestinationFolder="../../../Features/" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.IO;
using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;
using Reqnroll;
Expand All @@ -22,7 +23,13 @@ public static async Task StartContainerAsync()
return;
}

FlagdSyncTestBed = new FlagdSyncTestBedContainer();
#if NET8_0_OR_GREATER
var version = await File.ReadAllTextAsync("flagd-testbed-version.txt").ConfigureAwait(false);
#else
var version = File.ReadAllText("flagd-testbed-version.txt");
#endif

FlagdSyncTestBed = new FlagdSyncTestBedContainer(version.Trim());
await FlagdSyncTestBed.Container.StartAsync().ConfigureAwait(false);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ public class FlagdRpcTestBedContainer
{
public IContainer Container { get; }

public FlagdRpcTestBedContainer()
public FlagdRpcTestBedContainer(string version)
{
Container = new ContainerBuilder()
.WithImage("ghcr.io/open-feature/flagd-testbed:v0.5.21")
.WithImage($"ghcr.io/open-feature/flagd-testbed:v{version}")
.WithPortBinding(8013, true)
.Build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
<None Include="../../spec/specification/assets/gherkin/evaluation.feature" Link="../../../Features/%(Filename)%(Extension)" DestinationFolder="../../../Features/" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>

<!-- TODO: add reconnect tests (remove exclusion) -->
<!-- TODO: add remaining tests -->
<ItemGroup>
<None Include="../../src/OpenFeature.Contrib.Providers.Flagd/flagd-testbed/gherkin/*.feature" Exclude="../../src/OpenFeature.Contrib.Providers.Flagd/flagd-testbed/gherkin/flagd-reconnect.feature" Link="../../../Features/%(Filename)%(Extension)" DestinationFolder="../../../Features/" CopyToOutputDirectory="PreserveNewest" />
<None Include="../../src/OpenFeature.Contrib.Providers.Flagd/flagd-testbed/version.txt" Link="flagd-testbed-version.txt" DestinationFolder="." CopyToOutputDirectory="PreserveNewest" />
<None Include="../../src/OpenFeature.Contrib.Providers.Flagd/flagd-testbed/gherkin/flagd.feature" Link="../../../Features/%(Filename)%(Extension)" DestinationFolder="../../../Features/" CopyToOutputDirectory="PreserveNewest" />
<None Include="../../src/OpenFeature.Contrib.Providers.Flagd/flagd-testbed/gherkin/flagd-json-evaluator.feature" Link="../../../Features/%(Filename)%(Extension)" DestinationFolder="../../../Features/" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.IO;
using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;
using Reqnroll;
Expand All @@ -22,7 +23,13 @@ public static async Task StartContainerAsync()
return;
}

FlagdTestBed = new FlagdRpcTestBedContainer();
#if NET8_0_OR_GREATER
var version = await File.ReadAllTextAsync("flagd-testbed-version.txt").ConfigureAwait(false);
#else
var version = File.ReadAllText("flagd-testbed-version.txt");
#endif

FlagdTestBed = new FlagdRpcTestBedContainer(version.Trim());
await FlagdTestBed.Container.StartAsync().ConfigureAwait(false);
}

Expand Down