-
-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support arbitrary headers with HTTP datasources
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
- Loading branch information
1 parent
67b2a11
commit af03642
Showing
5 changed files
with
200 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bats | ||
|
||
load helper | ||
|
||
@test "HTTP datasource with headers" { | ||
gomplate \ | ||
-d foo=http://httpbin.org/get \ | ||
-H foo=Foo:bar \ | ||
-i '{{ (datasource "foo").headers.Foo }}' | ||
[ "$status" -eq 0 ] | ||
[[ "${output}" == "bar" ]] | ||
} |