summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDave Henderson <dhenderson@gmail.com>2018-07-12 21:25:48 -0400
committerDave Henderson <dhenderson@gmail.com>2018-07-12 21:59:58 -0400
commit8c644937af8ec4d6ccee59ce3f45a7bff2d66a21 (patch)
tree705c7316ae022639b0f213e248e9a72f44ca05fb /test
parentc49f42f7f268a49e19db1afed4677fffeb0702a7 (diff)
Allowing datasources to be defined dynamically
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/integration/datasources_http_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/integration/datasources_http_test.go b/test/integration/datasources_http_test.go
index 546b066d..0cfba68d 100644
--- a/test/integration/datasources_http_test.go
+++ b/test/integration/datasources_http_test.go
@@ -42,4 +42,8 @@ func (s *DatasourcesHTTPSuite) TestReportsVersion(c *C) {
"-H", "foo=Foo:bar",
"-i", "{{defineDatasource `foo` `http://"+s.l.Addr().String()+"/`}}{{ index (ds `foo`).headers.Foo 0 }}")
result.Assert(c, icmd.Expected{ExitCode: 0, Out: "bar"})
+
+ result = icmd.RunCommand(GomplateBin,
+ "-i", "{{ $d := ds `http://"+s.l.Addr().String()+"/`}}{{ index (index $d.headers `Accept-Encoding`) 0 }}")
+ result.Assert(c, icmd.Expected{ExitCode: 0, Out: "gzip"})
}