Skip to content
Snippets Groups Projects

Few updates from downstream

Merged steeve.chailloux requested to merge topic/default/from-scl into branch/default
4 files
+ 9
4
Compare changes
  • Side-by-side
  • Inline
Files
4
+ 46
6
@@ -174,8 +174,48 @@
)
}
func TestHydrateRawString(t *testing.T) {
rawVariables := []byte(`
---
foo: |
{"something": "special"}
`)
variables := make(map[string]interface{})
byteContent := bytes.NewReader(rawVariables)
decoder := yaml.NewDecoder(byteContent)
require.NoError(t, decoder.Decode(&variables))
input := `
---
foo: |
{
"bar": <[foo]>,
"answer": 42
}
`
expected := `
---
foo: |
{
"bar": {"something": "special"},
"answer": 42
}
`
buf := bytes.NewBufferString("")
err := runner.Hydrate([]byte(input), buf, variables)
require.NoError(t, err)
assert.Equal(
t,
expected,
buf.String(),
)
fmt.Println("done")
}
func TestYttBuildArgs(t *testing.T) {
tl := testutils.NewTestLogger(t)
testNS := "environments/ns1"
absConfigDir, err := filepath.Abs(fixtures)
require.NoError(t, err)
@@ -177,9 +217,9 @@
func TestYttBuildArgs(t *testing.T) {
tl := testutils.NewTestLogger(t)
testNS := "environments/ns1"
absConfigDir, err := filepath.Abs(fixtures)
require.NoError(t, err)
c := runner.NewCmdConfig(tl.Logger(), absConfigDir, testNS, false, "", "")
c := runner.NewCmdConfig(tl.Logger(), absConfigDir, testNS, false, false, "", "")
tmpDir, err := os.MkdirTemp(os.TempDir(), "beaver-")
require.NoError(t, err)
defer func() {
@@ -209,7 +249,7 @@
testNS := "environments/ns1"
absConfigDir, err := filepath.Abs(fixtures)
require.NoError(t, err)
c := runner.NewCmdConfig(tl.Logger(), absConfigDir, testNS, false, "", "")
c := runner.NewCmdConfig(tl.Logger(), absConfigDir, testNS, false, false, "", "")
tmpDir, err := os.MkdirTemp(os.TempDir(), "beaver-")
require.NoError(t, err)
defer func() {
@@ -225,7 +265,7 @@
testNS := "environments/ns1"
absConfigDir, err := filepath.Abs(fixtures)
require.NoError(t, err)
c := runner.NewCmdConfig(tl.Logger(), absConfigDir, testNS, false, "", "")
c := runner.NewCmdConfig(tl.Logger(), absConfigDir, testNS, false, false, "", "")
tmpDir, err := os.MkdirTemp(os.TempDir(), "beaver-")
require.NoError(t, err)
defer func() {
@@ -295,7 +335,7 @@
tl := testutils.NewTestLogger(t)
absRootDir, err := filepath.Abs(disabledAsVar)
require.NoError(t, err)
c := runner.NewCmdConfig(tl.Logger(), absRootDir, tCase.TestPath, false, "", "")
c := runner.NewCmdConfig(tl.Logger(), absRootDir, tCase.TestPath, false, false, "", "")
tmpDir, err := os.MkdirTemp(os.TempDir(), "beaver-")
require.NoError(t, err)
defer func() {
@@ -357,7 +397,7 @@
tl := testutils.NewTestLogger(t)
absRootDir, err := filepath.Abs(namespaceAsVar)
require.NoError(t, err)
c := runner.NewCmdConfig(tl.Logger(), absRootDir, tCase.TestPath, false, "", "")
c := runner.NewCmdConfig(tl.Logger(), absRootDir, tCase.TestPath, false, false, "", "")
tmpDir, err := os.MkdirTemp(os.TempDir(), "beaver-")
require.NoError(t, err)
defer func() {
@@ -391,7 +431,7 @@
tl := testutils.NewTestLogger(t)
absConfigDir, err := filepath.Abs(shaFixtures)
require.NoError(t, err)
c := runner.NewCmdConfig(tl.Logger(), absConfigDir, "base", false, "", "")
c := runner.NewCmdConfig(tl.Logger(), absConfigDir, "base", false, false, "", "")
tmpDir, err := os.MkdirTemp(os.TempDir(), "beaver-")
require.NoError(t, err)
defer func() {
Loading