diff --git a/.github/workflows/nfr.yml b/.github/workflows/nfr.yml index 9f3cc1fd03..ee1b7c779a 100644 --- a/.github/workflows/nfr.yml +++ b/.github/workflows/nfr.yml @@ -4,11 +4,11 @@ on: workflow_dispatch: inputs: test_label: - description: NFR test to run. Choose between performance, upgrade, scale, or all + description: NFR test to run. Choose between a specific test or all tests required: true default: all type: choice - options: [performance, upgrade, scale, all] + options: [performance, upgrade, scale, zero-downtime-scale, reconfiguration, all] version: description: Version of NGF under test required: true diff --git a/tests/suite/reconfig_test.go b/tests/suite/reconfig_test.go index 4e020ccf68..d2787f3e61 100644 --- a/tests/suite/reconfig_test.go +++ b/tests/suite/reconfig_test.go @@ -24,7 +24,7 @@ import ( ) // Cluster node size must be greater than or equal to 4 for test to perform correctly. -var _ = Describe("Reconfiguration Performance Testing", Ordered, Label("reconfiguration", "nfr"), func() { +var _ = Describe("Reconfiguration Performance Testing", Ordered, Label("nfr", "reconfiguration"), func() { const ( // used for cleaning up resources maxResourceCount = 150 @@ -627,7 +627,6 @@ const reconfigResultTemplate = ` {{- range .EventsBuckets }} - {{ .Le }}ms: {{ .Val }} {{- end }} - ` func writeReconfigResults(dest io.Writer, results reconfigTestResults) error { diff --git a/tests/suite/scale_test.go b/tests/suite/scale_test.go index 80a3a010a7..79a682b81c 100644 --- a/tests/suite/scale_test.go +++ b/tests/suite/scale_test.go @@ -187,7 +187,7 @@ The logs are attached only if there are errors. Expect(err).ToNot(HaveOccurred()) logLines := strings.Split(logs, "\n") - errors := 0 + var errors []string outer: for _, line := range logLines { @@ -198,22 +198,24 @@ The logs are attached only if there are errors. } for _, substr := range substrings { if strings.Contains(line, substr) { - errors++ + errors = append(errors, line) continue outer } } } - // attach full logs - if errors > 0 { + // attach error logs + if len(errors) > 0 { f, err := os.Create(fileName) Expect(err).ToNot(HaveOccurred()) defer f.Close() - _, err = io.WriteString(f, logs) - Expect(err).ToNot(HaveOccurred()) + for _, e := range errors { + _, err = io.WriteString(f, fmt.Sprintf("%s\n", e)) + Expect(err).ToNot(HaveOccurred()) + } } - return errors + return len(errors) } runTestWithMetricsAndLogs := func(testName, testResultsDir string, test func()) { @@ -797,7 +799,7 @@ var _ = Describe("Zero downtime scale test", Ordered, Label("nfr", "zero-downtim }) AfterAll(func() { - _, err := fmt.Fprintln(outFile) + _, err := fmt.Fprint(outFile) Expect(err).ToNot(HaveOccurred()) Expect(outFile.Close()).To(Succeed())