Skip to content
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ coverage.xml
.hypothesis/
.pytest_cache/

# e2e tests
e2e/manifests

# Translations
*.mo
*.pot
6 changes: 1 addition & 5 deletions e2e/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ ifndef GOPATH
GOPATH := $(HOME)/go
endif

KIND_PATH := $(GOPATH)/bin
PATH := $(GOPATH)/bin:$(PATH)

default: tools
Expand All @@ -43,10 +42,7 @@ push: docker

tools: docker
# install pinned version of 'kind'
# leave the name as is to avoid overwriting official binary named `kind`
wget https://github.com/kubernetes-sigs/kind/releases/download/v0.5.1/kind-linux-amd64
chmod +x kind-linux-amd64
mv kind-linux-amd64 $(KIND_PATH)
GO111MODULE=on go get sigs.k8s.io/kind@v0.5.1

test:
./run.sh
14 changes: 7 additions & 7 deletions e2e/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ function pull_images(){
function start_kind(){

# avoid interference with previous test runs
if [[ $(kind-linux-amd64 get clusters | grep "^${cluster_name}*") != "" ]]
if [[ $(kind get clusters | grep "^${cluster_name}*") != "" ]]
then
kind-linux-amd64 delete cluster --name ${cluster_name}
kind delete cluster --name ${cluster_name}
fi

kind-linux-amd64 create cluster --name ${cluster_name} --config kind-cluster-postgres-operator-e2e-tests.yaml
kind-linux-amd64 load docker-image "${operator_image}" --name ${cluster_name}
kind-linux-amd64 load docker-image "${e2e_test_image}" --name ${cluster_name}
KUBECONFIG="$(kind-linux-amd64 get kubeconfig-path --name=${cluster_name})"
kind create cluster --name ${cluster_name} --config kind-cluster-postgres-operator-e2e-tests.yaml
kind load docker-image "${operator_image}" --name ${cluster_name}
kind load docker-image "${e2e_test_image}" --name ${cluster_name}
KUBECONFIG="$(kind get kubeconfig-path --name=${cluster_name})"
export KUBECONFIG
}

Expand All @@ -58,7 +58,7 @@ function run_tests(){

function clean_up(){
unset KUBECONFIG
kind-linux-amd64 delete cluster --name ${cluster_name}
kind delete cluster --name ${cluster_name}
rm -rf ${kubeconfig_path}
}

Expand Down
20 changes: 14 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,22 @@ go 1.12

require (
github.com/aws/aws-sdk-go v1.25.1
github.com/emicklei/go-restful v2.9.6+incompatible // indirect
github.com/evanphx/json-patch v4.5.0+incompatible // indirect
github.com/googleapis/gnostic v0.3.0 // indirect
github.com/imdario/mergo v0.3.7 // indirect
github.com/lib/pq v1.2.0
github.com/motomux/pretty v0.0.0-20161209205251-b2aad2c9a95d
github.com/sirupsen/logrus v1.4.2
gopkg.in/yaml.v2 v2.2.2
k8s.io/api v0.0.0-20190927115716-5d581ce610b0
k8s.io/apiextensions-apiserver v0.0.0-20190927042040-728319705b32
k8s.io/apimachinery v0.0.0-20190927035529-0104e33c351d
k8s.io/client-go v0.0.0-20190926235751-95884bf844a9
k8s.io/code-generator v0.0.0-20190927075303-016f2b3d74d0
golang.org/x/crypto v0.0.0-20191122220453-ac88ee75c92c // indirect
golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933 // indirect
golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9 // indirect
golang.org/x/tools v0.0.0-20191127201027-ecd32218bd7f // indirect
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
gopkg.in/yaml.v2 v2.2.5
k8s.io/api v0.0.0-20191121015604-11707872ac1c
k8s.io/apiextensions-apiserver v0.0.0-20191121021419-88daf26ec3b8
k8s.io/apimachinery v0.0.0-20191121015412-41065c7a8c2a
k8s.io/client-go v11.0.0+incompatible
k8s.io/code-generator v0.0.0-20191121015212-c4c8f8345c7e
)
Loading