Skip to content

Commit a6eafeb

Browse files
committed
fix(e2e): make e2e-local-docker work again
1 parent e8f5b41 commit a6eafeb

File tree

8 files changed

+5
-53
lines changed

8 files changed

+5
-53
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ setup-bare: clean e2e.namespace
7878
. ./scripts/install_bare.sh $(shell cat ./e2e.namespace) test/e2e/resources
7979

8080
e2e:
81-
go test -v -timeout 50m ./test/e2e/... -namespace=openshift-operators -kubeconfig=${KUBECONFIG} -olmNamespace=openshift-operator-lifecycle-manager
81+
go test -v -failfast -timeout 50m ./test/e2e/... -namespace=openshift-operators -kubeconfig=${KUBECONFIG} -olmNamespace=openshift-operator-lifecycle-manager
8282

8383
e2e-local:
8484
. ./scripts/build_local.sh

e2e.Dockerfile

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ COPY vendor vendor
1414
COPY cmd cmd
1515
COPY test test
1616
RUN make build-coverage
17-
RUN go test -c -o /bin/e2e ./test/e2e/...
1817

1918
FROM alpine:latest as olm
2019
LABEL stage=olm
@@ -25,13 +24,3 @@ COPY --from=builder /go/src/github.com/operator-framework/operator-lifecycle-man
2524
EXPOSE 8080
2625
EXPOSE 5443
2726
CMD ["/bin/olm"]
28-
29-
FROM alpine:latest
30-
LABEL stage=e2e
31-
RUN mkdir -p /var/e2e
32-
WORKDIR /var/e2e
33-
COPY --from=builder /bin/e2e /bin/e2e
34-
COPY --from=builder /bin/jq /bin/jq
35-
COPY ./test/e2e/e2e.sh /var/e2e/e2e.sh
36-
COPY ./test/e2e/tap.jq /var/e2e/tap.jq
37-
CMD ["/bin/e2e"]

scripts/build_local.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ if [ -z "$NO_MINIKUBE" ]; then
1212
fi
1313
docker build -f e2e.Dockerfile .
1414
docker tag $(docker images --filter 'label=stage=olm' --format '{{.CreatedAt}}\t{{.ID}}' | sort -nr | head -n 1 | cut -f2) quay.io/coreos/olm:local
15-
docker tag $(docker images --filter 'label=stage=e2e' --format '{{.CreatedAt}}\t{{.ID}}' | sort -nr | head -n 1 | cut -f2) quay.io/coreos/olm-e2e:local
15+
docker tag $(docker images --filter 'label=stage=builder' --format '{{.CreatedAt}}\t{{.ID}}' | sort -nr | head -n 1 | cut -f2) quay.io/coreos/olm-e2e:local

scripts/run_e2e_docker.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ mkdir -p test/e2e/test-resources
4949
helm template --set namespace="${namespace}" -f test/e2e/e2e-values.yaml test/e2e/chart --output-dir test/e2e/test-resources
5050

5151
eval "$(minikube docker-env)" || { echo 'Cannot switch to minikube docker'; exit 1; }
52-
kubectl apply -f test/e2e/test-resources/alm-e2e/templates
52+
kubectl apply -f test/e2e/test-resources/olm-e2e/templates
5353
until kubectl -n "${namespace}" logs job/e2e | grep -v "ContainerCreating"; do echo "waiting for job to run" && sleep 1; done
5454
kubectl -n "${namespace}" logs job/e2e -f
5555

scripts/run_e2e_local.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ else
5555
fi
5656

5757
echo "${test_flags}"
58-
go test -mod=vendor -tags=local -covermode=count -coverpkg ./pkg/controller/... -test.v -test.timeout 20m ${test_flags} ./test/e2e/... -kubeconfig=${KUBECONFIG:-~/.kube/config} -namespace=${namespace}-operator -olmNamespace=${namespace}
58+
go test -mod=vendor -failfast -tags=local -covermode=count -coverpkg ./pkg/controller/... -test.v -test.timeout 20m ${test_flags} ./test/e2e/... -kubeconfig=${KUBECONFIG:-~/.kube/config} -namespace=${namespace}-operator -olmNamespace=${namespace}

test/e2e/chart/templates/job.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ spec:
99
containers:
1010
- name: e2e
1111
image: {{ .Values.e2e.image.ref }}
12-
command: ["/var/e2e/e2e.sh"]
12+
command: ["go", "test", "-v", "-failfast", "-timeout", "50m", "./test/e2e/...", "-namespace=$(NAMESPACE)-operator", "-olmNamespace=$(NAMESPACE)"]
1313
env:
1414
- name: NAMESPACE
1515
valueFrom:

test/e2e/e2e-values-shift.yaml

Lines changed: 0 additions & 35 deletions
This file was deleted.

test/e2e/e2e-values.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
rbacApiVersion: rbac.authorization.k8s.io
2-
31
olm:
42
replicaCount: 1
53
image:

0 commit comments

Comments
 (0)