This repository has been archived by the owner on Mar 28, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 740
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1963 from hasbro17/haseeb/ra-pod-testing
test: run e2e test pod without framework setup
- Loading branch information
Showing
4 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# golang:X-alpine can't be used since it does not support the race detector flag which assumes a glibc based system, whereas alpine linux uses musl libc | ||
# https://github.com/golang/go/issues/14481 | ||
FROM golang:1.10.2 as builder | ||
|
||
RUN wget -nv -O /bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.10.2/bin/linux/amd64/kubectl | ||
|
||
RUN chmod a+x /bin/kubectl | ||
|
||
ADD ./ /go/src/github.com/coreos/etcd-operator | ||
|
||
WORKDIR /go/src/github.com/coreos/etcd-operator | ||
|
||
RUN go test ./test/e2e/ -c -o /bin/etcd-operator-e2e --race | ||
|
||
FROM busybox:1.28.3-glibc | ||
|
||
COPY --from=builder /bin/etcd-operator-e2e /bin | ||
COPY --from=builder /bin/kubectl /bin | ||
COPY --from=builder /go/src/github.com/coreos/etcd-operator/test/pod/simple/run-e2e /bin/run-e2e | ||
|
||
CMD ["/bin/run-e2e"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
|
||
set -o errexit | ||
set -o nounset | ||
|
||
: ${TEST_NAMESPACE:?"Need to set TEST_NAMESPACE"} | ||
|
||
# Run e2e tests | ||
/bin/etcd-operator-e2e -test.timeout 30m -test.failfast -test.parallel 4 --namespace=${TEST_NAMESPACE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: etcd-operator-e2e-tests | ||
spec: | ||
restartPolicy: Never | ||
containers: | ||
- name: etcd-operator-e2e-tests | ||
image: <TEST_IMAGE> | ||
imagePullPolicy: Always | ||
env: | ||
- name: TEST_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace |