diff --git a/cmd/show_test.go b/cmd/show_test.go index 924c37176771da8f6a494c1a07359cd83adfdc16..732a0bdd426645533e488c13e16dee895113f46f 100644 --- a/cmd/show_test.go +++ b/cmd/show_test.go @@ -48,6 +48,7 @@ func TestShow(t *testing.T) { "string": "bar", "notAVal": "aVal", "notAnotherVal": "aVal2", + "filevar": "foo", "array": ["one", 2, [3]], "object": {"foo": "bar"} } @@ -68,6 +69,7 @@ func TestShow(t *testing.T) { filepath.FromSlash("../testdata/test.jsonnet"), "-V", "aVar=aVal", "-V", "anVar", + "--ext-str-file", "filevar=../testdata/extvar.file", }) t.Log("output is", output) diff --git a/testdata/extvar.file b/testdata/extvar.file new file mode 100644 index 0000000000000000000000000000000000000000..19102815663d23f8b75a47e7a01965dcdc96468c --- /dev/null +++ b/testdata/extvar.file @@ -0,0 +1 @@ +foo \ No newline at end of file diff --git a/testdata/test.jsonnet b/testdata/test.jsonnet index fe1c002f5172e61cdff806a076b9a5aefdcfc7ee..0d5887e224eb44e76e999858cca2fceb22e03c18 100644 --- a/testdata/test.jsonnet +++ b/testdata/test.jsonnet @@ -1,6 +1,7 @@ local test = import "test.libsonnet"; local aVar = std.extVar("aVar"); local anVar = std.extVar("anVar"); +local filevar = std.extVar("filevar"); { apiVersion: "v1", @@ -10,6 +11,7 @@ local anVar = std.extVar("anVar"); string: "bar", notAVal : aVar, notAnotherVal : anVar, + filevar : filevar, } ], }