@@ -48,18 +48,27 @@ func (s *testingSuite) SetupSuite() {
48
48
s .testInstallation .Assertions .EventuallyPodsRunning (s .ctx , testdefaults .CurlPod .GetNamespace (), metav1.ListOptions {
49
49
LabelSelector : "app=curl" ,
50
50
})
51
+ s .testInstallation .Assertions .EventuallyObjectsExist (s .ctx , proxyService , proxyDeployment )
52
+ s .testInstallation .Assertions .EventuallyPodsRunning (s .ctx , proxyDeployment .ObjectMeta .GetNamespace (), metav1.ListOptions {
53
+ LabelSelector : "app.kubernetes.io/name=gloo-proxy-gw" ,
54
+ })
51
55
52
56
// include gateway manifests for the tests, so we recreate it for each test run
53
57
s .manifests = map [string ][]string {
54
- "TestConfigureHttpListenerOptions" : {gatewayManifest , basicLisOptManifest },
55
- "TestConfigureNotAttachedHttpListenerOptions" : {gatewayManifest , notAttachedLisOptManifest },
58
+ "TestConfigureHttpListenerOptions" : {basicLisOptManifest },
59
+ "TestConfigureNotAttachedHttpListenerOptions" : {notAttachedLisOptManifest },
56
60
}
57
61
}
58
62
59
63
func (s * testingSuite ) TearDownSuite () {
60
64
// Check that the common setup manifest is deleted
61
65
output , err := s .testInstallation .Actions .Kubectl ().DeleteFileWithOutput (s .ctx , setupManifest )
62
66
s .testInstallation .Assertions .ExpectObjectDeleted (setupManifest , err , output )
67
+
68
+ s .testInstallation .Assertions .EventuallyObjectsNotExist (s .ctx , proxyService , proxyDeployment )
69
+ s .testInstallation .Assertions .EventuallyPodsNotExist (s .ctx , proxyDeployment .ObjectMeta .GetNamespace (), metav1.ListOptions {
70
+ LabelSelector : "app.kubernetes.io/name=gloo-proxy-gw" ,
71
+ })
63
72
}
64
73
65
74
func (s * testingSuite ) BeforeTest (suiteName , testName string ) {
@@ -72,13 +81,6 @@ func (s *testingSuite) BeforeTest(suiteName, testName string) {
72
81
err := s .testInstallation .Actions .Kubectl ().ApplyFile (s .ctx , manifest )
73
82
s .Assert ().NoError (err , "can apply manifest " + manifest )
74
83
}
75
-
76
- // we recreate the `Gateway` resource (and thus dynamically provision the proxy pod) for each test run
77
- // so let's assert the proxy svc and pod is ready before moving on
78
- s .testInstallation .Assertions .EventuallyObjectsExist (s .ctx , proxyService , proxyDeployment )
79
- s .testInstallation .Assertions .EventuallyPodsRunning (s .ctx , proxyDeployment .ObjectMeta .GetNamespace (), metav1.ListOptions {
80
- LabelSelector : "app.kubernetes.io/name=gloo-proxy-gw" ,
81
- })
82
84
}
83
85
84
86
func (s * testingSuite ) AfterTest (suiteName , testName string ) {
@@ -91,10 +93,6 @@ func (s *testingSuite) AfterTest(suiteName, testName string) {
91
93
output , err := s .testInstallation .Actions .Kubectl ().DeleteFileWithOutput (s .ctx , manifest )
92
94
s .testInstallation .Assertions .ExpectObjectDeleted (manifest , err , output )
93
95
}
94
- s .testInstallation .Assertions .EventuallyObjectsNotExist (s .ctx , proxyService , proxyDeployment )
95
- s .testInstallation .Assertions .EventuallyPodsNotExist (s .ctx , proxyDeployment .ObjectMeta .GetNamespace (), metav1.ListOptions {
96
- LabelSelector : "app.kubernetes.io/name=gloo-proxy-gw" ,
97
- })
98
96
}
99
97
100
98
func (s * testingSuite ) TestConfigureHttpListenerOptions () {
0 commit comments