Skip to content
This repository was archived by the owner on Jan 21, 2020. It is now read-only.

Commit 9dfe658

Browse files
author
David Chung
authored
fix broken build due to change in backend behavior (#540)
Signed-off-by: David Chung <[email protected]>
1 parent 3ab2ec5 commit 9dfe658

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

pkg/template/integration_test.go

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,35 @@ func TestSourceWithHeaders(t *testing.T) {
286286
any := types.AnyString(view)
287287
headers := map[string]interface{}{}
288288
require.NoError(t, any.Decode(&headers))
289+
290+
// Looks like httpbin.org's handling of repeating headers has changed:
291+
//
292+
// $ curl -i -H "A:B" -H "Foo:Bar" -H "Foo:Bar" https://httpbin.org/headers
293+
// HTTP/1.1 200 OK
294+
// Connection: keep-alive
295+
// Server: meinheld/0.6.1
296+
// Date: Thu, 11 May 2017 18:50:08 GMT
297+
// Content-Type: application/json
298+
// Access-Control-Allow-Origin: *
299+
// Access-Control-Allow-Credentials: true
300+
// X-Powered-By: Flask
301+
// X-Processed-Time: 0.000694990158081
302+
// Content-Length: 167
303+
// Via: 1.1 vegur
304+
305+
// {
306+
// "headers": {
307+
// "A": "B",
308+
// "Accept": "*/*",
309+
// "Connection": "close",
310+
// "Foo": "Bar",
311+
// "Host": "httpbin.org",
312+
// "User-Agent": "curl/7.43.0"
313+
// }
314+
// }
315+
289316
require.Equal(t, map[string]interface{}{
290-
"Foo": "Bar,Bar",
317+
"Foo": "Bar",
291318
"Host": "httpbin.org",
292319
"User-Agent": "Go-http-client/1.1",
293320
"A": "B",

0 commit comments

Comments
 (0)