Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Brockbank committed Jan 19, 2018
1 parent 51a9d91 commit 61bc41d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions calico_node/tests/st/bgp/test_ipip.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,12 @@ def test_issue_1584(self, backend):
with DockerHost('host1',
additional_docker_options=CLUSTER_STORE_DOCKER_OPTIONS,
start_calico=False) as host1, \
DockerHost('host2',
additional_docker_options=CLUSTER_STORE_DOCKER_OPTIONS,
start_calico=False) as host2:
DockerHost('host2',
additional_docker_options=CLUSTER_STORE_DOCKER_OPTIONS,
start_calico=False) as host2:

# Create an IP pool with IP-in-IP disabled.
self.pool_action(host1, "create", DEFAULT_IPV4_POOL_CIDR, ipip_mode="Never")
self.pool_action(host1, "create", DEFAULT_IPV4_POOL_CIDR, False)

# Autodetect the IP addresses - this should ensure the subnet is
# correctly configured.
Expand All @@ -215,14 +215,14 @@ def test_issue_1584(self, backend):
workload_host2.ip])

# Turn on IPIP and check that IPIP tunnel is being used.
self.pool_action(host1, "replace", DEFAULT_IPV4_POOL_CIDR, ipip_mode="Always")
self.pool_action(host1, "replace", DEFAULT_IPV4_POOL_CIDR, True, ipip_mode="always")
self.assert_ipip_routing(host1, workload_host1, workload_host2,
True)

# Toggle the IPIP mode between being expecting IPIP and not. Only the mode
# "Always" should result in IPIP tunnel being used in these tests.
modes = ["Always"]
for mode in ["CrossSubnet", "Always", "Never", "Always"]:
modes = ["always"]
for mode in ["cross-subnet", "always", None, "always"]:
# At the start of this loop we should have connectivity.
logger.info("New mode setting: %s" % mode)
logger.info("Previous mode settings: %s" % modes)
Expand All @@ -235,7 +235,7 @@ def test_issue_1584(self, backend):
modes[-1] == "Always")

# Update the IPIP mode.
self.pool_action(host1, "replace", DEFAULT_IPV4_POOL_CIDR, ipip_mode=mode)
self.pool_action(host1, "replace", DEFAULT_IPV4_POOL_CIDR, mode is not None, ipip_mode=mode)
modes.append(mode)

# At this point, since we are toggling between IPIP connectivity and no IPIP
Expand Down

0 comments on commit 61bc41d

Please sign in to comment.