mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-07-01 18:30:15 +00:00
mv pruneconfigmap_test to api/krusty/, Provide another high level example.
This commit is contained in:
@@ -1,16 +1,14 @@
|
|||||||
// 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"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestPruneConfigMap(t *testing.T) {
|
func TestPruneConfigMap(t *testing.T) {
|
||||||
th := kusttest_test.NewKustTestHarness(t, "/app/base")
|
th := makeTestHarness(t)
|
||||||
th.WriteK("/app/base", `
|
th.WriteK("/app/base", `
|
||||||
resources:
|
resources:
|
||||||
- deployment.yaml
|
- deployment.yaml
|
||||||
@@ -88,10 +86,7 @@ data:
|
|||||||
username: jingfang
|
username: jingfang
|
||||||
`)
|
`)
|
||||||
|
|
||||||
m, err := th.MakeKustTarget().MakeCustomizedResMap()
|
m := th.Run("/app/base", th.MakeDefaultOptions())
|
||||||
if err != nil {
|
|
||||||
t.Fatalf("Err: %v", err)
|
|
||||||
}
|
|
||||||
//nolint
|
//nolint
|
||||||
th.AssertActualEqualsExpected(m, `
|
th.AssertActualEqualsExpected(m, `
|
||||||
apiVersion: apps/v1beta2
|
apiVersion: apps/v1beta2
|
||||||
Reference in New Issue
Block a user