Skip to content

Commit a77290e

Browse files
committed
Improve e2e tests with more artifact collection
1 parent 2930f30 commit a77290e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/scripts/installandtest.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,18 @@ fi
4242

4343
echo "Saving the dump of the pods logs in the artifacts directory"
4444
oc get pods -o yaml -n ${ODHPROJECT} > ${ARTIFACT_DIR}/${ODHPROJECT}.pods.yaml
45+
oc get pods -o yaml -n data-science-pipelines-test > ${ARTIFACT_DIR}/data-science-pipelines-test.pods.yaml
4546
oc get pods -o yaml -n openshift-operators > ${ARTIFACT_DIR}/openshift-operators.pods.yaml
4647
echo "Saving the events in the artifacts directory"
4748
oc get events --sort-by='{.lastTimestamp}' > ${ARTIFACT_DIR}/${ODHPROJECT}.events.txt
49+
oc get events --sort-by='{.lastTimestamp}' -n data-science-pipelines-test > ${ARTIFACT_DIR}/data-science-pipelines-test.events.txt
4850
echo "Saving the logs from the opendatahub-operator pod in the artifacts directory"
4951
oc logs -n openshift-operators $(oc get pods -n openshift-operators -l name=opendatahub-operator -o jsonpath="{$.items[*].metadata.name}") > ${ARTIFACT_DIR}/opendatahub-operator.log 2> /dev/null || echo "No logs for openshift-operators/opendatahub-operator"
52+
echo "Saving the logs from the Data Science Pipelines Operator pods in the artifacts directory"
53+
for pod in $(oc get pods -n opendatahub -l control-plane=controller-manager -o jsonpath="{$.items[*].metadata.name}");
54+
do
55+
oc logs -n opendatahub $pod > ${ARTIFACT_DIR}/$pod.log;
56+
done
5057

5158
if [ "$success" -ne 1 ]; then
5259
exit 1

0 commit comments

Comments
 (0)