Skip to content

Commit

Permalink
Ignore todo() context lint issue
Browse files Browse the repository at this point in the history
Signed-off-by: Josef Karasek <[email protected]>
  • Loading branch information
josefkarasek committed Jul 30, 2024
1 parent db19d7f commit bc70c2a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/scaling/scale_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,7 @@ func TestIsScaledJobActive(t *testing.T) {
scalerCachesLock: &sync.RWMutex{},
scaledObjectsMetricCache: metricscache.NewMetricsCache(),
}
// nosemgrep: context-todo
isActive, isError, queueLength, maxValue := sh.isScaledJobActive(context.TODO(), scaledJobSingle)
assert.Equal(t, true, isActive)
assert.Equal(t, false, isError)
Expand Down Expand Up @@ -718,6 +719,7 @@ func TestIsScaledJobActive(t *testing.T) {
scaledObjectsMetricCache: metricscache.NewMetricsCache(),
}
fmt.Printf("index: %d", index)
// nosemgrep: context-todo
isActive, isError, queueLength, maxValue = sh.isScaledJobActive(context.TODO(), scaledJob)
// assert.Equal(t, 5, index)
assert.Equal(t, scalerTestData.ResultIsActive, isActive)
Expand Down Expand Up @@ -759,6 +761,7 @@ func TestIsScaledJobActiveIfQueueEmptyButMinReplicaCountGreaterZero(t *testing.T
scaledObjectsMetricCache: metricscache.NewMetricsCache(),
}

// nosemgrep: context-todo
isActive, isError, queueLength, maxValue := sh.isScaledJobActive(context.TODO(), scaledJobSingle)
assert.Equal(t, true, isActive)
assert.Equal(t, false, isError)
Expand Down

0 comments on commit bc70c2a

Please sign in to comment.