(t *testing.T, alias string)
| 18 | const testHTTPRouteListenPort = 18080 |
| 19 | |
| 20 | func addRoute(t *testing.T, alias string) { |
| 21 | t.Helper() |
| 22 | |
| 23 | ep := entrypoint.FromCtx(task.GetTestTask(t).Context()) |
| 24 | require.NotNil(t, ep) |
| 25 | |
| 26 | startedRoute, err := route.NewStartedTestRoute(t, &route.Route{ |
| 27 | Alias: alias, |
| 28 | Scheme: routeTypes.SchemeHTTP, |
| 29 | Port: route.Port{ |
| 30 | Listening: testHTTPRouteListenPort, |
| 31 | Proxy: 8080, |
| 32 | }, |
| 33 | HealthCheck: types.HealthCheckConfig{ |
| 34 | Disable: true, |
| 35 | }, |
| 36 | }) |
| 37 | if err != nil { |
| 38 | t.Fatal(err) |
| 39 | } |
| 40 | |
| 41 | route, ok := ep.HTTPRoutes().Get(startedRoute.Key()) |
| 42 | require.True(t, ok, "route not found") |
| 43 | require.NotNil(t, route) |
| 44 | } |
| 45 | |
| 46 | func run(t *testing.T, ep *Entrypoint, match []string, noMatch []string) { |
| 47 | t.Helper() |
no test coverage detected