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

feat: Environment Variable Provider #312

Merged
merged 15 commits into from
Mar 12, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
cleanup test proj file
Signed-off-by: Michael Richardson <[email protected]>
  • Loading branch information
MJRichardson committed Mar 10, 2025
commit f35f6a8c6433c53f54298cf4417bb7facd448b96
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<PackageId>OpenFeature.Contrib.Providers.EnvVar</PackageId>
<VersionNumber>0.0.1</VersionNumber> <!--x-release-please-version -->
<VersionPrefix>$(VersionNumber)</VersionPrefix>
<AssemblyVersion>$(VersionNumber)</AssemblyVersion>
Expand All @@ -11,5 +10,4 @@
<Authors>Octopus Deploy</Authors>
</PropertyGroup>


</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

namespace OpenFeature.Contrib.Providers.EnvVar.Test
{

public class EnvVarProviderTests
{
[Theory]
Expand Down Expand Up @@ -140,7 +139,7 @@ await ExecuteResolveErrorTest(prefix, flagKey, defaultValue, ErrorType.TypeMisma
public async Task ResolveStructureValueAsync_WhenEnvironmentVariablePresent_ShouldReturnValue(string prefix,
string flagKey, string value, string defaultValue)
{
Environment.SetEnvironmentVariable(prefix + flagKey, value.ToString());
Environment.SetEnvironmentVariable(prefix + flagKey, value);

var provider = new EnvVarProvider(prefix);
var resolutionDetails = await provider.ResolveStructureValueAsync(flagKey, new Value(defaultValue));
Expand Down Expand Up @@ -185,6 +184,5 @@ private async Task ExecuteResolveErrorTest<T>(string prefix, string flagKey, T d

Assert.Equal(expectedErrorType, exception.ErrorType);
}

}
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AutoFixture.Xunit2" Version="4.17.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\OpenFeature.Contrib.Providers.EnvVar\OpenFeature.Contrib.Providers.EnvVar.csproj" />
</ItemGroup>

</Project>