integration-tests: switch to go for backends to support TLS scenarios (#707)

* integration-tests: switch to go for backends to support TLS scenarios

* fix apply order

* fix duplicate port value
This commit is contained in:
Caleb Doxsey 2020-05-15 09:25:27 -06:00 committed by GitHub
parent 1cba3d50eb
commit 397d4a9f51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 198 additions and 124 deletions

View file

@ -75,15 +75,15 @@ func TestPreserveHostHeader(t *testing.T) {
defer res.Body.Close()
var result struct {
Headers map[string]string `json:"headers"`
Host string `json:"host"`
}
err = json.NewDecoder(res.Body).Decode(&result)
if !assert.NoError(t, err) {
return
}
assert.Equal(t, "httpdetails.localhost.pomerium.io", result.Headers["host"],
"destination host should be preserved")
assert.Equal(t, "httpdetails.localhost.pomerium.io", result.Host,
"destination host should be preserved in %v", result)
})
t.Run("disabled", func(t *testing.T) {
client := testcluster.NewHTTPClient()
@ -100,15 +100,15 @@ func TestPreserveHostHeader(t *testing.T) {
defer res.Body.Close()
var result struct {
Headers map[string]string `json:"headers"`
Host string `json:"host"`
}
err = json.NewDecoder(res.Body).Decode(&result)
if !assert.NoError(t, err) {
return
}
assert.NotEqual(t, "httpdetails.localhost.pomerium.io", result.Headers["host"],
"destination host should not be preserved")
assert.NotEqual(t, "httpdetails.localhost.pomerium.io", result.Host,
"destination host should not be preserved in %v", result)
})
}
@ -139,7 +139,7 @@ func TestSetRequestHeaders(t *testing.T) {
return
}
assert.Equal(t, "custom-request-header-value", result.Headers["x-custom-request-header"],
assert.Equal(t, "custom-request-header-value", result.Headers["X-Custom-Request-Header"],
"expected custom request header to be sent upstream")
}