Skip to content

Commit

Permalink
Merge branch 'main' into read_maintwindows
Browse files Browse the repository at this point in the history
  • Loading branch information
nesmabadr authored Jan 15, 2025
2 parents 466695a + 47e294c commit c4fc689
Show file tree
Hide file tree
Showing 38 changed files with 48 additions and 15 deletions.
10 changes: 9 additions & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ linters-settings:
alias: metricsserver
- pkg: github.com/prometheus/client_model/go
alias: prometheusclient
- pkg: github.com/kyma-project/lifecycle-manager/pkg/testutils/skrcontextimpl
- pkg: github.com/kyma-project/lifecycle-manager/tests/integration/commontestutils/skrcontextimpl
alias: testskrcontext
- pkg: github.com/kyma-project/lifecycle-manager/internal/controller/watcher
alias: watcherctrl
Expand Down Expand Up @@ -186,6 +186,14 @@ issues:
linters:
- wrapcheck # Errors do not need to be wrapped in unit and integration test utils
- err113 # Dynamic error creation in unit and integration test utils is ok
- path: "tests/e2e/commontestutils/"
linters:
- wrapcheck # Errors do not need to be wrapped in e2e test utils
- err113 # Dynamic error creation in e2e test utils is ok
- path: "tests/integration/commontestutils/"
linters:
- wrapcheck # Errors do not need to be wrapped in integration test utils
- err113 # Dynamic error creation in integration test utils is ok
- path: tests/e2e/
linters: [ gci ] # Disable gci due to the test utilities dot import.
- path: tests/integration/
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/ca_certificate_rotation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
. "github.com/onsi/gomega"

. "github.com/kyma-project/lifecycle-manager/pkg/testutils"
. "github.com/kyma-project/lifecycle-manager/tests/e2e/commontestutils"
)

var _ = Describe("CA Certificate Rotation", Ordered, func() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package testutils
package commontestutils

import (
"context"
Expand All @@ -8,6 +8,7 @@ import (
apiappsv1 "k8s.io/api/apps/v1"
"sigs.k8s.io/controller-runtime/pkg/client"

"github.com/kyma-project/lifecycle-manager/pkg/testutils"
"github.com/kyma-project/lifecycle-manager/pkg/util"
)

Expand All @@ -20,7 +21,7 @@ func DeploymentIsReady(ctx context.Context, clnt client.Client, name, namespace
deploy, err := GetDeployment(ctx, clnt, name, namespace)
if err != nil {
if util.IsNotFound(err) {
return ErrNotFound
return testutils.ErrNotFound
}
return fmt.Errorf("could not get deployment: %w", err)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package testutils
package commontestutils

import (
"bytes"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package testutils
package commontestutils

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package testutils
package commontestutils

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package testutils
package commontestutils

import (
"context"
Expand All @@ -8,6 +8,7 @@ import (
apiappsv1 "k8s.io/api/apps/v1"
"sigs.k8s.io/controller-runtime/pkg/client"

"github.com/kyma-project/lifecycle-manager/pkg/testutils"
"github.com/kyma-project/lifecycle-manager/pkg/util"
)

Expand All @@ -17,7 +18,7 @@ func StatefulSetIsReady(ctx context.Context, clnt client.Client, name, namespace
statefulSet, err := GetStatefulSet(ctx, clnt, name, namespace)
if err != nil {
if util.IsNotFound(err) {
return ErrNotFound
return testutils.ErrNotFound
}
return fmt.Errorf("could not get statefulset: %w", err)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package testutils
package commontestutils

import (
"bytes"
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/istio_gateway_secret_rotation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (

"github.com/kyma-project/lifecycle-manager/api/v1beta2"
. "github.com/kyma-project/lifecycle-manager/pkg/testutils"
. "github.com/kyma-project/lifecycle-manager/tests/e2e/commontestutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/kyma_metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/kyma-project/lifecycle-manager/pkg/queue"

. "github.com/kyma-project/lifecycle-manager/pkg/testutils"
. "github.com/kyma-project/lifecycle-manager/tests/e2e/commontestutils"
)

var _ = Describe("Manage Module Metrics", Ordered, func() {
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/labelling_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/kyma-project/lifecycle-manager/api/v1beta2"

. "github.com/kyma-project/lifecycle-manager/pkg/testutils"
. "github.com/kyma-project/lifecycle-manager/tests/e2e/commontestutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/mandatory_module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
apimetav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

. "github.com/kyma-project/lifecycle-manager/pkg/testutils"
. "github.com/kyma-project/lifecycle-manager/tests/e2e/commontestutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/mandatory_module_with_old_naming_pattern_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
apimetav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

. "github.com/kyma-project/lifecycle-manager/pkg/testutils"
. "github.com/kyma-project/lifecycle-manager/tests/e2e/commontestutils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/mandatory_modules_metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
. "github.com/onsi/gomega"

. "github.com/kyma-project/lifecycle-manager/pkg/testutils"
. "github.com/kyma-project/lifecycle-manager/tests/e2e/commontestutils"
)

var _ = Describe("Mandatory Module Metrics", Ordered, func() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
. "github.com/onsi/gomega"

. "github.com/kyma-project/lifecycle-manager/pkg/testutils"
. "github.com/kyma-project/lifecycle-manager/tests/e2e/commontestutils"
)

var _ = Describe("Mandatory Module With Old Naming Pattern Metrics", Ordered, func() {
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/manifest_reconciliation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
. "github.com/onsi/gomega"

. "github.com/kyma-project/lifecycle-manager/pkg/testutils"
. "github.com/kyma-project/lifecycle-manager/tests/e2e/commontestutils"
)

var _ = Describe("Manifest Skip Reconciliation Label", Ordered, func() {
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/module_consistency_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/kyma-project/lifecycle-manager/api/v1beta2"

. "github.com/kyma-project/lifecycle-manager/pkg/testutils"
. "github.com/kyma-project/lifecycle-manager/tests/e2e/commontestutils"
)

var _ = Describe("Module Keep Consistent After Deploy", Ordered, func() {
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/module_deletion_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
. "github.com/onsi/gomega"

. "github.com/kyma-project/lifecycle-manager/pkg/testutils"
. "github.com/kyma-project/lifecycle-manager/tests/e2e/commontestutils"
)

var _ = Describe("Non Blocking Kyma Module Deletion", Ordered, func() {
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/module_deletion_upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
. "github.com/onsi/gomega"

. "github.com/kyma-project/lifecycle-manager/pkg/testutils"
. "github.com/kyma-project/lifecycle-manager/tests/e2e/commontestutils"
)

var _ = Describe("Kyma Module Upgrade Under Deletion", Ordered, func() {
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/module_install_by_version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/kyma-project/lifecycle-manager/api/v1beta2"
. "github.com/kyma-project/lifecycle-manager/pkg/testutils"
"github.com/kyma-project/lifecycle-manager/pkg/testutils/builder"
. "github.com/kyma-project/lifecycle-manager/tests/e2e/commontestutils"
)

var _ = Describe("Module Install By Version", Ordered, func() {
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/module_status_decoupling_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
templatev1alpha1 "github.com/kyma-project/template-operator/api/v1alpha1"

. "github.com/kyma-project/lifecycle-manager/pkg/testutils"
. "github.com/kyma-project/lifecycle-manager/tests/e2e/commontestutils"
)

type ResourceKind string
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/module_upgrade_channel_switch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/kyma-project/lifecycle-manager/api/shared"
"github.com/kyma-project/lifecycle-manager/api/v1beta2"
. "github.com/kyma-project/lifecycle-manager/pkg/testutils"
. "github.com/kyma-project/lifecycle-manager/tests/e2e/commontestutils"
)

var _ = Describe("Module Upgrade By Channel Switch", Ordered, func() {
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/module_upgrade_new_version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/kyma-project/lifecycle-manager/api/shared"
"github.com/kyma-project/lifecycle-manager/api/v1beta2"
. "github.com/kyma-project/lifecycle-manager/pkg/testutils"
. "github.com/kyma-project/lifecycle-manager/tests/e2e/commontestutils"
)

var _ = Describe("Module Upgrade By New Version", Ordered, func() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
. "github.com/onsi/gomega"

. "github.com/kyma-project/lifecycle-manager/pkg/testutils"
. "github.com/kyma-project/lifecycle-manager/tests/e2e/commontestutils"
)

var _ = Describe("Kyma Module with ModuleReleaseMeta Upgrade Under Deletion", Ordered, func() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/kyma-project/lifecycle-manager/api/shared"
"github.com/kyma-project/lifecycle-manager/api/v1beta2"
. "github.com/kyma-project/lifecycle-manager/pkg/testutils"
. "github.com/kyma-project/lifecycle-manager/tests/e2e/commontestutils"
)

var _ = Describe("Module with ModuleReleaseMeta Upgrade By New Version", Ordered, func() {
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/ocm_compatible_module_template_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/kyma-project/lifecycle-manager/api/shared"
"github.com/kyma-project/lifecycle-manager/api/v1beta2"
. "github.com/kyma-project/lifecycle-manager/pkg/testutils"
. "github.com/kyma-project/lifecycle-manager/tests/e2e/commontestutils"
)

var _ = Describe("OCM Format Module Template", Ordered, func() {
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/purge_metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (

"github.com/kyma-project/lifecycle-manager/api/v1beta2"
. "github.com/kyma-project/lifecycle-manager/pkg/testutils"
. "github.com/kyma-project/lifecycle-manager/tests/e2e/commontestutils"
)

var _ = Describe("Purge Metrics", Ordered, func() {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/rbac_privileges_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

. "github.com/kyma-project/lifecycle-manager/pkg/testutils"
. "github.com/kyma-project/lifecycle-manager/tests/e2e/commontestutils"
)

var _ = Describe("RBAC Privileges", func() {
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/self_signed_certificate_rotation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/kyma-project/lifecycle-manager/internal/pkg/metrics"
. "github.com/kyma-project/lifecycle-manager/pkg/testutils"
"github.com/kyma-project/lifecycle-manager/pkg/watcher"
. "github.com/kyma-project/lifecycle-manager/tests/e2e/commontestutils"
)

var _ = Describe("Self Signed Certificate Rotation", Ordered, func() {
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
. "github.com/onsi/gomega"

. "github.com/kyma-project/lifecycle-manager/pkg/testutils"
. "github.com/kyma-project/lifecycle-manager/tests/e2e/commontestutils"
)

var (
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/watcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
. "github.com/onsi/gomega"

. "github.com/kyma-project/lifecycle-manager/pkg/testutils"
. "github.com/kyma-project/lifecycle-manager/tests/e2e/commontestutils"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/controller/eventfilters/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ import (
"github.com/kyma-project/lifecycle-manager/internal/remote"
"github.com/kyma-project/lifecycle-manager/pkg/log"
"github.com/kyma-project/lifecycle-manager/pkg/queue"
testskrcontext "github.com/kyma-project/lifecycle-manager/pkg/testutils/skrcontextimpl"
"github.com/kyma-project/lifecycle-manager/tests/integration"
testskrcontext "github.com/kyma-project/lifecycle-manager/tests/integration/commontestutils/skrcontextimpl"

_ "ocm.software/ocm/api/ocm"

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/controller/kcp/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ import (
"github.com/kyma-project/lifecycle-manager/pkg/log"
"github.com/kyma-project/lifecycle-manager/pkg/queue"
. "github.com/kyma-project/lifecycle-manager/pkg/testutils"
testskrcontext "github.com/kyma-project/lifecycle-manager/pkg/testutils/skrcontextimpl"
"github.com/kyma-project/lifecycle-manager/tests/integration"
testskrcontext "github.com/kyma-project/lifecycle-manager/tests/integration/commontestutils/skrcontextimpl"

_ "ocm.software/ocm/api/ocm"

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/controller/kyma/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ import (
"github.com/kyma-project/lifecycle-manager/internal/remote"
"github.com/kyma-project/lifecycle-manager/pkg/log"
"github.com/kyma-project/lifecycle-manager/pkg/queue"
testskrcontext "github.com/kyma-project/lifecycle-manager/pkg/testutils/skrcontextimpl"
"github.com/kyma-project/lifecycle-manager/tests/integration"
testskrcontext "github.com/kyma-project/lifecycle-manager/tests/integration/commontestutils/skrcontextimpl"

_ "ocm.software/ocm/api/ocm"

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/controller/purge/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ import (
"github.com/kyma-project/lifecycle-manager/internal/pkg/metrics"
"github.com/kyma-project/lifecycle-manager/pkg/log"
"github.com/kyma-project/lifecycle-manager/pkg/matcher"
testskrcontext "github.com/kyma-project/lifecycle-manager/pkg/testutils/skrcontextimpl"
"github.com/kyma-project/lifecycle-manager/tests/integration"
testskrcontext "github.com/kyma-project/lifecycle-manager/tests/integration/commontestutils/skrcontextimpl"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/controller/withwatcher/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ import (
"github.com/kyma-project/lifecycle-manager/internal/remote"
"github.com/kyma-project/lifecycle-manager/pkg/log"
"github.com/kyma-project/lifecycle-manager/pkg/queue"
testskrcontext "github.com/kyma-project/lifecycle-manager/pkg/testutils/skrcontextimpl"
"github.com/kyma-project/lifecycle-manager/pkg/watcher"
"github.com/kyma-project/lifecycle-manager/tests/integration"
testskrcontext "github.com/kyma-project/lifecycle-manager/tests/integration/commontestutils/skrcontextimpl"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down

0 comments on commit c4fc689

Please sign in to comment.