Skip to content

Commit e326e96

Browse files
committed
Add teardown and setup of NGF and check NGF pod length is one
1 parent b5dc80e commit e326e96

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

tests/suite/graceful_recovery_test.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,16 @@ var _ = Describe("Graceful Recovery test", Ordered, Label("nfr", "graceful-recov
4848
var ngfPodName string
4949

5050
BeforeAll(func() {
51+
// this test is unique in that it will check the entire log of both ngf and nginx containers
52+
// for any errors, so in order to avoid errors generated in previous tests we will uninstall
53+
// NGF installed at the suite level, then re-deploy our own
54+
teardown(releaseName)
55+
56+
setup(getDefaultSetupCfg())
57+
5158
podNames, err := framework.GetReadyNGFPodNames(k8sClient, ngfNamespace, releaseName, timeoutConfig.GetTimeout)
5259
Expect(err).ToNot(HaveOccurred())
53-
Expect(podNames).ToNot(BeEmpty())
60+
Expect(podNames).To(HaveLen(1))
5461

5562
ngfPodName = podNames[0]
5663
})

tests/suite/system_suite_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,8 @@ var _ = BeforeSuite(func() {
247247
// - running telemetry test (NGF will be deployed as part of the test)
248248
if strings.Contains(labelFilter, "upgrade") ||
249249
strings.Contains(labelFilter, "longevity-teardown") ||
250-
strings.Contains(labelFilter, "telemetry") {
250+
strings.Contains(labelFilter, "telemetry") ||
251+
strings.Contains(labelFilter, "graceful-recovery") {
251252

252253
cfg.deploy = false
253254
}

0 commit comments

Comments
 (0)