Skip to content
Snippets Groups Projects
Commit b9b50f0a authored by Ted Hahn's avatar Ted Hahn
Browse files

Add extvar to test.

parent 4a510378
No related branches found
No related tags found
No related merge requests found
......@@ -45,6 +45,7 @@ func TestShow(t *testing.T) {
"bool": true,
"number": 42,
"string": "bar",
"notAVal": "aVal",
"array": ["one", 2, [3]],
"object": {"foo": "bar"}
}
......@@ -60,6 +61,7 @@ func TestShow(t *testing.T) {
"-J", filepath.FromSlash("../testdata/lib"),
"-o", format,
filepath.FromSlash("../testdata/test.jsonnet"),
"-V", "aVar=aVal",
})
t.Log("output is", output)
......
local test = import "test.libsonnet";
local aVar = std.extVar("aVar");
{
apiVersion: "v1",
......@@ -6,6 +7,7 @@ local test = import "test.libsonnet";
items: [
test {
string: "bar",
notAVal : aVar,
}
],
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment