Skip to content

Commit

Permalink
Refactor upstream test name to include both OSS and Plus server count
Browse files Browse the repository at this point in the history
  • Loading branch information
bjee19 committed Aug 23, 2024
1 parent cb98e79 commit 957568f
Showing 1 changed file with 18 additions and 31 deletions.
49 changes: 18 additions & 31 deletions tests/suite/scale_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -571,37 +571,24 @@ The logs are attached only if there are errors.
},
)
})
if upstreamServerCount == ossUpstreamServerCount {
It(fmt.Sprintf("scales upstream servers to %d", ossUpstreamServerCount), func() {
const testName = "TestScale_UpstreamServers"

testResultsDir := filepath.Join(resultsDir, testName)
Expect(os.MkdirAll(testResultsDir, 0o755)).To(Succeed())

runTestWithMetricsAndLogs(
testName,
testResultsDir,
func() {
runScaleUpstreams()
},
)
})
} else {
It(fmt.Sprintf("scales upstream servers to %d", plusUpstreamServerCount), func() {
const testName = "TestScale_UpstreamServers"

testResultsDir := filepath.Join(resultsDir, testName)
Expect(os.MkdirAll(testResultsDir, 0o755)).To(Succeed())

runTestWithMetricsAndLogs(
testName,
testResultsDir,
func() {
runScaleUpstreams()
},
)
})
}

It(fmt.Sprintf("scales upstream servers to %d for OSS and %d for Plus",
ossUpstreamServerCount,
plusUpstreamServerCount,
), func() {
const testName = "TestScale_UpstreamServers"

testResultsDir := filepath.Join(resultsDir, testName)
Expect(os.MkdirAll(testResultsDir, 0o755)).To(Succeed())

runTestWithMetricsAndLogs(
testName,
testResultsDir,
func() {
runScaleUpstreams()
},
)
})

It("scales HTTP matches", func() {
const testName = "TestScale_HTTPMatches"
Expand Down

0 comments on commit 957568f

Please sign in to comment.