Skip to content

Commit 9c4194e

Browse files
automation, kmp: preserve failure logs in artifacts (#2405)
When kubemacpool functional tests fail in CNAO's test lane, the detailed failure logs (pod logs, services, endpoints, network policies) were being lost because they are written to the cloned kubemacpool repository's _out/ directory, which gets deleted during teardown [0]. This change copies the kubemacpool failure logs from the temporary component directory to CNAO's artifacts directory before cleanup, ensuring they are preserved for debugging failed tests. [0] https://github.com/k8snetworkplumbingwg/kubemacpool/blob/main/tests/tests_suite_test.go#L24 Signed-off-by: Ram Lavi <[email protected]> Co-authored-by: Ram Lavi <[email protected]>
1 parent b3a4eef commit 9c4194e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

automation/check-patch.e2e-kubemacpool-functests.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ function __get_skipped_tests() {
2828
}
2929

3030
teardown() {
31+
# Copy kubemacpool failure logs to CNAO artifacts before cleanup
32+
cp ${TMP_COMPONENT_PATH}/tests/_out/*.log $ARTIFACTS || true
3133
rm -rf "${TMP_COMPONENT_PATH}"
3234
cd ${TMP_PROJECT_PATH}
3335
make cluster-down

0 commit comments

Comments
 (0)