(t *testing.T)
| 112 | } |
| 113 | |
| 114 | func TestFindRouteByDomains(t *testing.T) { |
| 115 | ep := NewTestEntrypoint(t, nil) |
| 116 | ep.SetFindRouteDomains([]string{ |
| 117 | ".domain.com", |
| 118 | ".sub.domain.com", |
| 119 | }) |
| 120 | |
| 121 | addRoute(t, "app1") |
| 122 | |
| 123 | tests := []string{ |
| 124 | "app1.domain.com", |
| 125 | "app1.sub.domain.com", |
| 126 | } |
| 127 | testsNoMatch := []string{ |
| 128 | "sub.app1.com", |
| 129 | "app1.com", |
| 130 | "app1.domain.co", |
| 131 | "app1.domain.com.hk", |
| 132 | "app1.sub.domain.co", |
| 133 | "app2.domain.com", |
| 134 | "app2.sub.domain.com", |
| 135 | } |
| 136 | |
| 137 | run(t, ep, tests, testsNoMatch) |
| 138 | } |
| 139 | |
| 140 | func TestFindRouteByDomainsExactMatch(t *testing.T) { |
| 141 | ep := NewTestEntrypoint(t, nil) |
nothing calls this directly
no test coverage detected