Skip to content

Commit

Permalink
test-incus-network-ovn: Update for correct load-balancer count
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Graber <[email protected]>
  • Loading branch information
stgraber committed Jun 21, 2024
1 parent b7a23d6 commit 3861971
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/test-incus-network-ovn
Original file line number Diff line number Diff line change
Expand Up @@ -661,15 +661,15 @@ ovn_forward_tests() {
# Check basic forward default target address can be set (to non-existent target address).
incus network forward set ovn-virtual-network 192.0.2.1 target_address="${ip4AddressPrefix}.2"
incus network forward set ovn-virtual-network 2001:db8:1:2::1 target_address="${ip6AddressPrefix}::2"
ovn-nbctl list load_balancer | grep -cF name | grep -xF 2
ovn-nbctl list load_balancer | grep -cF name | grep -xF 4
incus network forward delete ovn-virtual-network 192.0.2.1
incus network forward delete ovn-virtual-network 2001:db8:1:2::1
ovn-nbctl list load_balancer | grep -cF name | grep -xF 0

# Check basic forward can be created with target address (to non-existent target address).
incus network forward create ovn-virtual-network 192.0.2.1 target_address="${ip4AddressPrefix}.2"
incus network forward create ovn-virtual-network 2001:db8:1:2::1 target_address="${ip6AddressPrefix}::2"
ovn-nbctl list load_balancer | grep -cF name | grep -xF 2
ovn-nbctl list load_balancer | grep -cF name | grep -xF 4

# Check duplicate forwards cannot be created.
! incus network forward create ovn-virtual-network 192.0.2.1 target_address="${ip4AddressPrefix}.2" || false
Expand Down Expand Up @@ -715,9 +715,9 @@ ovn_forward_tests() {
! incus network set ovn-virtual-network2 ipv6.address=2001:db8:1:3::1/64 || false

# Check network forwards are removed when network is removed.
ovn-nbctl list load_balancer | grep -cF name | grep -xF 4
ovn-nbctl list load_balancer | grep -cF name | grep -xF 8
incus network delete ovn-virtual-network2
ovn-nbctl list load_balancer | grep -cF name | grep -xF 2
ovn-nbctl list load_balancer | grep -cF name | grep -xF 4

# Create instance connected to ovn-virtual-network.
incus launch "${instanceImage}" u1 -n ovn-virtual-network -s default
Expand Down

0 comments on commit 3861971

Please sign in to comment.