test-suite: update ipmitool WW check
@@ -12,28 +12,11 @@ if [ -n "$IPMI_PASSWORD" ];then
export IPMI_PASSWORD
fi
-@test "[warewulf-ipmi] ipmitool compiled with lanplus" {
- [[ "$ARCH" == "aarch64" ]] && skip "Skipping warewulf-ipmitool check for ARCH=$ARCH"
+@test "[warewulf-ipmi] ipmitool lanplus protocol" {
rpm -q --quiet warewulf-ipmi-ohpc || skip "Warewulf not installed, skipping warewulf-ipmitool check"
- if [ -z "$IPMI_PASSWORD" ];then
- flunk "IPMI_PASSWORD is not set"
- fi
-
- for lan in `seq 1 4`; do
- ipmitool lan print $lan > .cmd_output || flunk "Unable to run ipmitool"
- local my_bmc_ip=`cat .cmd_output | grep "IP Address :" | awk '{print $4}'`
-
- if [ $? -ne 0 ];then
- flunk "Unable to ascertain local BMC IP address"
- fi
-
- if [ "$my_bmc_ip" != "0.0.0.0" ];then
- break
- fi
- done
+ run wwsh ipmi powerstatus c1
+ [ "${lines[4]}" = "WARNING: PROTO: lanplus" ]
- run `rpm -ql warewulf-ipmi-ohpc | grep ipmitool` -E -I lanplus -H $my_bmc_ip -U root power status
- assert_success
}
