@@ -33,15 +33,15 @@ var _ = g.Describe("[networking][router] openshift routers", func() {
33
33
err = oc .Run ("create" ).Args ("-f" , configPath ).Execute ()
34
34
o .Expect (err ).NotTo (o .HaveOccurred ())
35
35
})
36
- g .AfterEach (func () {
37
- if g .CurrentGinkgoTestDescription ().Failed {
38
- log , _ := e2e .GetPodLogs (oc .AdminKubeClient (), oc .KubeFramework ().Namespace .Name , "scoped-router" , "router" )
39
- e2e .Logf ("Router logs:\n %s" , log )
40
- }
41
- })
42
36
43
37
g .Describe ("The HAProxy router" , func () {
44
38
g .It ("should serve the correct routes when scoped to a single namespace and label set" , func () {
39
+ defer func () {
40
+ if g .CurrentGinkgoTestDescription ().Failed {
41
+ log , _ := e2e .GetPodLogs (oc .AdminKubeClient (), oc .KubeFramework ().Namespace .Name , "scoped-router" , "router" )
42
+ e2e .Logf ("Router logs:\n %s" , log )
43
+ }
44
+ }()
45
45
oc .SetOutputDir (exutil .TestContext .OutputDir )
46
46
ns := oc .KubeFramework ().Namespace .Name
47
47
execPodName := exutil .CreateExecPodOrFail (oc .AdminKubeClient ().Core (), ns , "execpod" )
@@ -83,6 +83,12 @@ var _ = g.Describe("[networking][router] openshift routers", func() {
83
83
})
84
84
85
85
g .It ("should override the route host with a custom value" , func () {
86
+ defer func () {
87
+ if g .CurrentGinkgoTestDescription ().Failed {
88
+ log , _ := e2e .GetPodLogs (oc .AdminKubeClient (), oc .KubeFramework ().Namespace .Name , "scoped-router" , "router" )
89
+ e2e .Logf ("Router logs:\n %s" , log )
90
+ }
91
+ }()
86
92
oc .SetOutputDir (exutil .TestContext .OutputDir )
87
93
ns := oc .KubeFramework ().Namespace .Name
88
94
execPodName := exutil .CreateExecPodOrFail (oc .AdminKubeClient ().Core (), ns , "execpod" )
0 commit comments