mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-07-16 17:33:14 +00:00
mv basereusenameprefix_test to api/krusty/, Provide another high level example.
This commit is contained in:
@@ -1,12 +1,10 @@
|
|||||||
// Copyright 2019 The Kubernetes Authors.
|
// Copyright 2019 The Kubernetes Authors.
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
package target_test
|
package krusty_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Here is a structure of a kustomization of two components, component1
|
// Here is a structure of a kustomization of two components, component1
|
||||||
@@ -40,7 +38,7 @@ import (
|
|||||||
// ├── kustomization.yaml
|
// ├── kustomization.yaml
|
||||||
|
|
||||||
func TestBaseReuseNameConflict(t *testing.T) {
|
func TestBaseReuseNameConflict(t *testing.T) {
|
||||||
th := kusttest_test.NewKustTestHarness(t, "/app")
|
th := makeTestHarness(t)
|
||||||
th.WriteK("/app/component1/base", `
|
th.WriteK("/app/component1/base", `
|
||||||
resources:
|
resources:
|
||||||
- ../../shared
|
- ../../shared
|
||||||
@@ -117,10 +115,7 @@ resources:
|
|||||||
- component2/overlay
|
- component2/overlay
|
||||||
`)
|
`)
|
||||||
|
|
||||||
m, err := th.MakeKustTarget().MakeCustomizedResMap()
|
m := th.Run("/app", th.MakeDefaultOptions())
|
||||||
if err != nil {
|
|
||||||
t.Fatalf("Err: %v", err)
|
|
||||||
}
|
|
||||||
th.AssertActualEqualsExpected(m, `
|
th.AssertActualEqualsExpected(m, `
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
Reference in New Issue
Block a user