Skip to content

Commit

Permalink
Fixing e2e test to allow other test to run post one test faliure (#471)
Browse files Browse the repository at this point in the history
* fixed failing test

Signed-off-by: prabhaker24 <[email protected]>

* fixed e2e est

Signed-off-by: prabhaker24 <[email protected]>

Co-authored-by: prabhaker24 <[email protected]>
  • Loading branch information
Prabhaker24 and prabhaker24 authored Nov 4, 2020
1 parent 24bb31d commit 5494de9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
- ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl get nodes"
- ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "mkdir /data;kubectl create -f /root/pravega-operator/test/e2e/resources/local-storage.yaml"
- ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "curl -L https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash"
- ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "helm repo add stable https://kubernetes-charts.storage.googleapis.com;helm install stable/nfs-server-provisioner --generate-name;kubectl -n default create -f /root/pravega-operator/test/e2e/resources/tier2.yaml"
- ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "helm repo add stable https://charts.helm.sh/stable;helm install stable/nfs-server-provisioner --generate-name;kubectl -n default create -f /root/pravega-operator/test/e2e/resources/tier2.yaml"

- ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl create -f /root/pravega-operator/test/e2e/resources/zookeeper.yaml"
- ssh -o StrictHostKeyChecking=no root@$CLUSTER_IP "kubectl -n default create -f /root/pravega-operator/test/e2e/resources/bookkeeper.yaml"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Check out the available [options for long term storage](doc/longtermstorage.md)
For demo purposes, you can quickly install a toy NFS server.

```
$ helm repo add stable https://kubernetes-charts.storage.googleapis.com
$ helm repo add stable https://charts.helm.sh/stable
$ helm repo update
$ helm install stable/nfs-server-provisioner --generate-name
```
Expand Down
10 changes: 7 additions & 3 deletions pkg/test/e2e/e2eutil/pravegacluster_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -614,9 +614,13 @@ func RestartTier2(t *testing.T, f *framework.Framework, ctx *framework.TestCtx,
t.Log("restarting tier2 storage")
tier2 := NewTier2(namespace)

err := f.Client.Delete(goctx.TODO(), tier2)
if err != nil {
return fmt.Errorf("failed to delete tier2: %v", err)
_, err := f.KubeClient.CoreV1().PersistentVolumeClaims(namespace).Get(tier2.Name, metav1.GetOptions{})

if err == nil {
err := f.Client.Delete(goctx.TODO(), tier2)
if err != nil {
return fmt.Errorf("failed to delete tier2: %v", err)
}
}

err = wait.Poll(RetryInterval, 3*time.Minute, func() (done bool, err error) {
Expand Down

0 comments on commit 5494de9

Please sign in to comment.