Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
nesmabadr committed Jan 14, 2025
1 parent c6ad159 commit 0ad4ed4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
11 changes: 6 additions & 5 deletions pkg/testutils/maintenancewindows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/maintenance_windows_reading_test.go
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down

0 comments on commit 0ad4ed4

Please sign in to comment.