Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Sep 16, 2024
1 parent 591429b commit 955fc0a
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 28 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ endif
### These variables should not need tweaking.
###

SRC_PKGS := apis cmd pkg # directories which hold app source excluding tests (not vendored)
SRC_PKGS := apis cmd crds hack pkg test # directories which hold app source excluding tests (not vendored)
SRC_DIRS := $(SRC_PKGS) # directories which hold app source (not vendored)

DOCKER_PLATFORMS := linux/amd64 linux/arm64
Expand Down
7 changes: 3 additions & 4 deletions test/e2e/e2e_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ import (
"path/filepath"
"testing"

api "kubeops.dev/supervisor/apis/supervisor/v1alpha1"
"kubeops.dev/supervisor/test/e2e/framework"

. "github.com/onsi/ginkgo/v2"
"github.com/onsi/ginkgo/v2/types"
. "github.com/onsi/gomega"
Expand All @@ -32,13 +35,10 @@ import (
"k8s.io/client-go/util/homedir"
kubedbv1 "kubedb.dev/apimachinery/apis/kubedb/v1"
opsapi "kubedb.dev/apimachinery/apis/ops/v1alpha1"
api "kubeops.dev/supervisor/apis/supervisor/v1alpha1"
"kubeops.dev/supervisor/test/e2e/framework"
ctrl "sigs.k8s.io/controller-runtime"
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/log/zap"
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
//+kubebuilder:scaffold:imports
)

var (
Expand Down Expand Up @@ -103,7 +103,6 @@ var _ = BeforeSuite(func() {

By("Ensuring CRDs")
root.EnsureCRD().Should(Succeed())

}, 60)

var _ = AfterSuite(func() {
Expand Down
3 changes: 2 additions & 1 deletion test/e2e/framework/approval_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ import (
"context"
"time"

api "kubeops.dev/supervisor/apis/supervisor/v1alpha1"

"gomodules.xyz/x/crypto/rand"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/wait"
kmapi "kmodules.xyz/client-go/api/v1"
api "kubeops.dev/supervisor/apis/supervisor/v1alpha1"
"sigs.k8s.io/controller-runtime/pkg/client"
)

Expand Down
3 changes: 2 additions & 1 deletion test/e2e/framework/cluster_maintenance_window.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ import (
"context"
"time"

api "kubeops.dev/supervisor/apis/supervisor/v1alpha1"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/wait"
api "kubeops.dev/supervisor/apis/supervisor/v1alpha1"
"sigs.k8s.io/controller-runtime/pkg/client"
)

Expand Down
3 changes: 2 additions & 1 deletion test/e2e/framework/crd.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ import (
"fmt"
"time"

. "github.com/onsi/gomega"
api "kubeops.dev/supervisor/apis/supervisor/v1alpha1"

. "github.com/onsi/gomega"
)

func (f *Framework) EnsureCRD() GomegaAsyncAssertion {
Expand Down
5 changes: 2 additions & 3 deletions test/e2e/framework/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,15 @@ import (
"context"
"time"

"sigs.k8s.io/controller-runtime/pkg/client"

"gomodules.xyz/pointer"
"gomodules.xyz/x/crypto/rand"
core "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/wait"
kubedbv1 "kubedb.dev/apimachinery/apis/kubedb/v1"
"kubedb.dev/apimachinery/apis/kubedb"
kubedbv1 "kubedb.dev/apimachinery/apis/kubedb/v1"
"sigs.k8s.io/controller-runtime/pkg/client"
)

func (f *Framework) getDatabaseNamespace() string {
Expand Down
3 changes: 1 addition & 2 deletions test/e2e/framework/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ import (
"context"
"os"

"github.com/jonboulle/clockwork"

api "kubeops.dev/supervisor/apis/supervisor/v1alpha1"

"github.com/jonboulle/clockwork"
"gomodules.xyz/x/crypto/rand"
"k8s.io/client-go/rest"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down
7 changes: 4 additions & 3 deletions test/e2e/framework/maintenance_window.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ import (
"context"
"time"

api "kubeops.dev/supervisor/apis/supervisor/v1alpha1"

"gomodules.xyz/x/crypto/rand"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/wait"
kmapi "kmodules.xyz/client-go/api/v1"
api "kubeops.dev/supervisor/apis/supervisor/v1alpha1"
"sigs.k8s.io/controller-runtime/pkg/client"
)

Expand All @@ -38,8 +39,8 @@ func (f *Framework) CreateDefaultMaintenanceWindow() error {
IsDefault: true,
Dates: []api.DateWindow{
{
Start: metav1.Time{Time: time.Date(2022, 01, 01, 0, 0, 0, 0, time.UTC)},
End: metav1.Time{Time: time.Date(2023, 01, 01, 0, 0, 0, 0, time.UTC)},
Start: metav1.Time{Time: time.Date(2022, 0o1, 0o1, 0, 0, 0, 0, time.UTC)},
End: metav1.Time{Time: time.Date(2023, 0o1, 0o1, 0, 0, 0, 0, time.UTC)},
},
},
},
Expand Down
5 changes: 2 additions & 3 deletions test/e2e/framework/parallelism.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@ package framework
import (
"errors"

"k8s.io/apimachinery/pkg/runtime/schema"
api "kubeops.dev/supervisor/apis/supervisor/v1alpha1"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

api "kubeops.dev/supervisor/apis/supervisor/v1alpha1"
"k8s.io/apimachinery/pkg/runtime/schema"
"sigs.k8s.io/controller-runtime/pkg/client"
)

Expand Down
5 changes: 2 additions & 3 deletions test/e2e/framework/recommendation.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"errors"
"time"

opsapi "kubedb.dev/apimachinery/apis/ops/v1alpha1"
api "kubeops.dev/supervisor/apis/supervisor/v1alpha1"

"gomodules.xyz/pointer"
"gomodules.xyz/x/crypto/rand"
Expand All @@ -33,7 +33,7 @@ import (
kmapi "kmodules.xyz/client-go/api/v1"
kmc "kmodules.xyz/client-go/client"
kubedbv1 "kubedb.dev/apimachinery/apis/kubedb/v1"
api "kubeops.dev/supervisor/apis/supervisor/v1alpha1"
opsapi "kubedb.dev/apimachinery/apis/ops/v1alpha1"
"sigs.k8s.io/controller-runtime/pkg/client"
)

Expand Down Expand Up @@ -156,7 +156,6 @@ func (f *Framework) createRecommendation(rcmd *api.Recommendation) (*api.Recomme
}
return true, nil
})

if err != nil {
return nil, err
}
Expand Down
10 changes: 4 additions & 6 deletions test/e2e/recommendation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,21 @@ import (
"errors"
"time"

"gomodules.xyz/pointer"
api "kubeops.dev/supervisor/apis/supervisor/v1alpha1"
"kubeops.dev/supervisor/test/e2e/framework"

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"gomodules.xyz/pointer"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
kmapi "kmodules.xyz/client-go/api/v1"
kubedbv1 "kubedb.dev/apimachinery/apis/kubedb/v1"
opsapi "kubedb.dev/apimachinery/apis/ops/v1alpha1"
api "kubeops.dev/supervisor/apis/supervisor/v1alpha1"
"kubeops.dev/supervisor/test/e2e/framework"
"sigs.k8s.io/controller-runtime/pkg/client"
)

var _ = Describe("Supervisor E2E Testing", func() {
var (
f *framework.Invocation
)
var f *framework.Invocation

var (
createNewStandaloneMongoDB = func() *kubedbv1.MongoDB {
Expand Down

0 comments on commit 955fc0a

Please sign in to comment.