diff --git a/pkg/testutils/maintenancewindows.go b/pkg/testutils/maintenancewindows.go index a5625ec323..f166ef8a17 100644 --- a/pkg/testutils/maintenancewindows.go +++ b/pkg/testutils/maintenancewindows.go @@ -2,24 +2,25 @@ package testutils import ( "context" - "errors" "fmt" - "github.com/kyma-project/lifecycle-manager/pkg/util" - v1 "k8s.io/api/core/v1" + + apicorev1 "k8s.io/api/core/v1" "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/kyma-project/lifecycle-manager/pkg/util" ) var ErrConfigMapNotExist = errors.New("maintenance window configmap does not exist") func MaintenanceWindowConfigMapExists(ctx context.Context, kcpClient client.Client) error { - cm := &v1.ConfigMap{} + maintenanceWindowsCM := &apicorev1.ConfigMap{} objectKey := client.ObjectKey{ Namespace: ControlPlaneNamespace, Name: "maintenance-config", } - if err := kcpClient.Get(ctx, objectKey, cm); err != nil { + if err := kcpClient.Get(ctx, objectKey, maintenanceWindowsCM); err != nil { if util.IsNotFound(err) { return ErrConfigMapNotExist } diff --git a/tests/e2e/maintenance_windows_reading_test.go b/tests/e2e/maintenance_windows_reading_test.go index 29d379d148..917be82e6c 100644 --- a/tests/e2e/maintenance_windows_reading_test.go +++ b/tests/e2e/maintenance_windows_reading_test.go @@ -1,13 +1,14 @@ package e2e_test import ( + "os/exec" + "github.com/kyma-project/lifecycle-manager/api/v1beta2" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/kyma-project/lifecycle-manager/pkg/testutils" - "os/exec" ) var _ = Describe("Reading Maintenance Window Policy", Ordered, func() {