Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Refactor e2e test
Browse files Browse the repository at this point in the history
* Run sequentially after build and tests in CircleCI to reuse artifacts
* Support running it locally (both in Linux and Darwin systems)
  through `make e2e`. An existing Kubernetes cluster will be used if available,
  otherwise a cluster will be created with Kind.
  • Loading branch information
2opremio committed May 16, 2019
1 parent 416e842 commit b00257a
Show file tree
Hide file tree
Showing 11 changed files with 206 additions and 220 deletions.
14 changes: 1 addition & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- run: make check-generated
- run: make test TEST_FLAGS="-race -tags integration -timeout 60s"
- run: make all

- run: make e2e
- deploy:
name: Maybe push prerelease images
command: |
Expand All @@ -34,7 +34,6 @@ jobs:
docker tag "docker.io/weaveworks/helm-operator:$(docker/image-tag)" "docker.io/weaveworks/helm-operator-prerelease:$(docker/image-tag)"
docker push "docker.io/weaveworks/helm-operator-prerelease:$(docker/image-tag)"
fi
- deploy:
name: Maybe push release image and upload binaries
command: |
Expand All @@ -50,17 +49,6 @@ jobs:
RELEASE_TAG=$(echo "$CIRCLE_TAG" | cut -c 6-)
docker push "docker.io/weaveworks/helm-operator:${RELEASE_TAG}"
fi
e2e-testing:
machine: true
working_directory: ~/go/src/github.com/weaveworks/flux
steps:
- checkout
- run: test/e2e/e2e-golang.sh
- run: test/e2e/e2e-flux-build.sh
- run: test/e2e/e2e-kind.sh
- run: test/e2e/e2e-helm.sh
- run: test/e2e/e2e-git.sh
- run: test/e2e/e2e-flux-chart.sh
workflows:
version: 2
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ docker/fluxy-dumbconf.priv
test/profiles
test/bin/kubectl
test/bin/helm
test/bin/kind
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,17 @@ release-bins:
clean:
go clean
rm -rf ./build
rm -f test/bin/kubectl test/bin/helm
rm -f test/bin/kubectl test/bin/helm test/bin/kind

realclean: clean
rm -rf ./cache

test: test/bin/helm test/bin/kubectl
test: test/bin/helm test/bin/kubectl build/.flux.done build/.helm-operator.done
PATH="${PWD}/bin:${PWD}/test/bin:${PATH}" go test ${TEST_FLAGS} $(shell go list ./... | grep -v "^github.com/weaveworks/flux/vendor" | sort -u)

e2e: test/bin/helm test/bin/kubectl
PATH="${PWD}/test/bin:${PATH}" CURRENT_OS_ARCH=$(CURRENT_OS_ARCH) test/e2e/run.sh

build/.%.done: docker/Dockerfile.%
mkdir -p ./build/docker/$*
cp $^ ./build/docker/$*/
Expand Down
13 changes: 0 additions & 13 deletions test/e2e/e2e-flux-build.sh

This file was deleted.

113 changes: 0 additions & 113 deletions test/e2e/e2e-flux-chart.sh

This file was deleted.

17 changes: 0 additions & 17 deletions test/e2e/e2e-git.sh

This file was deleted.

19 changes: 0 additions & 19 deletions test/e2e/e2e-golang.sh

This file was deleted.

15 changes: 0 additions & 15 deletions test/e2e/e2e-helm.sh

This file was deleted.

26 changes: 0 additions & 26 deletions test/e2e/e2e-kind.sh

This file was deleted.

2 changes: 0 additions & 2 deletions test/e2e/git-dep.yaml → test/e2e/gitsrv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ metadata:
labels:
name: gitsrv
name: gitsrv
namespace: flux
spec:
replicas: 1
selector:
Expand Down Expand Up @@ -46,7 +45,6 @@ metadata:
labels:
name: gitsrv
name: gitsrv
namespace: flux
spec:
ports:
- name: ssh
Expand Down
Loading

0 comments on commit b00257a

Please sign in to comment.