deps(go): bump github.com/open-feature/go-sdk from 1.14.1 to 1.16.0 (#112489)
* deps(go): bump github.com/open-feature/go-sdk from 1.14.1 to 1.16.0 Bumps [github.com/open-feature/go-sdk](https://github.com/open-feature/go-sdk) from 1.14.1 to 1.16.0. - [Release notes](https://github.com/open-feature/go-sdk/releases) - [Changelog](https://github.com/open-feature/go-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-feature/go-sdk/compare/v1.14.1...v1.16.0) --- updated-dependencies: - dependency-name: github.com/open-feature/go-sdk dependency-version: 1.16.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * make update-workspace Signed-off-by: Dave Henderson <dave.henderson@grafana.com> * fix(lint): SA1019: openfeature.GetApiInstance is deprecated, using NewDefaultClient Signed-off-by: Dave Henderson <dave.henderson@grafana.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Dave Henderson <dave.henderson@grafana.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
This commit is contained in:
co-authored by
Dave Henderson
parent
9573cd3395
commit
05dff2f7cb
@@ -22,7 +22,7 @@ func Test_StaticProvider(t *testing.T) {
|
||||
t.Run("empty config loads standard flags", func(t *testing.T) {
|
||||
setup(t, []byte(``))
|
||||
// Check for one of the standard flags
|
||||
feat, err := openfeature.GetApiInstance().GetClient().BooleanValueDetails(ctx, stFeatName, !stFeatValue, evalCtx)
|
||||
feat, err := openfeature.NewDefaultClient().BooleanValueDetails(ctx, stFeatName, !stFeatValue, evalCtx)
|
||||
assert.NoError(t, err)
|
||||
assert.True(t, stFeatValue == feat.Value)
|
||||
})
|
||||
@@ -33,14 +33,14 @@ func Test_StaticProvider(t *testing.T) {
|
||||
featureOne = true
|
||||
`)
|
||||
setup(t, conf)
|
||||
feat, err := openfeature.GetApiInstance().GetClient().BooleanValueDetails(ctx, "featureOne", false, evalCtx)
|
||||
feat, err := openfeature.NewDefaultClient().BooleanValueDetails(ctx, "featureOne", false, evalCtx)
|
||||
assert.NoError(t, err)
|
||||
assert.True(t, feat.Value)
|
||||
})
|
||||
|
||||
t.Run("missing feature should return default evaluation value and an error", func(t *testing.T) {
|
||||
setup(t, []byte(``))
|
||||
missingFeature, err := openfeature.GetApiInstance().GetClient().BooleanValueDetails(ctx, "missingFeature", true, evalCtx)
|
||||
missingFeature, err := openfeature.NewDefaultClient().BooleanValueDetails(ctx, "missingFeature", true, evalCtx)
|
||||
assert.Error(t, err)
|
||||
assert.True(t, missingFeature.Value)
|
||||
assert.Equal(t, openfeature.ErrorCode("FLAG_NOT_FOUND"), missingFeature.ErrorCode)
|
||||
|
||||
Reference in New Issue
Block a user