diff --git a/hack/shoot-comparator/cmd/comparator/directories.go b/hack/shoot-comparator/cmd/comparator/directories.go index ec4136de..41e9a138 100644 --- a/hack/shoot-comparator/cmd/comparator/directories.go +++ b/hack/shoot-comparator/cmd/comparator/directories.go @@ -2,10 +2,11 @@ package comparator import ( "fmt" - "github.com/kyma-project/infrastructure-manager/tools/shoot-comparator/internal/directories" - "github.com/spf13/cobra" "log/slog" "time" + + "github.com/kyma-project/infrastructure-manager/tools/shoot-comparator/internal/directories" + "github.com/spf13/cobra" ) func init() { diff --git a/hack/shoot-comparator/cmd/comparator/files.go b/hack/shoot-comparator/cmd/comparator/files.go index 4936af9b..4884dfee 100644 --- a/hack/shoot-comparator/cmd/comparator/files.go +++ b/hack/shoot-comparator/cmd/comparator/files.go @@ -2,6 +2,7 @@ package comparator import ( "fmt" + "github.com/kyma-project/infrastructure-manager/tools/shoot-comparator/internal/files" "github.com/spf13/cobra" ) diff --git a/hack/shoot-comparator/internal/directories/comparator.go b/hack/shoot-comparator/internal/directories/comparator.go index 1ef0a5f3..8af19105 100644 --- a/hack/shoot-comparator/internal/directories/comparator.go +++ b/hack/shoot-comparator/internal/directories/comparator.go @@ -1,11 +1,12 @@ package directories import ( - "github.com/kyma-project/infrastructure-manager/tools/shoot-comparator/internal/files" "os" "path" "slices" "time" + + "github.com/kyma-project/infrastructure-manager/tools/shoot-comparator/internal/files" ) type Result struct { diff --git a/hack/shoot-comparator/internal/directories/comparator_test.go b/hack/shoot-comparator/internal/directories/comparator_test.go index fcdf181b..b44828bf 100644 --- a/hack/shoot-comparator/internal/directories/comparator_test.go +++ b/hack/shoot-comparator/internal/directories/comparator_test.go @@ -1,16 +1,16 @@ package directories import ( - "github.com/gardener/gardener/pkg/apis/core/v1beta1" - "gopkg.in/yaml.v3" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "os" "path" "testing" "time" + "github.com/gardener/gardener/pkg/apis/core/v1beta1" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "gopkg.in/yaml.v3" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) const onlyLeftFilename = "onlyLeftFile.yaml" diff --git a/hack/shoot-comparator/internal/files/comparator.go b/hack/shoot-comparator/internal/files/comparator.go index 0c1acafe..7cb3ba51 100644 --- a/hack/shoot-comparator/internal/files/comparator.go +++ b/hack/shoot-comparator/internal/files/comparator.go @@ -1,9 +1,10 @@ package files import ( + "os" + "github.com/gardener/gardener/pkg/apis/core/v1beta1" "github.com/kyma-project/infrastructure-manager/tools/shoot-comparator/pkg/shoot" - "os" "sigs.k8s.io/yaml" ) diff --git a/hack/shoot-comparator/pkg/shoot/extensionmatcher.go b/hack/shoot-comparator/pkg/shoot/extensionmatcher.go index fa7a1179..c71f995d 100644 --- a/hack/shoot-comparator/pkg/shoot/extensionmatcher.go +++ b/hack/shoot-comparator/pkg/shoot/extensionmatcher.go @@ -2,12 +2,13 @@ package shoot import ( "fmt" - "github.com/gardener/gardener/pkg/apis/core/v1beta1" - "github.com/onsi/gomega" - "github.com/onsi/gomega/types" "reflect" "sort" "strings" + + "github.com/gardener/gardener/pkg/apis/core/v1beta1" + "github.com/onsi/gomega" + "github.com/onsi/gomega/types" ) type ExtensionMatcher struct { diff --git a/hack/shoot-comparator/pkg/shoot/extensionmatcher_test.go b/hack/shoot-comparator/pkg/shoot/extensionmatcher_test.go index ed8ffb36..652ec483 100644 --- a/hack/shoot-comparator/pkg/shoot/extensionmatcher_test.go +++ b/hack/shoot-comparator/pkg/shoot/extensionmatcher_test.go @@ -2,6 +2,7 @@ package shoot import ( "fmt" + "github.com/gardener/gardener/pkg/apis/core/v1beta1" . "github.com/onsi/ginkgo/v2" //nolint:revive . "github.com/onsi/gomega" //nolint:revive diff --git a/internal/auditlogging/mocks/AuditLogConfigurator.go b/internal/auditlogging/mocks/AuditLogConfigurator.go index 92016d0a..3977f019 100644 --- a/internal/auditlogging/mocks/AuditLogConfigurator.go +++ b/internal/auditlogging/mocks/AuditLogConfigurator.go @@ -5,13 +5,10 @@ package mocks import ( context "context" + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" auditlogging "github.com/kyma-project/infrastructure-manager/internal/auditlogging" - mock "github.com/stretchr/testify/mock" - types "k8s.io/apimachinery/pkg/types" - - v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" ) // AuditLogConfigurator is an autogenerated mock type for the AuditLogConfigurator type diff --git a/internal/controller/runtime/suite_test.go b/internal/controller/runtime/suite_test.go index 22c538b2..f29815dd 100644 --- a/internal/controller/runtime/suite_test.go +++ b/internal/controller/runtime/suite_test.go @@ -19,19 +19,19 @@ package runtime import ( "context" "encoding/json" - "github.com/kyma-project/infrastructure-manager/internal/auditlogging" - v1 "k8s.io/api/autoscaling/v1" - v12 "k8s.io/api/core/v1" "path/filepath" "testing" "time" gardener_api "github.com/gardener/gardener/pkg/apis/core/v1beta1" infrastructuremanagerv1 "github.com/kyma-project/infrastructure-manager/api/v1" + "github.com/kyma-project/infrastructure-manager/internal/auditlogging" "github.com/kyma-project/infrastructure-manager/internal/controller/runtime/fsm" gardener_shoot "github.com/kyma-project/infrastructure-manager/internal/gardener/shoot" . "github.com/onsi/ginkgo/v2" //nolint:revive . "github.com/onsi/gomega" //nolint:revive + v1 "k8s.io/api/autoscaling/v1" + v12 "k8s.io/api/core/v1" rbacv1 "k8s.io/api/rbac/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" //nolint:revive diff --git a/internal/controller/runtime/test_client_obj_tracker_test.go b/internal/controller/runtime/test_client_obj_tracker_test.go index 2604945a..5fe1388f 100644 --- a/internal/controller/runtime/test_client_obj_tracker_test.go +++ b/internal/controller/runtime/test_client_obj_tracker_test.go @@ -1,11 +1,12 @@ package runtime import ( + "testing" + gardener_api "github.com/gardener/gardener/pkg/apis/core/v1beta1" "github.com/stretchr/testify/require" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" - "testing" ) func TestCustomTracker_Get(t *testing.T) { diff --git a/internal/gardener/mocks/ShootClient.go b/internal/gardener/mocks/ShootClient.go index ac582f90..4c85276e 100644 --- a/internal/gardener/mocks/ShootClient.go +++ b/internal/gardener/mocks/ShootClient.go @@ -5,13 +5,10 @@ package mocks import ( context "context" + v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" mock "github.com/stretchr/testify/mock" - - types "k8s.io/apimachinery/pkg/types" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - v1beta1 "github.com/gardener/gardener/pkg/apis/core/v1beta1" + types "k8s.io/apimachinery/pkg/types" ) // ShootClient is an autogenerated mock type for the ShootClient type diff --git a/internal/gardener/shoot/converter.go b/internal/gardener/shoot/converter.go index 934e8365..dcb81089 100644 --- a/internal/gardener/shoot/converter.go +++ b/internal/gardener/shoot/converter.go @@ -76,7 +76,7 @@ func NewConverter(config ConverterConfig) Converter { extender.ExtendWithAnnotations, extender.ExtendWithLabels, extender.NewKubernetesExtender(config.Kubernetes.DefaultVersion), - extender.NewProviderExtender(config.Provider.AWS.EnableIMDSv2, config.MachineImage.DefaultName, config.MachineImage.DefaultVersion), + extender.NewProviderExtender(config.Provider.AWS.EnableIMDSv2, config.MachineImage.DefaultName, config.MachineImage.DefaultVersion), extender.NewDNSExtender(config.DNS.SecretName, config.DNS.DomainPrefix, config.DNS.ProviderType), extender.ExtendWithOIDC, extender.ExtendWithCloudProfile, diff --git a/internal/gardener/shoot/extender/oidc_test.go b/internal/gardener/shoot/extender/oidc_test.go index 3fc0e683..88082cdf 100644 --- a/internal/gardener/shoot/extender/oidc_test.go +++ b/internal/gardener/shoot/extender/oidc_test.go @@ -1,13 +1,13 @@ package extender import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "testing" gardener "github.com/gardener/gardener/pkg/apis/core/v1beta1" imv1 "github.com/kyma-project/infrastructure-manager/api/v1" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) func TestOidcExtender(t *testing.T) {