Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions tests/e2e/koperator_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package e2e

import (
"fmt"
"testing"

"github.com/gruntwork-io/terratest/modules/k8s"
Expand All @@ -31,6 +32,21 @@ func TestKoperator(t *testing.T) {
ginkgo.RunSpecs(t, "Koperator end to end test suite")
}

// totalSpecsToRun and completedSpecCount back the "[k/N]" progress line printed after each spec below.
// The suite runs in series (no -p/--procs), so plain package vars are safe without synchronization.
var totalSpecsToRun int
var completedSpecCount int

var _ = ginkgo.ReportBeforeSuite(func(report ginkgo.Report) {
totalSpecsToRun = report.PreRunStats.SpecsThatWillRun
})

var _ = ginkgo.ReportAfterEach(func(report ginkgo.SpecReport) {
completedSpecCount++
fmt.Printf("--- [%d/%d specs done] %s: %s (took %s)\n",
completedSpecCount, totalSpecsToRun, report.FullText(), report.State, report.RunTime)
})

var _ = ginkgo.BeforeSuite(func() {
ginkgo.By("Acquiring K8s cluster")
var kubeconfigPath string
Expand Down