Skip to content

Commit f395321

Browse files
Read in submodule
1 parent 4ed2d54 commit f395321

File tree

8 files changed

+14
-7
lines changed

8 files changed

+14
-7
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
- uses: actions/checkout@v6
3333
with:
3434
fetch-depth: 0 # all
35+
submodules: 'true'
3536

3637
- name: Build, Test, Pack, and Deploy (CI)
3738
uses: ./.github/actions/build-test-pack-deploy

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "specification"]
2+
path = specification
3+
url = https://github.com/OctopusDeploy/openfeature-provider-specification.git

specification

Submodule specification added at 57495a9

src/Octopus.OpenFeature.Provider.IntegrationTests/Cases.cs renamed to src/Octopus.OpenFeature.Provider.SpecificationTests/Cases.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.Collections;
22
using System.Text.Json;
33

4-
namespace Octopus.OpenFeature.Provider.IntegrationTests;
4+
namespace Octopus.OpenFeature.Provider.SpecificationTests;
55

66
public class Cases : IEnumerable<object[]>
77
{
@@ -43,7 +43,7 @@ FixtureExpected Expected
4343

4444
public record FixtureConfiguration(string Slug,
4545
bool DefaultValue,
46-
Dictionary<string, string> Context
46+
Dictionary<string, string>? Context
4747
);
4848

4949
public record FixtureExpected(

src/Octopus.OpenFeature.Provider.IntegrationTests/FixtureEvaluationTests.cs renamed to src/Octopus.OpenFeature.Provider.SpecificationTests/FixtureEvaluationTests.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using OpenFeature.Constant;
55
using OpenFeature.Model;
66

7-
namespace Octopus.OpenFeature.Provider.IntegrationTests;
7+
namespace Octopus.OpenFeature.Provider.SpecificationTests;
88

99
public class FixtureEvaluationTests(Server server) : IClassFixture<Server>
1010
{
@@ -32,9 +32,11 @@ public async Task Evaluate(string testResponse, FixtureCase testCase)
3232
result.ErrorType.Should().Be(MapErrorCode(testCase.Expected.ErrorCode));
3333
}
3434

35-
static EvaluationContext BuildContext(Dictionary<string, string> context)
35+
static EvaluationContext BuildContext(Dictionary<string, string>? context)
3636
{
3737
var builder = EvaluationContext.Builder();
38+
39+
context ??= [];
3840
foreach (var (key, value) in context)
3941
{
4042
builder.Set(key, value);

src/Octopus.OpenFeature.Provider.IntegrationTests/Octopus.OpenFeature.Provider.IntegrationTests.csproj renamed to src/Octopus.OpenFeature.Provider.SpecificationTests/Octopus.OpenFeature.Provider.SpecificationTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</ItemGroup>
2828

2929
<ItemGroup>
30-
<None Include="..\..\fixtures\**\*.json" Link="Fixtures\%(RecursiveDir)%(Filename)%(Extension)">
30+
<None Include="..\..\specification\Fixtures\*.json" Link="Fixtures\%(RecursiveDir)%(Filename)%(Extension)">
3131
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
3232
</None>
3333
</ItemGroup>

src/Octopus.OpenFeature.Provider.IntegrationTests/Server.cs renamed to src/Octopus.OpenFeature.Provider.SpecificationTests/Server.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using WireMock.Types;
66
using WireMock.Util;
77

8-
namespace Octopus.OpenFeature.Provider.IntegrationTests;
8+
namespace Octopus.OpenFeature.Provider.SpecificationTests;
99

1010
public class Server : IDisposable
1111
{

src/Octopus.OpenFeature.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Octopus.OpenFeature.Provide
44
EndProject
55
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Octopus.OpenFeature.Provider.Tests", "Octopus.OpenFeature.Provider.Tests\Octopus.OpenFeature.Provider.Tests.csproj", "{15569FBD-A9B8-478C-880B-FAC8CAF1A2BD}"
66
EndProject
7-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Octopus.OpenFeature.Provider.IntegrationTests", "Octopus.OpenFeature.Provider.IntegrationTests\Octopus.OpenFeature.Provider.IntegrationTests.csproj", "{E3F2C4A1-9B7D-4E6F-A2B5-8C3D1F0E5A9B}"
7+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Octopus.OpenFeature.Provider.SpecificationTests", "Octopus.OpenFeature.Provider.SpecificationTests\Octopus.OpenFeature.Provider.SpecificationTests.csproj", "{E3F2C4A1-9B7D-4E6F-A2B5-8C3D1F0E5A9B}"
88
EndProject
99
Global
1010
GlobalSection(SolutionConfigurationPlatforms) = preSolution

0 commit comments

Comments
 (0)