mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-15 06:43:54 +00:00
Use Fatalf for non-recoverable errors in test
This commit is contained in:
parent
5f1c7ae634
commit
5784e58446
@ -294,7 +294,7 @@ func TestApplyCreate(t *testing.T) {
|
|||||||
handled, configMap, err := reaction(action)
|
handled, configMap, err := reaction(action)
|
||||||
assert.True(t, handled)
|
assert.True(t, handled)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("Failed to create a resource with apply: %v", err)
|
t.Fatalf("Failed to create a resource with apply: %v", err)
|
||||||
}
|
}
|
||||||
cm := configMap.(*v1.ConfigMap)
|
cm := configMap.(*v1.ConfigMap)
|
||||||
assert.Equal(t, cm.Data, map[string]string{"k": "v"})
|
assert.Equal(t, cm.Data, map[string]string{"k": "v"})
|
||||||
@ -314,7 +314,7 @@ func TestApplyNoMeta(t *testing.T) {
|
|||||||
handled, configMap, err := reaction(action)
|
handled, configMap, err := reaction(action)
|
||||||
assert.True(t, handled)
|
assert.True(t, handled)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("Failed to create a resource with apply: %v", err)
|
t.Fatalf("Failed to create a resource with apply: %v", err)
|
||||||
}
|
}
|
||||||
cm := configMap.(*v1.ConfigMap)
|
cm := configMap.(*v1.ConfigMap)
|
||||||
assert.Equal(t, "cm-1", cm.Name)
|
assert.Equal(t, "cm-1", cm.Name)
|
||||||
|
Loading…
Reference in New Issue
Block a user