mv pruneconfigmap_test to api/krusty/, Provide another high level example.

This commit is contained in:
Dingshujie
2019-11-30 15:24:45 +08:00
committed by DingShujie
parent fd7574cd61
commit cd84b65972

View File

@@ -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