Skip to content

Commit

Permalink
Fix e2e test in osx
Browse files Browse the repository at this point in the history
  • Loading branch information
aledbf committed Feb 26, 2019
1 parent ec63281 commit 51c6e95
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 63 deletions.
14 changes: 8 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,10 @@ e2e-test:
echo "Granting permissions to ingress-nginx e2e service account..."
kubectl create serviceaccount ingress-nginx-e2e || true
kubectl create clusterrolebinding permissive-binding \
--clusterrole=cluster-admin \
--user=admin \
--user=kubelet \
--serviceaccount=default:ingress-nginx-e2e || true
--clusterrole=cluster-admin \
--user=admin \
--user=kubelet \
--serviceaccount=default:ingress-nginx-e2e || true

kubectl run --rm -i --tty \
--attach \
Expand All @@ -202,12 +202,14 @@ e2e-test:

.PHONY: e2e-test-image
e2e-test-image:
make -C test/e2e-image

.PHONY: e2e-test-binary
e2e-test-binary:
@$(DEF_VARS) \
DOCKER_OPTS="-i --net=host" \
build/go-in-docker.sh build/build-e2e.sh

make -C test/e2e-image

.PHONY: cover
cover:
@$(DEF_VARS) \
Expand Down
17 changes: 11 additions & 6 deletions test/e2e-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
FROM quay.io/kubernetes-ingress-controller/e2e:v02252019-286c1f306 AS BASE

FROM quay.io/kubernetes-ingress-controller/debian-base-amd64:0.1

RUN clean-install \
ca-certificates \
bash \
curl \
tzdata

COPY ginkgo /usr/local/bin/
COPY kubectl /usr/local/bin/
COPY e2e.sh /e2e.sh
RUN curl -Lo /usr/local/bin/kubectl \
https://storage.googleapis.com/kubernetes-release/release/v1.13.3/bin/linux/amd64/kubectl \
&& chmod +x /usr/local/bin/kubectl

COPY manifests /manifests
COPY --from=BASE /go/bin/ginkgo /usr/local/bin/

COPY wait-for-nginx.sh /
COPY e2e.test /
COPY e2e.sh /e2e.sh
COPY manifests /manifests
COPY wait-for-nginx.sh /
COPY e2e.test /

CMD [ "/e2e.sh" ]
8 changes: 1 addition & 7 deletions test/e2e-image/Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
IMAGE=nginx-ingress-controller:e2e
KUBE_VERSION ?= 1.13.3

.PHONY: all container getbins clean

all: container

container:
./kubectl > /dev/null 2>&1 || curl -Lo ./kubectl \
https://storage.googleapis.com/kubernetes-release/release/v$(KUBE_VERSION)/bin/linux/amd64/kubectl \
&& chmod +x ./kubectl

$(GOPATH)/bin/ginkgo > /dev/null 2>&1 || go get github.com/onsi/ginkgo/ginkgo
cp $(GOPATH)/bin/ginkgo .
make -C ../../ e2e-test-binary

cp ../e2e/e2e.test .
cp ../e2e/wait-for-nginx.sh .
Expand Down
44 changes: 0 additions & 44 deletions test/e2e-image/wait-for-nginx.sh

This file was deleted.

0 comments on commit 51c6e95

Please sign in to comment.