From 7aafe37b2f247a7d0e93c0d3cadb754d5b99dc03 Mon Sep 17 00:00:00 2001 From: Jonathan West Date: Wed, 20 Mar 2024 16:54:05 -0400 Subject: [PATCH] Add additional init to run-e2e-local.sh Signed-off-by: Jonathan West --- go.mod | 2 +- hack/run-e2e-local.sh | 4 +++- tests/fixtures/rollout/rollout.go | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 9e368bf..ececc01 100644 --- a/go.mod +++ b/go.mod @@ -9,6 +9,7 @@ require ( github.com/onsi/gomega v1.30.0 github.com/openshift/api v0.0.0-20230417092139-1b2161d23365 github.com/openshift/client-go v0.0.0-20230419131419-497c7032c581 + k8s.io/api v0.26.3 k8s.io/apimachinery v0.26.3 k8s.io/client-go v0.26.3 ) @@ -84,7 +85,6 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.26.3 // indirect k8s.io/apiserver v0.26.3 // indirect k8s.io/cli-runtime v0.26.3 // indirect k8s.io/component-base v0.26.3 // indirect diff --git a/hack/run-e2e-local.sh b/hack/run-e2e-local.sh index 491ff55..e3bef0d 100755 --- a/hack/run-e2e-local.sh +++ b/hack/run-e2e-local.sh @@ -20,6 +20,7 @@ if [ $# -eq 0 ]; then fi ROLLOUTS_DIR=$1 +mkdir -p $ROLLOUTS_DIR/plugin-bin kubectl delete ns argo-rollouts || true @@ -49,6 +50,7 @@ EOF cd $ROLLOUTS_DIR kubectl apply -k manifests/crds rm -f /tmp/rollouts-controller.log || true +go mod tidy go run ./cmd/rollouts-controller/main.go 2>&1 | tee /tmp/rollouts-controller.log & # wait for the controller to start @@ -58,4 +60,4 @@ sleep 30 cd $SCRIPT_DIR/.. make test-e2e -cleanup \ No newline at end of file +cleanup diff --git a/tests/fixtures/rollout/rollout.go b/tests/fixtures/rollout/rollout.go index 6a41879..1501bc0 100644 --- a/tests/fixtures/rollout/rollout.go +++ b/tests/fixtures/rollout/rollout.go @@ -98,7 +98,7 @@ func HasTransitionedToCanary(expectedReplicas int) matcher.GomegaMatcher { } stableService, err := k8sClient.CoreV1().Services(ns).Get(ctx, stableName, metav1.GetOptions{}) if err != nil { - fmt.Println("failed to get stable servive", err) + fmt.Println("failed to get stable service", err) return false } @@ -111,13 +111,13 @@ func HasTransitionedToCanary(expectedReplicas int) matcher.GomegaMatcher { } else if rs.ResourceVersion == "2" { if rs.Spec.Template.Labels[rolloutsv1alpha1.DefaultRolloutUniqueLabelKey] != stableService.Spec.Selector[rolloutsv1alpha1.DefaultRolloutUniqueLabelKey] { - fmt.Printf("expected the stable service %s to point to the latest ReplicSet %s\n", stableName, rs.Name) + fmt.Printf("expected the stable service %s to point to the latest ReplicaSet %s\n", stableName, rs.Name) return false } if rs.Spec.Template.Labels[rolloutsv1alpha1.DefaultRolloutUniqueLabelKey] != canaryService.Spec.Selector[rolloutsv1alpha1.DefaultRolloutUniqueLabelKey] { - fmt.Printf("expected the canary service %s to point to the latest ReplicSet %s\n", canaryName, rs.Name) + fmt.Printf("expected the canary service %s to point to the latest ReplicaSet %s\n", canaryName, rs.Name) return false }