Skip to content

Commit

Permalink
tests: Add an interactive MicroCloud test with IPv6 disabled and IPv4…
Browse files Browse the repository at this point in the history
… disabled

Signed-off-by: Gabriel Mougard <[email protected]>
  • Loading branch information
gabrielmougard committed Jun 7, 2024
1 parent c2c6c5d commit 1d136ef
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions test/suites/basic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,44 @@ test_interactive() {
validate_system_lxd "${m}" 3 disk1
done

# Reset the systems with just LXD and no IPv6 support.
reset_systems 3 3 1

for m in micro01 micro02 micro03 ; do
lxc exec "${m}" -- echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
lxc exec "${m}" -- snap disable microceph || true
lxc exec "${m}" -- snap disable microovn || true
lxc exec "${m}" -- snap restart microcloud
done

echo "Creating a MicroCloud with ZFS storage and no IPv6 support"
microcloud_interactive | lxc exec micro01 -- sh -c "microcloud init > out"

lxc exec micro01 -- tail -1 out | grep "MicroCloud is ready" -q
for m in micro01 micro02 micro03 ; do
validate_system_lxd "${m}" 3 disk1
done

# Reset the systems with just LXD and no IPv4 support.
gw_net_addr=$(lxc network get lxdbr0 ipv4.address)
lxc network set lxdbr0 ipv4.address none
reset_systems 3 3 1

for m in micro01 micro02 micro03 ; do
lxc exec "${m}" -- snap disable microceph || true
lxc exec "${m}" -- snap disable microovn || true
lxc exec "${m}" -- snap restart microcloud
done

echo "Creating a MicroCloud with ZFS storage and no IPv4 support"
microcloud_interactive | lxc exec micro01 -- sh -c "microcloud init > out"

# Ensure we logged out that FAN networking was not usable.
lxc exec micro01 -- cat out | grep "FAN networking is not usable, skipping" -q

# Set the IPv4 address back to the original value.
lxc network set lxdbr0 ipv4.address "${gw_net_addr}"

# Reset the systems and install microceph.
reset_systems 3 3 1

Expand Down

0 comments on commit 1d136ef

Please sign in to comment.