-
Notifications
You must be signed in to change notification settings - Fork 1k
End 2 End tests speedup #1180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
End 2 End tests speedup #1180
Changes from all commits
21afc07
cc4bfb0
38e6261
ccde8c6
c1ad716
966575d
4fc8ca3
c6c4c4c
668ef51
2066256
9b596f1
f03409d
39641e8
6b91bd3
b422cf9
e40abdb
1f3730b
2aeaad0
0143a47
aa3100c
d88e62f
0c0474c
3d734b1
8b057d4
5294995
150205e
a8c777a
acc1d5e
a53280e
89741c4
88e8995
eb8df06
e6b71cb
8dc6c08
d2599d9
826d7c0
326c67b
b606b6f
60cbd4e
24a2a62
9a7fc85
30ddfc9
474d4d9
cabb7bc
30cd4ed
e3f32d2
d24c128
067c7b5
85ae41b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
export cluster_name="postgres-operator-e2e-tests" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why does a |
||
export kubeconfig_path="/tmp/kind-config-${cluster_name}" | ||
export operator_image="registry.opensource.zalan.do/acid/postgres-operator:latest" | ||
export e2e_test_runner_image="registry.opensource.zalan.do/acid/postgres-operator-e2e-tests-runner:0.3" | ||
|
||
docker run -it --entrypoint /bin/bash --network=host -e "TERM=xterm-256color" \ | ||
--mount type=bind,source="$(readlink -f ${kubeconfig_path})",target=/root/.kube/config \ | ||
--mount type=bind,source="$(readlink -f manifests)",target=/manifests \ | ||
--mount type=bind,source="$(readlink -f tests)",target=/tests \ | ||
--mount type=bind,source="$(readlink -f exec.sh)",target=/exec.sh \ | ||
--mount type=bind,source="$(readlink -f scripts)",target=/scripts \ | ||
-e OPERATOR_IMAGE="${operator_image}" "${e2e_test_runner_image}" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
kubectl delete postgresql acid-minimal-cluster | ||
kubectl delete deployments -l application=db-connection-pooler,cluster-name=acid-minimal-cluster | ||
kubectl delete statefulsets -l application=spilo,cluster-name=acid-minimal-cluster | ||
kubectl delete services -l application=spilo,cluster-name=acid-minimal-cluster | ||
kubectl delete configmap postgres-operator | ||
kubectl delete deployment postgres-operator | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This may be subject to a race condition where an operator is deleted earlier that it completes the clean up. That happened earlier both in this e2e pipeline and the |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
kubectl logs $(kubectl get pods -l name=postgres-operator --field-selector status.phase=Running -o jsonpath='{.items..metadata.name}') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can that command be wrapped into a function so that source e2e/scripts/get_logs.sh would work ? |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
watch -c " | ||
kubectl get postgresql | ||
echo | ||
echo -n 'Rolling upgrade pending: ' | ||
kubectl get statefulset -o jsonpath='{.items..metadata.annotations.zalando-postgres-operator-rolling-update-required}' | ||
echo | ||
echo | ||
kubectl get pods -o wide | ||
echo | ||
kubectl get statefulsets | ||
echo | ||
kubectl get deployments | ||
echo | ||
kubectl get pods -l name=postgres-operator -o jsonpath='{.items..metadata.annotations.step}' | ||
echo | ||
kubectl get pods -l application=spilo -o jsonpath='{.items..spec.containers..image}' | ||
" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may or may not work depending on the state in which the last test to run leaves the cluster.
It is assumed that individual unit tests will properly clean up after themselves, but that is not given.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you are correct. This does not work when stuff is broken. But we cant fix it all now. Future work to have e2e tests not be so mixed up and depending on each other.
Most are easy, bit more annoying to fix are those nodes label and toleration changes.