Skip to content

Commit 1ce0e9a

Browse files
committed
Attempt console login in offline tests, add trailing slash to wget
1 parent 16f0b98 commit 1ce0e9a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

test/bin/scenario.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ launch_vm() {
622622
vm_extra_args+=" inst.ks=file:/$(basename "${kickstart_file}")"
623623
vm_initrd_inject+=" --initrd-inject ${kickstart_file}"
624624
# Download and inject all the kickstart include files
625-
wget -r -q -nd -A "*.cfg" -P "${kickstart_idir}" "$(dirname "${kickstart_url}")"
625+
wget -r -q -nd -A "*.cfg" -P "${kickstart_idir}" "$(dirname "${kickstart_url}")/"
626626
for cfg_file in "${kickstart_idir}"/*.cfg ; do
627627
vm_initrd_inject+=" --initrd-inject ${cfg_file}"
628628
done
@@ -1076,10 +1076,15 @@ action_login() {
10761076
vmname="$1"
10771077
fi
10781078

1079-
ssh_port=$(get_vm_property "${vmname}" "ssh_port")
1079+
ssh_port=$(get_vm_property "${vmname}" "ssh_port" || true)
10801080
ip=$(get_vm_property "${vmname}" "ip")
10811081

1082-
ssh "redhat@${ip}" -p "${ssh_port}"
1082+
if [ -z "${ssh_port}" ] ; then
1083+
local -r full_vmname="$(full_vm_name "${vmname}")"
1084+
sudo virsh console "${full_vmname}"
1085+
else
1086+
ssh "redhat@${ip}" -p "${ssh_port}"
1087+
fi
10831088
}
10841089

10851090
action_run() {

0 commit comments

Comments
 (0)