Skip to content

Commit

Permalink
Merge pull request kubernetes-sigs#3502 from mboersma/fix-ginkgo-v2-d…
Browse files Browse the repository at this point in the history
…eprecation-warnings

Fix Ginkgov2 deprecation warnings
  • Loading branch information
k8s-ci-robot authored May 2, 2023
2 parents 4c97dde + 631edec commit 472d767
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions test/e2e/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
"github.com/Azure/go-autorest/autorest/azure/auth"
"github.com/blang/semver"
. "github.com/onsi/ginkgo/v2"
"github.com/onsi/ginkgo/v2/types"
. "github.com/onsi/gomega"
corev1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
Expand Down Expand Up @@ -294,10 +295,10 @@ func EnsureControlPlaneInitialized(ctx context.Context, input clusterctl.ApplyCl
// CheckTestBeforeCleanup checks to see if the current running Ginkgo test failed, and prints
// a status message regarding cleanup.
func CheckTestBeforeCleanup() {
if CurrentGinkgoTestDescription().Failed {
if CurrentSpecReport().State.Is(types.SpecStateFailureStates) {
Logf("FAILED!")
}
Logf("Cleaning up after \"%s\" spec", CurrentGinkgoTestDescription().FullTestText)
Logf("Cleaning up after \"%s\" spec", CurrentSpecReport().FullText())
}

func discoveryAndWaitForControlPlaneInitialized(ctx context.Context, input clusterctl.ApplyClusterTemplateAndWaitInput, result *clusterctl.ApplyClusterTemplateAndWaitResult) *kubeadmv1.KubeadmControlPlane {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ func getAvailabilityZonesForRegion(location string, size string) ([]string, erro
// INFO: "With 1 worker node" started at Tue, 22 Sep 2020 13:19:08 PDT on Ginkgo node 2 of 3
// INFO: "With 1 worker node" ran for 18m34s on Ginkgo node 2 of 3
func logCheckpoint(specTimes map[string]time.Time) {
text := CurrentGinkgoTestDescription().TestText
text := CurrentSpecReport().LeafNodeText
start, started := specTimes[text]
suiteConfig, reporterConfig := GinkgoConfiguration()
if !started {
Expand Down

0 comments on commit 472d767

Please sign in to comment.