(t *testing.T)
| 246 | } |
| 247 | |
| 248 | func TestDetectsOpenShiftRouteSuffix(t *testing.T) { |
| 249 | setupForTest(t) |
| 250 | infrastructure.InitializeForTesting(infrastructure.OpenShiftv4) |
| 251 | testRoute := &routev1.Route{ |
| 252 | ObjectMeta: metav1.ObjectMeta{ |
| 253 | Name: openShiftTestRouteName, |
| 254 | Namespace: testNamespace, |
| 255 | }, |
| 256 | Spec: routev1.RouteSpec{ |
| 257 | Host: "test-host", |
| 258 | }, |
| 259 | } |
| 260 | client := fake.NewClientBuilder().WithScheme(scheme).WithObjects(testRoute).Build() |
| 261 | err := SetupControllerConfig(client) |
| 262 | if !assert.NoError(t, err, "Should not return error") { |
| 263 | return |
| 264 | } |
| 265 | assert.Equal(t, "test-host", internalConfig.Routing.ClusterHostSuffix, "Should determine host suffix with route on OpenShift") |
| 266 | } |
| 267 | |
| 268 | func TestSyncConfigFromIgnoresOtherConfigInOtherNamespaces(t *testing.T) { |
| 269 | setupForTest(t) |
nothing calls this directly
no test coverage detected