Skip to content

Commit

Permalink
fix(e2e): check for leaked leases
Browse files Browse the repository at this point in the history
  • Loading branch information
tallaxes committed Jan 14, 2025
1 parent d9bc851 commit 3a16b8c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions test/pkg/environment/common/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ import (
"sync"
"time"

"github.com/Azure/karpenter-provider-azure/pkg/apis/v1alpha2"
"github.com/Azure/karpenter-provider-azure/test/pkg/debug"
. "github.com/onsi/ginkgo/v2" //nolint:revive,stylecheck
. "github.com/onsi/gomega" //nolint:revive,stylecheck
"github.com/samber/lo"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
Expand All @@ -40,6 +36,12 @@ import (
karpv1 "sigs.k8s.io/karpenter/pkg/apis/v1"
"sigs.k8s.io/karpenter/pkg/test"
"sigs.k8s.io/karpenter/pkg/utils/pod"

"github.com/Azure/karpenter-provider-azure/pkg/apis/v1alpha2"
"github.com/Azure/karpenter-provider-azure/test/pkg/debug"

. "github.com/onsi/ginkgo/v2" //nolint:revive,stylecheck
. "github.com/onsi/gomega" //nolint:revive,stylecheck
)

const TestingFinalizer = "testing/finalizer"
Expand Down Expand Up @@ -107,6 +109,7 @@ func (env *Environment) ExpectCleanCluster() {

func (env *Environment) Cleanup() {
env.CleanupObjects(CleanableObjects...)
env.EventuallyExpectNoLeakedKubeNodeLease()
env.eventuallyExpectScaleDown()
env.ExpectNoCrashes()
}
Expand Down

0 comments on commit 3a16b8c

Please sign in to comment.