mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-05-17 18:25:26 +00:00
46 lines
935 B
Go
46 lines
935 B
Go
// +build notravis
|
|
|
|
// Copyright 2019 The Kubernetes Authors.
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
// Disabled on travis, because don't want to install go-getter on travis.
|
|
|
|
package main_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
kusttest_test "sigs.k8s.io/kustomize/v3/pkg/kusttest"
|
|
plugins_test "sigs.k8s.io/kustomize/v3/pkg/plugins/test"
|
|
)
|
|
|
|
// This test requires having the go-getter binary on the PATH.
|
|
//
|
|
func TestGoGetter(t *testing.T) {
|
|
tc := plugins_test.NewEnvForTest(t).Set()
|
|
defer tc.Reset()
|
|
|
|
tc.BuildExecPlugin(
|
|
"someteam.example.com", "v1", "GoGetter")
|
|
|
|
th := kusttest_test.NewKustTestPluginHarness(t, "/app")
|
|
|
|
m := th.LoadAndRunGenerator(`
|
|
apiVersion: someteam.example.com/v1
|
|
kind: GoGetter
|
|
metadata:
|
|
name: example
|
|
url: github.com/kustless/kustomize-examples.git
|
|
`)
|
|
|
|
th.AssertActualEqualsExpected(m, `
|
|
apiVersion: v1
|
|
data:
|
|
altGreeting: Good Morning!
|
|
enableRisky: "false"
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: the-map
|
|
`)
|
|
}
|