Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix e2e test in osx #3819

Merged
merged 1 commit into from
Feb 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.