diff --git a/template/parse_test.go b/template/parse_test.go index 46bb75ad8..9abca2f77 100644 --- a/template/parse_test.go +++ b/template/parse_test.go @@ -174,6 +174,40 @@ func TestParse(t *testing.T) { false, }, + { + "parse-pp-only.json", + &Template{ + PostProcessors: [][]*PostProcessor{ + []*PostProcessor{ + &PostProcessor{ + Type: "foo", + OnlyExcept: OnlyExcept{ + Only: []string{"bar"}, + }, + }, + }, + }, + }, + false, + }, + + { + "parse-pp-except.json", + &Template{ + PostProcessors: [][]*PostProcessor{ + []*PostProcessor{ + &PostProcessor{ + Type: "foo", + OnlyExcept: OnlyExcept{ + Except: []string{"bar"}, + }, + }, + }, + }, + }, + false, + }, + { "parse-pp-string.json", &Template{ diff --git a/template/test-fixtures/parse-pp-except.json b/template/test-fixtures/parse-pp-except.json new file mode 100644 index 000000000..dea70d3d3 --- /dev/null +++ b/template/test-fixtures/parse-pp-except.json @@ -0,0 +1,8 @@ +{ + "post-processors": [ + { + "type": "foo", + "except": ["bar"] + } + ] +} diff --git a/template/test-fixtures/parse-pp-only.json b/template/test-fixtures/parse-pp-only.json new file mode 100644 index 000000000..d2dbe07c6 --- /dev/null +++ b/template/test-fixtures/parse-pp-only.json @@ -0,0 +1,8 @@ +{ + "post-processors": [ + { + "type": "foo", + "only": ["bar"] + } + ] +}