mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-20 17:38:50 +00:00
prefer NoError/Error over Nil/NotNil
This commit is contained in:
@@ -98,7 +98,7 @@ func TestSyncServiceNoSelector(t *testing.T) {
|
||||
})
|
||||
|
||||
err := esController.syncService(fmt.Sprintf("%s/%s", ns, serviceName))
|
||||
assert.Nil(t, err)
|
||||
assert.NoError(t, err)
|
||||
assert.Len(t, client.Actions(), 0)
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ func TestSyncServicePendingDeletion(t *testing.T) {
|
||||
})
|
||||
|
||||
err := esController.syncService(fmt.Sprintf("%s/%s", ns, serviceName))
|
||||
assert.Nil(t, err)
|
||||
assert.NoError(t, err)
|
||||
assert.Len(t, client.Actions(), 0)
|
||||
}
|
||||
|
||||
@@ -366,7 +366,7 @@ func TestSyncServiceFull(t *testing.T) {
|
||||
|
||||
// run through full sync service loop
|
||||
err = esController.syncService(fmt.Sprintf("%s/%s", namespace, serviceName))
|
||||
assert.Nil(t, err)
|
||||
assert.NoError(t, err)
|
||||
|
||||
// last action should be to create endpoint slice
|
||||
expectActions(t, client.Actions(), 1, "create", "endpointslices")
|
||||
|
Reference in New Issue
Block a user