From c7f3c8aed442c6cbb99e838d8911b8b643f520d9 Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Wed, 28 Oct 2026 02:54:27 -0300 Subject: [PATCH] test(install): the post.xcat scripts are not checked for IPv6 URL hosts post.xcat.rhels10 brackets the management node address before it goes in a URL and the other two copies did not, and nothing held the three to each other. The test drives each script's own format_uri_host with one table, and asserts that no download URL in them interpolates MASTER_IP unbracketed. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> --- xCAT-test/bats/ipv6_post_xcat_uri_host.bats | 73 +++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 xCAT-test/bats/ipv6_post_xcat_uri_host.bats diff --git a/xCAT-test/bats/ipv6_post_xcat_uri_host.bats b/xCAT-test/bats/ipv6_post_xcat_uri_host.bats new file mode 100644 index 0000000000..2c0a0e2165 --- /dev/null +++ b/xCAT-test/bats/ipv6_post_xcat_uri_host.bats @@ -0,0 +1,73 @@ +#!/usr/bin/env bats +# +# The post.xcat scripts build the URLs a node downloads its postscripts from. An IPv6 +# management node address already contains colons, so "http://$MASTER_IP:$HTTPPORT/..." +# is not a URL and curl and wget both refuse it. The node then halts in %post, and xCAT +# records status=failed after the install itself succeeded. +# +# Three scripts carry the same work and each needs the helper: post.xcat.rhels10 for EL 10, +# post.xcat.ng for openEuler, EL 8, EL 9 and CentOS 8, and post.xcat for the Ubuntu and +# SUSE post scripts that include it. They are separate copies because the node has no +# shared shell library at the point each one runs, so the copies are driven with one table. + +load 'helpers/shell_source' + +POST_SCRIPTS=( + 'xCAT-server/share/xcat/install/scripts/post.xcat.rhels10' + 'xCAT-server/share/xcat/install/scripts/post.xcat.ng' + 'xCAT-server/share/xcat/install/scripts/post.xcat' +) + +# host_for