Skip to content
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
4 changes: 4 additions & 0 deletions cmd/validators_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ func TestValidateNumericRanges(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
// Setup
t.Cleanup(saveGlobalVars().restore)
toolCfg = Config{}
tt.setupFunc()

Expand Down Expand Up @@ -237,6 +238,7 @@ func TestValidatePaymentAndTerm(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
// Setup
t.Cleanup(saveGlobalVars().restore)
toolCfg = Config{}
tt.setupFunc()

Expand Down Expand Up @@ -428,6 +430,7 @@ func TestValidateFilePaths(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
// Setup
t.Cleanup(saveGlobalVars().restore)
toolCfg = Config{}
cleanup := tt.setupFunc()
defer cleanup()
Expand Down Expand Up @@ -562,6 +565,7 @@ func TestValidateTargetCoverage(t *testing.T) {

for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
t.Cleanup(saveGlobalVars().restore)
toolCfg = Config{Coverage: tt.coverage, TargetCoverage: tt.target, CoverageLookbackDays: 30}
var cmd *cobra.Command
if tt.useCobraCmd {
Expand Down
Loading