mirror of
https://github.com/ossf/scorecard.git
synced 2024-09-17 11:57:12 +03:00
Fix intermittent test failure
This commit is contained in:
parent
c97b4e7b38
commit
a4e8751d73
@ -43,10 +43,8 @@ func Test_shouldUseDiskCache(t *testing.T) {
|
||||
useDiskCache: false,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
tt := tt
|
||||
for _, tt := range tests { //nolint:paralleltest // Since we're calling os.Setenv, we can't run these in parallel.
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
if tt.useDiskCache {
|
||||
if tt.diskCachePath != "" {
|
||||
e := os.Setenv(UseDiskCache, "1")
|
||||
@ -86,10 +84,8 @@ func Test_shouldUseBlobCache(t *testing.T) {
|
||||
useBlobCache: false,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
tt := tt
|
||||
for _, tt := range tests { //nolint:paralleltest // Since we're calling os.Setenv, we can't run these in parallel.
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
if tt.useBlobCache {
|
||||
e := os.Setenv(UseBlobCache, "1")
|
||||
thelperHandleError(t, e)
|
||||
|
Loading…
Reference in New Issue
Block a user