From a4b92493831f8668f79143d453b33babce9a1753 Mon Sep 17 00:00:00 2001 From: Adrian-Stefan Mares Date: Thu, 9 Nov 2023 19:45:59 +0100 Subject: [PATCH] all: Fix experimental definition tests --- pkg/experimental/experimental_test.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkg/experimental/experimental_test.go b/pkg/experimental/experimental_test.go index ed18f25be3..5af0a94ced 100644 --- a/pkg/experimental/experimental_test.go +++ b/pkg/experimental/experimental_test.go @@ -24,6 +24,8 @@ import ( ) func TestExperimentalFeatures(t *testing.T) { + t.Parallel() + a := assertions.New(t) r := NewRegistry() @@ -32,21 +34,21 @@ func TestExperimentalFeatures(t *testing.T) { feature := DefineFeature("experimental.feature", false) a.So(feature.GetValue(ctx), should.BeFalse) - a.So(AllFeatures(ctx), should.Resemble, map[string]bool{"experimental.feature": false}) + a.So(AllFeatures(ctx)["experimental.feature"], should.BeFalse) a.So(feature.GetValue(context.Background()), should.BeFalse) - a.So(AllFeatures(context.Background()), should.Resemble, map[string]bool{"experimental.feature": false}) + a.So(AllFeatures(context.Background())["experimental.feature"], should.BeFalse) r.EnableFeatures("experimental.feature") a.So(feature.GetValue(ctx), should.BeTrue) - a.So(AllFeatures(ctx), should.Resemble, map[string]bool{"experimental.feature": true}) + a.So(AllFeatures(ctx)["experimental.feature"], should.BeTrue) a.So(feature.GetValue(context.Background()), should.BeFalse) - a.So(AllFeatures(context.Background()), should.Resemble, map[string]bool{"experimental.feature": false}) + a.So(AllFeatures(context.Background())["experimental.feature"], should.BeFalse) EnableFeatures("experimental.feature") r.DisableFeatures("experimental.feature") a.So(feature.GetValue(ctx), should.BeFalse) - a.So(AllFeatures(ctx), should.Resemble, map[string]bool{"experimental.feature": false}) + a.So(AllFeatures(ctx)["experimental.feature"], should.BeFalse) a.So(feature.GetValue(context.Background()), should.BeTrue) - a.So(AllFeatures(context.Background()), should.Resemble, map[string]bool{"experimental.feature": true}) + a.So(AllFeatures(context.Background())["experimental.feature"], should.BeTrue) }