(t *testing.T)
| 138 | } |
| 139 | |
| 140 | func TestFindRouteByDomainsExactMatch(t *testing.T) { |
| 141 | ep := NewTestEntrypoint(t, nil) |
| 142 | ep.SetFindRouteDomains([]string{ |
| 143 | ".domain.com", |
| 144 | ".sub.domain.com", |
| 145 | }) |
| 146 | |
| 147 | addRoute(t, "app1.foo.bar") |
| 148 | |
| 149 | tests := []string{ |
| 150 | "app1.foo.bar", // exact match |
| 151 | "app1.foo.bar.domain.com", |
| 152 | "app1.foo.bar.sub.domain.com", |
| 153 | } |
| 154 | testsNoMatch := []string{ |
| 155 | "sub.app1.foo.bar", |
| 156 | "sub.app1.foo.bar.com", |
| 157 | "app1.domain.com", |
| 158 | "app1.sub.domain.com", |
| 159 | } |
| 160 | |
| 161 | run(t, ep, tests, testsNoMatch) |
| 162 | } |
| 163 | |
| 164 | func TestFindRouteWithPort(t *testing.T) { |
| 165 | t.Run("AnyDomain", func(t *testing.T) { |
nothing calls this directly
no test coverage detected