@@ -39,20 +39,28 @@ var _ = g.Describe("[Conformance][Area:Networking][Feature:Router]", func() {
39
39
if routes , _ := client .List (metav1.ListOptions {}); routes != nil {
40
40
outputIngress (routes .Items ... )
41
41
}
42
- exutil .DumpPodLogsStartingWith ("scoped- router" , oc )
42
+ exutil .DumpPodLogsStartingWith ("router- " , oc )
43
43
}
44
44
})
45
45
46
- oc = exutil .NewCLI ("scoped- router" , exutil .KubeConfigPath ())
46
+ oc = exutil .NewCLI ("router-scoped " , exutil .KubeConfigPath ())
47
47
48
48
g .BeforeEach (func () {
49
49
ns = oc .Namespace ()
50
50
51
- imagePrefix := os .Getenv ("OS_IMAGE_PREFIX" )
52
- if len (imagePrefix ) == 0 {
53
- imagePrefix = "openshift/origin"
51
+ image := os .Getenv ("OS_IMAGE_PREFIX" )
52
+ if len (image ) == 0 {
53
+ image = "openshift/origin"
54
54
}
55
- err := oc .AsAdmin ().Run ("new-app" ).Args ("-f" , configPath , "-p" , "IMAGE=" + imagePrefix + "-haproxy-router" ).Execute ()
55
+ image += "-haproxy-router"
56
+
57
+ if dc , err := oc .AdminAppsClient ().Apps ().DeploymentConfigs ("default" ).Get ("router" , metav1.GetOptions {}); err == nil {
58
+ if len (dc .Spec .Template .Spec .Containers ) > 0 && dc .Spec .Template .Spec .Containers [0 ].Image != "" {
59
+ image = dc .Spec .Template .Spec .Containers [0 ].Image
60
+ }
61
+ }
62
+
63
+ err := oc .AsAdmin ().Run ("new-app" ).Args ("-f" , configPath , "-p" , "IMAGE=" + image ).Execute ()
56
64
o .Expect (err ).NotTo (o .HaveOccurred ())
57
65
})
58
66
@@ -67,7 +75,7 @@ var _ = g.Describe("[Conformance][Area:Networking][Feature:Router]", func() {
67
75
68
76
var routerIP string
69
77
err := wait .Poll (time .Second , changeTimeoutSeconds * time .Second , func () (bool , error ) {
70
- pod , err := oc .KubeFramework ().ClientSet .CoreV1 ().Pods (oc .KubeFramework ().Namespace .Name ).Get ("scoped- router" , metav1.GetOptions {})
78
+ pod , err := oc .KubeFramework ().ClientSet .CoreV1 ().Pods (oc .KubeFramework ().Namespace .Name ).Get ("router-scoped " , metav1.GetOptions {})
71
79
if err != nil {
72
80
return false , err
73
81
}
0 commit comments