F36 has dropped support on ifcfg and as a result all network tests fail.
Use .nmconnection to set up test network instead.
Signed-off-by: Coiby Xu <coxu(a)redhat.com>
---
tests/scripts/testcases/nfs-kdump/0-server.sh | 13 +++++++------
tests/scripts/testcases/ssh-kdump/0-server.sh | 13 +++++++------
2 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/tests/scripts/testcases/nfs-kdump/0-server.sh b/tests/scripts/testcases/nfs-kdump/0-server.sh
index cf54e70a..5436d3d2 100755
--- a/tests/scripts/testcases/nfs-kdump/0-server.sh
+++ b/tests/scripts/testcases/nfs-kdump/0-server.sh
@@ -16,12 +16,13 @@ on_build() {
img_run_cmd "echo dhcp-range=192.168.77.50,192.168.77.100,255.255.255.0,12h >> /etc/dnsmasq.conf"
img_run_cmd "systemctl enable dnsmasq"
- img_run_cmd 'echo DEVICE="eth0" > /etc/sysconfig/network-scripts/ifcfg-eth0'
- img_run_cmd 'echo BOOTPROTO="none" >> /etc/sysconfig/network-scripts/ifcfg-eth0'
- img_run_cmd 'echo ONBOOT="yes" >> /etc/sysconfig/network-scripts/ifcfg-eth0'
- img_run_cmd 'echo PREFIX="24" >> /etc/sysconfig/network-scripts/ifcfg-eth0'
- img_run_cmd 'echo IPADDR="192.168.77.1" >> /etc/sysconfig/network-scripts/ifcfg-eth0'
- img_run_cmd 'echo TYPE="Ethernet" >> /etc/sysconfig/network-scripts/ifcfg-eth0'
+ img_run_cmd 'echo [connection] > /etc/NetworkManager/system-connections/eth0.nmconnection'
+ img_run_cmd 'echo type=ethernet >> /etc/NetworkManager/system-connections/eth0.nmconnection'
+ img_run_cmd 'echo interface-name=eth0 >> /etc/NetworkManager/system-connections/eth0.nmconnection'
+ img_run_cmd 'echo [ipv4] >> /etc/NetworkManager/system-connections/eth0.nmconnection'
+ img_run_cmd 'echo address1=192.168.77.1/24 >> /etc/NetworkManager/system-connections/eth0.nmconnection'
+ img_run_cmd 'echo method=manual >> /etc/NetworkManager/system-connections/eth0.nmconnection'
+ img_run_cmd 'chmod 600 /etc/NetworkManager/system-connections/eth0.nmconnection'
img_add_qemu_cmd "-nic socket,listen=:8010,mac=52:54:00:12:34:56"
}
diff --git a/tests/scripts/testcases/ssh-kdump/0-server.sh b/tests/scripts/testcases/ssh-kdump/0-server.sh
index 6dfcc913..b4b84c96 100755
--- a/tests/scripts/testcases/ssh-kdump/0-server.sh
+++ b/tests/scripts/testcases/ssh-kdump/0-server.sh
@@ -17,12 +17,13 @@ on_build() {
img_run_cmd "echo dhcp-range=192.168.77.50,192.168.77.100,255.255.255.0,12h >> /etc/dnsmasq.conf"
img_run_cmd "systemctl enable dnsmasq"
- img_run_cmd 'echo DEVICE="eth0" > /etc/sysconfig/network-scripts/ifcfg-eth0'
- img_run_cmd 'echo BOOTPROTO="none >> /etc/sysconfig/network-scripts/ifcfg-eth0"'
- img_run_cmd 'echo ONBOOT="yes" >> /etc/sysconfig/network-scripts/ifcfg-eth0'
- img_run_cmd 'echo PREFIX="24" >> /etc/sysconfig/network-scripts/ifcfg-eth0'
- img_run_cmd 'echo IPADDR="192.168.77.1" >> /etc/sysconfig/network-scripts/ifcfg-eth0'
- img_run_cmd 'echo TYPE="Ethernet" >> /etc/sysconfig/network-scripts/ifcfg-eth0'
+ img_run_cmd 'echo [connection] > /etc/NetworkManager/system-connections/eth0.nmconnection'
+ img_run_cmd 'echo type=ethernet >> /etc/NetworkManager/system-connections/eth0.nmconnection'
+ img_run_cmd 'echo interface-name=eth0 >> /etc/NetworkManager/system-connections/eth0.nmconnection'
+ img_run_cmd 'echo [ipv4] >> /etc/NetworkManager/system-connections/eth0.nmconnection'
+ img_run_cmd 'echo address1=192.168.77.1/24 >> /etc/NetworkManager/system-connections/eth0.nmconnection'
+ img_run_cmd 'echo method=manual >> /etc/NetworkManager/system-connections/eth0.nmconnection'
+ img_run_cmd 'chmod 600 /etc/NetworkManager/system-connections/eth0.nmconnection'
}
# Executed when VM boots
--
2.37.3