Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
veezhang committed Jun 4, 2021
1 parent 6f03de9 commit eaeff88
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 21 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ ENVTEST_ASSETS_DIR=$(shell pwd)/testbin
test: manifests generate check ## Run tests.
mkdir -p ${ENVTEST_ASSETS_DIR}
test -f ${ENVTEST_ASSETS_DIR}/setup-envtest.sh || curl -sSLo ${ENVTEST_ASSETS_DIR}/setup-envtest.sh https://raw.githubusercontent.com/kubernetes-sigs/controller-runtime/v0.7.0/hack/setup-envtest.sh
source ${ENVTEST_ASSETS_DIR}/setup-envtest.sh; fetch_envtest_tools $(ENVTEST_ASSETS_DIR); setup_envtest_env $(ENVTEST_ASSETS_DIR); go test ./... -coverprofile cover.out
source ${ENVTEST_ASSETS_DIR}/setup-envtest.sh; fetch_envtest_tools $(ENVTEST_ASSETS_DIR); setup_envtest_env $(ENVTEST_ASSETS_DIR); go test ./pkg/... -coverprofile cover.out

##@ e2e
e2e: $(GOBIN)/ginkgo $(GOBIN)/kind helm
Expand Down
1 change: 0 additions & 1 deletion tests/e2e/nebulacluster/nebulacluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import (
e2eframework "github.com/vesoft-inc/nebula-operator/tests/e2e/framework"
)

// nolint: dupl
var _ = ginkgo.Describe("NebulaCluster", func() {
f := e2eframework.NewDefaultFramework("nebulacluster")

Expand Down
19 changes: 0 additions & 19 deletions tests/e2e/nebulacluster/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import (
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/rest"
"k8s.io/client-go/util/retry"
"k8s.io/kubernetes/test/e2e/framework"
"k8s.io/utils/pointer"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down Expand Up @@ -208,31 +207,13 @@ func waitForNebulaClusterDeleted(
})
}

func updateNebulaCluster(
nc *v1alpha1.NebulaCluster,
runtimeClient client.Client,
updateFunc func() error,
) error {
key := client.ObjectKeyFromObject(nc)
return retry.RetryOnConflict(retry.DefaultRetry, func() error {
if err := runtimeClient.Get(context.TODO(), key, nc); err != nil {
return err
}
if err := updateFunc(); err != nil {
return err
}
return runtimeClient.Update(context.TODO(), nc)
})
}

type nebulaLog struct{}

func (l nebulaLog) Info(msg string) { framework.Logf(msg) }
func (l nebulaLog) Warn(msg string) { framework.Logf(msg) }
func (l nebulaLog) Error(msg string) { framework.Logf(msg) }
func (l nebulaLog) Fatal(msg string) { framework.Logf(msg) }

// nolint: unparam
func waitForExecuteNebulaSchema(
timeout, pollInterval time.Duration,
address string,
Expand Down

0 comments on commit eaeff88

Please sign in to comment.