Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use require.IsType for type assertions in tests #1458

Merged
merged 20 commits into from
May 3, 2023
Prev Previous commit
Next Next commit
merged
  • Loading branch information
StephenButtolph committed May 3, 2023
commit dbf3ad8370ff894890e0f2605b9914699e25e196
8 changes: 4 additions & 4 deletions network/throttling/inbound_resource_throttler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ func TestNewSystemThrottler(t *testing.T) {
require.NoError(err)
require.IsType(&systemThrottler{}, throttlerIntf)
throttler := throttlerIntf.(*systemThrottler)
require.EqualValues(clock, config.Clock)
require.EqualValues(time.Second, config.MaxRecheckDelay)
require.EqualValues(cpuTracker, throttler.tracker)
require.EqualValues(targeter, throttler.targeter)
require.Equal(clock, config.Clock)
require.Equal(time.Second, config.MaxRecheckDelay)
require.Equal(cpuTracker, throttler.tracker)
require.Equal(targeter, throttler.targeter)
}

func TestSystemThrottler(t *testing.T) {
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.