From 6d8214bfc8eb9733f0adf58a629c77950c34e80d Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Tue, 26 Jun 2018 12:25:55 +0200 Subject: test(context): Introduce an explicit value merging test Introduces a test which will merge variables defined at every possible layer together and ensure that the loaded context configuration is as expected. The test data provides an actual resource set template that can be tested locally from a kontemplate source checkout: kontemplate template context/testdata/merging/context.yaml --var cliVar=cliVar --- context/testdata/merging/context.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 context/testdata/merging/context.yaml (limited to 'context/testdata/merging/context.yaml') diff --git a/context/testdata/merging/context.yaml b/context/testdata/merging/context.yaml new file mode 100644 index 000000000000..df30d3d8cbe3 --- /dev/null +++ b/context/testdata/merging/context.yaml @@ -0,0 +1,15 @@ +# This context file is intended to test the merge hierarchy of +# variables defined at different levels. +--- +context: merging.in.kontemplate.works +global: + globalVar: globalVar + includeVar: should be overridden (global) + cliVar: should be overridden (global) +import: + - import-vars.yaml +include: + - name: resource + values: + includeVar: includeVar + cliVar: should be overridden (include) -- cgit 1.4.1