Skip to content

Commit b59ef51

Browse files
committed
add graceful-recovery test to pipeline
1 parent da36700 commit b59ef51

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

.github/workflows/functional.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ jobs:
119119
ngf_tag=${{ steps.ngf-meta.outputs.version }}
120120
make test${{ inputs.image == 'plus' && '-with-plus' || ''}} PREFIX=${ngf_prefix} TAG=${ngf_tag} GINKGO_LABEL=telemetry
121121
working-directory: ./tests
122-
123122
- name: Run functional tests
124123
run: |
125124
ngf_prefix=ghcr.io/nginxinc/nginx-gateway-fabric

tests/suite/graceful_recovery_test.go

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const (
2828

2929
// Since checkContainerLogsForErrors may experience interference from previous tests (as explained in the function
3030
// documentation), this test is recommended to be run separate from other nfr tests.
31-
var _ = Describe("Graceful Recovery test", Ordered, Label("nfr", "graceful-recovery"), func() {
31+
var _ = Describe("Graceful Recovery test", Ordered, Label("functional", "graceful-recovery"), func() {
3232
files := []string{
3333
"graceful-recovery/cafe.yaml",
3434
"graceful-recovery/cafe-secret.yaml",
@@ -42,10 +42,10 @@ var _ = Describe("Graceful Recovery test", Ordered, Label("nfr", "graceful-recov
4242
},
4343
}
4444

45-
teaURL := "https://cafe.example.com/tea"
46-
coffeeURL := "http://cafe.example.com/coffee"
45+
teaURI := "/tea"
46+
coffeeURI := "http://cafe.example.com/coffee"
4747

48-
var ngfPodName string
48+
var ngfPodName, teaURL, coffeeURL string
4949

5050
BeforeAll(func() {
5151
// this test is unique in that it will check the entire log of both ngf and nginx containers
@@ -60,6 +60,12 @@ var _ = Describe("Graceful Recovery test", Ordered, Label("nfr", "graceful-recov
6060
Expect(podNames).To(HaveLen(1))
6161

6262
ngfPodName = podNames[0]
63+
port := 80
64+
if portFwdPort != 0 {
65+
port = portFwdPort
66+
}
67+
teaURL = fmt.Sprintf("http://cafe.example.com:%d", port) + teaURI
68+
coffeeURL = fmt.Sprintf("http://cafe.example.com:%d", port) + coffeeURI
6369
})
6470

6571
BeforeEach(func() {

tests/suite/system_suite_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,8 @@ var _ = BeforeSuite(func() {
259259
"upgrade", // - running upgrade test (this test will deploy its own version)
260260
"longevity-teardown", // - running longevity teardown (deployment will already exist)
261261
"telemetry", // - running telemetry test (NGF will be deployed as part of the test)
262-
"graceful-recovery", // - running graceful recovery test (this test will deploy its own version)
263-
"scale", // - running scale test (this test will deploy its own version)
262+
// "graceful-recovery", // - running graceful recovery test (this test will deploy its own version)
263+
"scale", // - running scale test (this test will deploy its own version)
264264
}
265265
for _, s := range skipSubstrings {
266266
if strings.Contains(labelFilter, s) {
@@ -299,6 +299,7 @@ func isNFR(labelFilter string) bool {
299299
strings.Contains(labelFilter, "longevity") ||
300300
strings.Contains(labelFilter, "performance") ||
301301
strings.Contains(labelFilter, "upgrade") ||
302-
strings.Contains(labelFilter, "graceful-recovery") ||
302+
// graceful-recovery tests are treated as functional tests to be run in the pipeline
303+
// strings.Contains(labelFilter, "graceful-recovery") ||
303304
strings.Contains(labelFilter, "scale")
304305
}

0 commit comments

Comments
 (0)