Merge branch 'v1.5' into master
This commit is contained in:
commit
c84fb9895e
35 changed files with 462 additions and 124 deletions
|
@ -137,18 +137,21 @@ func TestLoadIngresses(t *testing.T) {
|
|||
),
|
||||
frontends(
|
||||
frontend("foo/bar",
|
||||
headers(),
|
||||
passHostHeader(),
|
||||
routes(
|
||||
route("/bar", "PathPrefix:/bar"),
|
||||
route("foo", "Host:foo")),
|
||||
),
|
||||
frontend("foo/namedthing",
|
||||
headers(),
|
||||
passHostHeader(),
|
||||
routes(
|
||||
route("/namedthing", "PathPrefix:/namedthing"),
|
||||
route("foo", "Host:foo")),
|
||||
),
|
||||
frontend("bar",
|
||||
headers(),
|
||||
passHostHeader(),
|
||||
routes(route("bar", "Host:bar")),
|
||||
),
|
||||
|
@ -222,6 +225,7 @@ func TestRuleType(t *testing.T) {
|
|||
require.NoError(t, err, "error loading ingresses")
|
||||
|
||||
expected := buildFrontends(frontend("host/path",
|
||||
headers(),
|
||||
routes(
|
||||
route("/path", fmt.Sprintf("%s:/path", test.frontendRuleType)),
|
||||
route("host", "Host:host")),
|
||||
|
@ -267,6 +271,7 @@ func TestGetPassHostHeader(t *testing.T) {
|
|||
backends(backend("foo/bar", lbMethod("wrr"), servers())),
|
||||
frontends(
|
||||
frontend("foo/bar",
|
||||
headers(),
|
||||
routes(
|
||||
route("/bar", "PathPrefix:/bar"),
|
||||
route("foo", "Host:foo")),
|
||||
|
@ -310,6 +315,7 @@ func TestGetPassTLSCert(t *testing.T) {
|
|||
expected := buildConfiguration(
|
||||
backends(backend("foo/bar", lbMethod("wrr"), servers())),
|
||||
frontends(frontend("foo/bar",
|
||||
headers(),
|
||||
passHostHeader(),
|
||||
passTLSCert(),
|
||||
routes(
|
||||
|
@ -364,6 +370,7 @@ func TestOnlyReferencesServicesFromOwnNamespace(t *testing.T) {
|
|||
expected := buildConfiguration(
|
||||
backends(backend("foo", lbMethod("wrr"), servers())),
|
||||
frontends(frontend("foo",
|
||||
headers(),
|
||||
passHostHeader(),
|
||||
routes(route("foo", "Host:foo")),
|
||||
)),
|
||||
|
@ -405,7 +412,9 @@ func TestHostlessIngress(t *testing.T) {
|
|||
|
||||
expected := buildConfiguration(
|
||||
backends(backend("/bar", lbMethod("wrr"), servers())),
|
||||
frontends(frontend("/bar", routes(route("/bar", "PathPrefix:/bar")))),
|
||||
frontends(frontend("/bar",
|
||||
headers(),
|
||||
routes(route("/bar", "PathPrefix:/bar")))),
|
||||
)
|
||||
|
||||
assert.Equal(t, expected, actual)
|
||||
|
@ -503,12 +512,14 @@ func TestServiceAnnotations(t *testing.T) {
|
|||
),
|
||||
frontends(
|
||||
frontend("foo/bar",
|
||||
headers(),
|
||||
passHostHeader(),
|
||||
routes(
|
||||
route("/bar", "PathPrefix:/bar"),
|
||||
route("foo", "Host:foo")),
|
||||
),
|
||||
frontend("bar",
|
||||
headers(),
|
||||
passHostHeader(),
|
||||
routes(route("bar", "Host:bar"))),
|
||||
),
|
||||
|
@ -712,17 +723,20 @@ func TestIngressAnnotations(t *testing.T) {
|
|||
),
|
||||
frontends(
|
||||
frontend("foo/bar",
|
||||
headers(),
|
||||
routes(
|
||||
route("/bar", "PathPrefix:/bar"),
|
||||
route("foo", "Host:foo")),
|
||||
),
|
||||
frontend("other/stuff",
|
||||
headers(),
|
||||
passHostHeader(),
|
||||
routes(
|
||||
route("/stuff", "PathPrefix:/stuff"),
|
||||
route("other", "Host:other")),
|
||||
),
|
||||
frontend("other/",
|
||||
headers(),
|
||||
passHostHeader(),
|
||||
entryPoints("http", "https"),
|
||||
routes(
|
||||
|
@ -730,6 +744,7 @@ func TestIngressAnnotations(t *testing.T) {
|
|||
route("other", "Host:other")),
|
||||
),
|
||||
frontend("other/sslstuff",
|
||||
headers(),
|
||||
passHostHeader(),
|
||||
passTLSCert(),
|
||||
routes(
|
||||
|
@ -737,6 +752,7 @@ func TestIngressAnnotations(t *testing.T) {
|
|||
route("other", "Host:other")),
|
||||
),
|
||||
frontend("other/sslstuff",
|
||||
headers(),
|
||||
passHostHeader(),
|
||||
passTLSCert(),
|
||||
routes(
|
||||
|
@ -744,6 +760,7 @@ func TestIngressAnnotations(t *testing.T) {
|
|||
route("other", "Host:other")),
|
||||
),
|
||||
frontend("basic/auth",
|
||||
headers(),
|
||||
passHostHeader(),
|
||||
basicAuth("myUser:myEncodedPW"),
|
||||
routes(
|
||||
|
@ -751,6 +768,7 @@ func TestIngressAnnotations(t *testing.T) {
|
|||
route("basic", "Host:basic")),
|
||||
),
|
||||
frontend("redirect/https",
|
||||
headers(),
|
||||
passHostHeader(),
|
||||
redirectEntryPoint("https"),
|
||||
routes(
|
||||
|
@ -758,6 +776,7 @@ func TestIngressAnnotations(t *testing.T) {
|
|||
route("redirect", "Host:redirect")),
|
||||
),
|
||||
frontend("test/whitelist-source-range",
|
||||
headers(),
|
||||
passHostHeader(),
|
||||
whitelistSourceRange("1.1.1.1/24", "1234:abcd::42/32"),
|
||||
routes(
|
||||
|
@ -765,6 +784,7 @@ func TestIngressAnnotations(t *testing.T) {
|
|||
route("test", "Host:test")),
|
||||
),
|
||||
frontend("rewrite/api",
|
||||
headers(),
|
||||
passHostHeader(),
|
||||
routes(
|
||||
route("/api", "PathPrefix:/api;ReplacePath:/"),
|
||||
|
@ -824,6 +844,7 @@ func TestPriorityHeaderValue(t *testing.T) {
|
|||
),
|
||||
frontends(
|
||||
frontend("foo/bar",
|
||||
headers(),
|
||||
passHostHeader(),
|
||||
priority(1337),
|
||||
routes(
|
||||
|
@ -882,6 +903,7 @@ func TestInvalidPassTLSCertValue(t *testing.T) {
|
|||
),
|
||||
frontends(
|
||||
frontend("foo/bar",
|
||||
headers(),
|
||||
passHostHeader(),
|
||||
routes(
|
||||
route("/bar", "PathPrefix:/bar"),
|
||||
|
@ -939,6 +961,7 @@ func TestInvalidPassHostHeaderValue(t *testing.T) {
|
|||
),
|
||||
frontends(
|
||||
frontend("foo/bar",
|
||||
headers(),
|
||||
passHostHeader(),
|
||||
routes(
|
||||
route("/bar", "PathPrefix:/bar"),
|
||||
|
@ -1112,14 +1135,17 @@ func TestMissingResources(t *testing.T) {
|
|||
),
|
||||
frontends(
|
||||
frontend("fully_working",
|
||||
headers(),
|
||||
passHostHeader(),
|
||||
routes(route("fully_working", "Host:fully_working")),
|
||||
),
|
||||
frontend("missing_endpoints",
|
||||
headers(),
|
||||
passHostHeader(),
|
||||
routes(route("missing_endpoints", "Host:missing_endpoints")),
|
||||
),
|
||||
frontend("missing_endpoint_subsets",
|
||||
headers(),
|
||||
passHostHeader(),
|
||||
routes(route("missing_endpoint_subsets", "Host:missing_endpoint_subsets")),
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue