Skip to content

Commit 50a8b27

Browse files
committed
Introduce ResAccumulator.
1 parent aeb2adb commit 50a8b27

10 files changed

+508
-217
lines changed

pkg/target/baseandoverlaymedium_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,9 @@ spec:
211211
if err != nil {
212212
t.Fatalf("Err: %v", err)
213213
}
214+
// TODO(#669): The name of the patched Deployment is
215+
// test-infra-baseprefix-mungebot, retaining the base
216+
// prefix (example of correct behavior).
214217
th.assertActualEqualsExpected(m, `
215218
apiVersion: v1
216219
data:

pkg/target/baseandoverlaysmall_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ spec:
136136
if err != nil {
137137
t.Fatalf("Err: %v", err)
138138
}
139+
// TODO(#669): The name of the patched Deployment is
140+
// b-a-myDeployment, retaining the base prefix
141+
// (example of correct behavior).
139142
th.assertActualEqualsExpected(m, `
140143
apiVersion: v1
141144
kind: Service

pkg/target/crd_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ spec:
293293
if err != nil {
294294
t.Fatalf("Err: %v", err)
295295
}
296-
// TODO(#605): Some output here is wrong due to #605
296+
// TODO(#669): Bee's name should be "prod-x-bee", not "prod-bee".
297297
th.assertActualEqualsExpected(m, `
298298
apiVersion: v1
299299
data:
@@ -308,9 +308,9 @@ metadata:
308308
name: prod-x-mykind
309309
spec:
310310
beeRef:
311-
name: bee
311+
name: prod-bee
312312
secretRef:
313-
name: crdsecret
313+
name: prod-x-crdsecret
314314
---
315315
apiVersion: v1beta1
316316
kind: Bee

pkg/target/customconfig_test.go

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,7 @@ spec:
221221
`)
222222
}
223223

224-
// TODO: Test demonstrates bug #605.
225-
// The customization supplied in a base isn't available to the overlay.
226-
func TestBug605(t *testing.T) {
224+
func TestFixedBug605_BaseCustomizationAvailableInOverlay(t *testing.T) {
227225
th := NewKustTestHarness(t, "/app/overlay")
228226
makeBaseReferencingCustomConfig(th)
229227
th.writeDefaultConfigs("/app/base/config/defaults.yaml")
@@ -274,13 +272,8 @@ spec:
274272
if err != nil {
275273
t.Fatalf("Err: %v", err)
276274
}
277-
// Problems in the expected result:
278-
// - The variables are not replaced in the "food" fields.
279-
// - The name of the AnimalPark should be x-o-sandiego, since
280-
// AnimalPark appears in the base.
281-
// - The giraffe and gorilla name are incorrect in AnimalPark;
282-
// they should be o-x-april and o-ursus respectively. The
283-
// Gorilla ursus doesn't get an x because it's not in the base.
275+
// TODO(#669): The name of AnimalPark should be x-o-sandiego,
276+
// not o-sandiego, since AnimalPark appears in the base.
284277
th.assertActualEqualsExpected(m, `
285278
kind: AnimalPark
286279
metadata:
@@ -290,12 +283,12 @@ metadata:
290283
name: o-sandiego
291284
spec:
292285
food:
293-
- $(APRIL_DIET)
294-
- $(KOKO_DIET)
286+
- mimosa
287+
- bambooshoots
295288
giraffeRef:
296-
name: april
289+
name: o-x-april
297290
gorillaRef:
298-
name: ursus
291+
name: o-ursus
299292
---
300293
kind: Giraffe
301294
metadata:

0 commit comments

Comments
 (0)