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

Resolve test flake in flags_test #3305

Merged
merged 1 commit into from
May 10, 2024
Merged
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
8 changes: 7 additions & 1 deletion internal/flags/flags_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
"github.com/stacklok/minder/internal/engine"
)

// nolint: tparallel
func TestOpenFeatureProviderFromFlags(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -76,9 +77,14 @@ idp_resolver:
},
expectedFlag: true,
}}
//nolint: paralleltest
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
// These tests need to be exclusive with each other, because openfeature
// uses a global variable to store the provider.
// Other tests can mock the openfeature client to avoid this, but this test
// specifically tests our interaction with the library, so we need exclusion here.

ctx := context.Background()
OpenFeatureProviderFromFlags(ctx, tt.cfg)

Expand Down