Skip to content

Commit 962f253

Browse files
committed
Elaborate on test description
1 parent 7a79f6d commit 962f253

File tree

1 file changed

+22
-11
lines changed

1 file changed

+22
-11
lines changed

tests/suite/reconfig_test.go

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,6 @@ var _ = Describe("Reconfiguration Performance Testing", Ordered, Label("reconfig
261261
// timestamp to the next NGINX configuration update. When it reaches the NGINX configuration update line,
262262
// it will reset the reconciling log line and set it to the next reconciling log line.
263263
for _, line := range strings.Split(ngfLogs, "\n") {
264-
// can't just do this line, need to do gateway specific resources
265264
if reconcilingLine == "" &&
266265
strings.Contains(line, "Reconciling the resource\",\"controller\"") &&
267266
strings.Contains(line, "\"controllerGroup\":\"gateway.networking.k8s.io\"") {
@@ -359,7 +358,7 @@ var _ = Describe("Reconfiguration Performance Testing", Ordered, Label("reconfig
359358
}
360359

361360
collectMetrics := func(
362-
testName string,
361+
testDescription string,
363362
resourceCount int,
364363
timeToReadyStartingLogSubstring string,
365364
ngfPodName string,
@@ -431,7 +430,7 @@ var _ = Describe("Reconfiguration Performance Testing", Ordered, Label("reconfig
431430
Expect(err).ToNot(HaveOccurred())
432431

433432
results := reconfigTestResults{
434-
Name: testName,
433+
TestDescription: testDescription,
435434
EventsBuckets: eventsBuckets,
436435
ReloadBuckets: reloadBuckets,
437436
NumResources: resourceCount,
@@ -448,6 +447,8 @@ var _ = Describe("Reconfiguration Performance Testing", Ordered, Label("reconfig
448447
}
449448

450449
When("resources exist before startup", func() {
450+
testDescription := "Test 1: Resources exist before startup"
451+
451452
It("gathers metrics after creating 30 resources", func() {
452453
resourceCount := 30
453454
timeToReadyStartingLogSubstring := "Starting NGINX Gateway Fabric"
@@ -458,7 +459,8 @@ var _ = Describe("Reconfiguration Performance Testing", Ordered, Label("reconfig
458459

459460
ngfPodName, startTime := deployNGFReturnsNGFPodNameAndStartTime()
460461

461-
collectMetrics("1",
462+
collectMetrics(
463+
testDescription,
462464
resourceCount,
463465
timeToReadyStartingLogSubstring,
464466
ngfPodName,
@@ -476,7 +478,8 @@ var _ = Describe("Reconfiguration Performance Testing", Ordered, Label("reconfig
476478

477479
ngfPodName, startTime := deployNGFReturnsNGFPodNameAndStartTime()
478480

479-
collectMetrics("1",
481+
collectMetrics(
482+
testDescription,
480483
resourceCount,
481484
timeToReadyStartingLogSubstring,
482485
ngfPodName,
@@ -486,6 +489,8 @@ var _ = Describe("Reconfiguration Performance Testing", Ordered, Label("reconfig
486489
})
487490

488491
When("NGF and Gateway resource are deployed first", func() {
492+
testDescription := "Test 2: Start NGF, deploy Gateway, create many resources attached to GW"
493+
489494
It("gathers metrics after creating 30 resources", func() {
490495
resourceCount := 30
491496
timeToReadyStartingLogSubstring := "Reconciling the resource\",\"controller\":\"httproute\""
@@ -496,7 +501,8 @@ var _ = Describe("Reconfiguration Performance Testing", Ordered, Label("reconfig
496501
Expect(test).To(Succeed())
497502
Expect(checkResourceCreation(resourceCount)).To(Succeed())
498503

499-
collectMetrics("2",
504+
collectMetrics(
505+
testDescription,
500506
resourceCount,
501507
timeToReadyStartingLogSubstring,
502508
ngfPodName,
@@ -514,7 +520,8 @@ var _ = Describe("Reconfiguration Performance Testing", Ordered, Label("reconfig
514520
Expect(test).To(Succeed())
515521
Expect(checkResourceCreation(resourceCount)).To(Succeed())
516522

517-
collectMetrics("2",
523+
collectMetrics(
524+
testDescription,
518525
resourceCount,
519526
timeToReadyStartingLogSubstring,
520527
ngfPodName,
@@ -524,6 +531,8 @@ var _ = Describe("Reconfiguration Performance Testing", Ordered, Label("reconfig
524531
})
525532

526533
When("NGF and resources are deployed first", func() {
534+
testDescription := "Test 3: Start NGF, create many resources attached to a Gateway, deploy the Gateway"
535+
527536
It("gathers metrics after creating 30 resources", func() {
528537
resourceCount := 30
529538
timeToReadyStartingLogSubstring := "Reconciling the resource\",\"controller\":\"gateway\""
@@ -534,7 +543,8 @@ var _ = Describe("Reconfiguration Performance Testing", Ordered, Label("reconfig
534543
Expect(test).To(Succeed())
535544
Expect(checkResourceCreation(resourceCount)).To(Succeed())
536545

537-
collectMetrics("3",
546+
collectMetrics(
547+
testDescription,
538548
resourceCount,
539549
timeToReadyStartingLogSubstring,
540550
ngfPodName,
@@ -552,7 +562,8 @@ var _ = Describe("Reconfiguration Performance Testing", Ordered, Label("reconfig
552562
Expect(test).To(Succeed())
553563
Expect(checkResourceCreation(resourceCount)).To(Succeed())
554564

555-
collectMetrics("3",
565+
collectMetrics(
566+
testDescription,
556567
resourceCount,
557568
timeToReadyStartingLogSubstring,
558569
ngfPodName,
@@ -579,7 +590,7 @@ var _ = Describe("Reconfiguration Performance Testing", Ordered, Label("reconfig
579590
})
580591

581592
type reconfigTestResults struct {
582-
Name string
593+
TestDescription string
583594
TimeToReadyTotal string
584595
TimeToReadyAvgSingle string
585596
EventsBuckets []framework.Bucket
@@ -592,7 +603,7 @@ type reconfigTestResults struct {
592603
}
593604

594605
const reconfigResultTemplate = `
595-
## Test {{ .Name }} NumResources {{ .NumResources }}
606+
## {{ .TestDescription }} - NumResources {{ .NumResources }}
596607
597608
### Reloads and Time to Ready
598609

0 commit comments

Comments
 (0)