Update nginx (#4150)

* Update nginx image
* Fix IPV6 test issues in Prow
This commit is contained in:
Manuel Alejandro de Brito Fontes 2019-06-04 12:15:03 -04:00 committed by GitHub
parent d08b8844a1
commit 14a394fc9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 19 additions and 6 deletions

View file

@ -61,7 +61,8 @@ func TestStore(t *testing.T) {
t.Fatalf("error: %v", err)
}
defer te.Stop()
// TODO: this defer is called after any error (even the expected ones)
// defer te.Stop()
clientSet, err := kubernetes.NewForConfig(cfg)
if err != nil {

View file

@ -72,6 +72,7 @@ func TestMergeConfigMapToStruct(t *testing.T) {
"nginx-status-ipv4-whitelist": "127.0.0.1,10.0.0.0/24",
"nginx-status-ipv6-whitelist": "::1,2001::/16",
"proxy-add-original-uri-header": "false",
"disable-ipv6-dns": "true",
}
def := config.NewDefault()
def.CustomHTTPErrors = []int{300, 400}
@ -94,6 +95,8 @@ func TestMergeConfigMapToStruct(t *testing.T) {
def.NginxStatusIpv6Whitelist = []string{"::1", "2001::/16"}
def.ProxyAddOriginalURIHeader = false
def.DisableIpv6DNS = true
hash, err := hashstructure.Hash(def, &hashstructure.HashOptions{
TagName: "json",
})
@ -121,6 +124,8 @@ func TestMergeConfigMapToStruct(t *testing.T) {
}
def = config.NewDefault()
def.DisableIpv6DNS = true
hash, err = hashstructure.Hash(def, &hashstructure.HashOptions{
TagName: "json",
})
@ -129,13 +134,16 @@ func TestMergeConfigMapToStruct(t *testing.T) {
}
def.Checksum = fmt.Sprintf("%v", hash)
to = ReadConfig(map[string]string{})
to = ReadConfig(map[string]string{
"disable-ipv6-dns": "true",
})
if diff := pretty.Compare(to, def); diff != "" {
t.Errorf("unexpected diff: (-got +want)\n%s", diff)
}
def = config.NewDefault()
def.WhitelistSourceRange = []string{"1.1.1.1/32"}
def.DisableIpv6DNS = true
hash, err = hashstructure.Hash(def, &hashstructure.HashOptions{
TagName: "json",
@ -147,6 +155,7 @@ func TestMergeConfigMapToStruct(t *testing.T) {
to = ReadConfig(map[string]string{
"whitelist-source-range": "1.1.1.1/32",
"disable-ipv6-dns": "true",
})
if diff := pretty.Compare(to, def); diff != "" {

View file

@ -59,9 +59,12 @@ func TestIsPortAvailable(t *testing.T) {
}
}
/*
// TODO: this test should be optional or running behind a flag
func TestIsIPv6Enabled(t *testing.T) {
isEnabled := IsIPv6Enabled()
if !isEnabled {
t.Fatalf("expected IPV6 be enabled")
}
}
*/