mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-13 01:50:55 +00:00
Merge pull request #4344 from natasha41575/ResIdStr
improve gvk and resid strings for error messages
This commit is contained in:
@@ -368,7 +368,7 @@ resources:
|
||||
t.Fatalf("Expected resource accumulation error")
|
||||
}
|
||||
if !strings.Contains(
|
||||
err.Error(), "already registered id: apps_v1_StatefulSet|~X|my-sts") {
|
||||
err.Error(), "already registered id: StatefulSet.v1.apps/my-sts.[noNs]") {
|
||||
t.Fatalf("Unexpected err: %v", err)
|
||||
}
|
||||
}
|
||||
@@ -459,7 +459,7 @@ resources:
|
||||
t.Fatalf("Expected resource accumulation error")
|
||||
}
|
||||
if !strings.Contains(
|
||||
err.Error(), "already registered id: apps_v1_StatefulSet|~X|my-sts") {
|
||||
err.Error(), "already registered id: StatefulSet.v1.apps/my-sts.[noNs]") {
|
||||
t.Fatalf("Unexpected err: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -589,7 +589,7 @@ components:
|
||||
- ../comp-b`),
|
||||
},
|
||||
runPath: "prod",
|
||||
expectedError: "may not add resource with an already registered id: ~G_v1_Deployment|~X|proxy",
|
||||
expectedError: "may not add resource with an already registered id: Deployment.v1.[noGrp]/proxy.[noNs]",
|
||||
},
|
||||
"components-cannot-add-the-same-base": {
|
||||
input: []FileGen{writeTestBase,
|
||||
@@ -608,7 +608,7 @@ components:
|
||||
- ../comp-b`),
|
||||
},
|
||||
runPath: "prod",
|
||||
expectedError: "may not add resource with an already registered id: ~G_v1_Deployment|~X|storefront",
|
||||
expectedError: "may not add resource with an already registered id: Deployment.v1.[noGrp]/storefront.[noNs]",
|
||||
},
|
||||
"components-cannot-add-bases-containing-the-same-resource": {
|
||||
input: []FileGen{writeTestBase,
|
||||
@@ -639,7 +639,7 @@ components:
|
||||
- ../comp-b`),
|
||||
},
|
||||
runPath: "prod",
|
||||
expectedError: "may not add resource with an already registered id: ~G_v1_Deployment|~X|proxy",
|
||||
expectedError: "may not add resource with an already registered id: Deployment.v1.[noGrp]/proxy.[noNs]",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ resources:
|
||||
t.Fatalf("Expected resource accumulation error")
|
||||
}
|
||||
if !strings.Contains(
|
||||
err.Error(), "already registered id: apps_v1_Deployment|~X|my-deployment") {
|
||||
err.Error(), "already registered id: Deployment.v1.apps/my-deployment.[noNs]") {
|
||||
t.Fatalf("Unexpected err: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ spec:
|
||||
|
||||
err := th.RunWithErr("mango", th.MakeDefaultOptions())
|
||||
if !strings.Contains(
|
||||
err.Error(), "multiple matches for Id apps_v1_Deployment|~X|banana; failed to find unique target for patch") {
|
||||
err.Error(), "multiple matches for Id Deployment.v1.apps/banana.[noNs]; failed to find unique target for patch Deployment.v1.apps/banana.[noNs]") {
|
||||
t.Fatalf("Unexpected err: %v", err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user