Skip to content

Commit

Permalink
Fix concurrent tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ludydoo committed Nov 6, 2023
1 parent d1d05ad commit 4accec0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/dinosaur/pkg/presenters/managedcentral_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func TestShouldNotRenderTwiceForSameParams(t *testing.T) {
var gitopsConfig = gitops.Config{}
var params = gitops.CentralParams{}
var renderCount = 0
renderFn = func(params gitops.CentralParams, config gitops.Config) (v1alpha1.Central, error) {
renderFn := func(params gitops.CentralParams, config gitops.Config) (v1alpha1.Central, error) {
renderCount++
return v1alpha1.Central{}, nil
}
Expand Down Expand Up @@ -50,7 +50,7 @@ func TestShouldNotCacheOnError(t *testing.T) {
var params = gitops.CentralParams{}
var renderCount = 0
var shouldThrow = false
renderFn = func(params gitops.CentralParams, config gitops.Config) (v1alpha1.Central, error) {
renderFn := func(params gitops.CentralParams, config gitops.Config) (v1alpha1.Central, error) {
renderCount++
if shouldThrow {
return v1alpha1.Central{}, assert.AnError
Expand Down

0 comments on commit 4accec0

Please sign in to comment.