Skip to content

Commit

Permalink
fix: race condition bug in TestValidateLastNonBreakingVersion unit te…
Browse files Browse the repository at this point in the history
…st (#2138)

## Description

Each test case in `TestValidateLastNonBreakingVersion()` updates a
global variable `config.CLIVersion`, so the test cases should not be ran
concurrently.

## Related Issue

Fixes #2136

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Other (security config, docs update, etc)

## Checklist before merging

- [x] Test, docs, adr added or updated as needed
- [x] [Contributor Guide
Steps](https://github.com/defenseunicorns/zarf/blob/main/CONTRIBUTING.md#developer-workflow)
followed
  • Loading branch information
lucasrod16 authored Nov 13, 2023
1 parent 682fe2b commit 6c0e358
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/pkg/packager/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,6 @@ func TestValidateLastNonBreakingVersion(t *testing.T) {
testCase := testCase

t.Run(testCase.name, func(t *testing.T) {
t.Parallel()

config.CLIVersion = testCase.cliVersion

p := &Packager{
Expand Down

0 comments on commit 6c0e358

Please sign in to comment.