Skip to content

Commit

Permalink
test(cloudprovider/externalgrpc): add assert for MaxNodeProvisionTime
Browse files Browse the repository at this point in the history
- add extra assert for err test case
Signed-off-by: vadasambar <[email protected]>
  • Loading branch information
vadasambar committed Jul 7, 2023
1 parent 62bab52 commit ee49e32
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@ func TestCloudProvider_GetOptions(t *testing.T) {
assert.Equal(t, 0.7, opts.ScaleDownGpuUtilizationThreshold)
assert.Equal(t, time.Minute, opts.ScaleDownUnneededTime)
assert.Equal(t, time.Hour, opts.ScaleDownUnreadyTime)
assert.Equal(t, time.Hour, opts.ScaleDownUnreadyTime)
assert.Equal(t, time.Minute, opts.MaxNodeProvisionTime)

// test grpc error
m.On(
Expand All @@ -266,8 +268,9 @@ func TestCloudProvider_GetOptions(t *testing.T) {
client: client,
}

_, err = ng2.GetOptions(defaultsOpts)
opts, err = ng2.GetOptions(defaultsOpts)
assert.Error(t, err)
assert.Nil(t, opts)

// test no opts
m.On(
Expand Down

0 comments on commit ee49e32

Please sign in to comment.