Skip to content

Commit 51b8240

Browse files
committed
Update Travis e2e environment
Use latest and greated Kubernetes and minikube release. Now that Travis offer systemd-enabled distributions, we can get rid of the `--bootstrapper=localkube` minikube hack. Also, better error message when e2e tests fails due to missing katafygio in the $PATH.
1 parent 3a7687e commit 51b8240

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

.travis.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ language: go
22
go:
33
- "1.12.x"
44

5-
# only needed for e2e tests
5+
# needed for e2e tests (so we can start minikube)
66
sudo: required
7+
dist: xenial # We need the systemd for the kubeadm and it's default from 16.04+
78

89
env:
910
global:
1011
# only needed for e2e tests
11-
- K8S_VERSION=v1.10.0
12-
- MINIKUBE_VERSION=v0.26.1
12+
- K8S_VERSION=v1.15.0
13+
- MINIKUBE_VERSION=v1.2.0
1314
- MINIKUBE_WANTREPORTERRORPROMPT=false
1415
- MINIKUBE_WANTUPDATENOTIFICATION=false
1516
- CHANGE_MINIKUBE_NONE_USER=true
@@ -22,8 +23,7 @@ before_script:
2223
- sudo curl -Lo /usr/local/bin/minikube https://github.com/kubernetes/minikube/releases/download/${MINIKUBE_VERSION}/minikube-linux-amd64
2324
- sudo chmod +x /usr/local/bin/kubectl /usr/local/bin/minikube
2425
- mkdir -p $HOME/.kube && touch $HOME/.kube/config
25-
# remove the --bootstrapper flag once this issue is solved: https://github.com/kubernetes/minikube/issues/2704
26-
- sudo -E /usr/local/bin/minikube start --vm-driver=none --bootstrapper=localkube --kubernetes-version=${K8S_VERSION}
26+
- sudo -E /usr/local/bin/minikube start --vm-driver=none --kubernetes-version=${K8S_VERSION}
2727
# Fix the kubectl context, as it is often stale.
2828
- /usr/local/bin/minikube update-context
2929
# Wait for Kubernetes to be up and ready.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ brew install bpineau/tap/katafygio
107107

108108
You can also deploy with the provided [helm](https://helm.sh/) chart:
109109
```shell
110-
helm install --name kf-backups --namespace kube-system assets/helm-chart/katafygio/
110+
helm install --name kf-backups assets/helm-chart/katafygio/
111111
```
112112

113113
## See Also

assets/e2e_test.go

+10-2
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,21 @@ func TestE2E(t *testing.T) {
5555

5656
func TestMain(m *testing.M) {
5757
deleteResources()
58-
_ = exec.Command("rm", "-rf", dumpPath)
58+
err := exec.Command("rm", "-rf", dumpPath).Run()
59+
if err != nil {
60+
fmt.Printf("failed to clean test dump path %s: %v", dumpPath, err)
61+
os.Exit(1)
62+
}
5963

6064
ctx, cancel := context.WithCancel(context.Background())
6165

6266
go func() {
6367
cmd := exec.CommandContext(ctx, "katafygio", "-e", dumpPath)
64-
_ = cmd.Run()
68+
err := cmd.Run()
69+
if err != nil && err.Error() != "signal: killed" {
70+
fmt.Printf("failed to spawn katafygio: %s", err.Error())
71+
os.Exit(1)
72+
}
6573
}()
6674

6775
ret := m.Run()

0 commit comments

Comments
 (0)