mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-29 09:40:49 +00:00
More tests, better errors.
This commit is contained in:
@@ -51,7 +51,7 @@ path: jsonpatch.json
|
||||
if err == nil {
|
||||
t.Fatalf("expected error")
|
||||
}
|
||||
if !strings.Contains(err.Error(), "cannot read file \"/app/jsonpatch.json\"") {
|
||||
if !strings.Contains(err.Error(), "'/app/jsonpatch.json' doesn't exist") {
|
||||
t.Fatalf("unexpected err: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ paths:
|
||||
t.Fatalf("expected error")
|
||||
}
|
||||
if !strings.Contains(err.Error(),
|
||||
"cannot read file \"/app/patch.yaml\"") &&
|
||||
"'/app/patch.yaml' doesn't exist") &&
|
||||
!strings.Contains(err.Error(),
|
||||
"cannot unmarshal string") {
|
||||
t.Fatalf("unexpected err: %v", err)
|
||||
|
||||
@@ -83,7 +83,7 @@ path: patch.yaml
|
||||
t.Fatalf("expected error")
|
||||
}
|
||||
if !strings.Contains(err.Error(),
|
||||
"cannot read file \"/app/patch.yaml\"") {
|
||||
"'/app/patch.yaml' doesn't exist") {
|
||||
t.Fatalf("unexpected err: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user