Simplify x-forwarded-prefix annotation

This commit is contained in:
Alex Kursell 2019-03-11 12:23:14 -04:00
parent 1ed1dd588a
commit 188295550c
7 changed files with 106 additions and 22 deletions

View file

@ -35,13 +35,13 @@ func TestParse(t *testing.T) {
testCases := []struct {
annotations map[string]string
expected bool
expected string
}{
{map[string]string{annotation: "true"}, true},
{map[string]string{annotation: "1"}, true},
{map[string]string{annotation: ""}, false},
{map[string]string{}, false},
{nil, false},
{map[string]string{annotation: "true"}, "true"},
{map[string]string{annotation: "1"}, "1"},
{map[string]string{annotation: ""}, ""},
{map[string]string{}, ""},
{nil, ""},
}
ing := &extensions.Ingress{