Skip to content
Permalink
Browse files

New NetworkInfo test cases

  - Multiple IPs Can Ping
  - Static IPs
  - Mix static and assigned IPs
  • Loading branch information...
Spike Curtis
Spike Curtis committed Nov 3, 2015
1 parent 60e6f76 commit c0a9f556edf2f2267429ba51dda2b37b7632ef89
Showing with 28 additions and 0 deletions.
  1. +28 −0 framework/calico_framework.py
@@ -640,6 +640,34 @@ class NotEnoughResources(Exception):
name=test_name)
scheduler.tests.append(test)

test_name = "Multiple IPs Can Ping"
sleep_task = SleepTask(netgroups=['A'], auto_ipv4=2)
ping_task = PingTask(netgroups=['A', 'D'],
can_ping_targets=[sleep_task],
auto_ipv4=3)
test = TestCase([sleep_task, ping_task], name=test_name)
scheduler.tests.append(test)

test_name = "Static IPs"
sleep_task = SleepTask(requested_ips=["192.168.28.23"],
netgroups=['A'],
auto_ipv4=2)
ping_task = PingTask(requested_ips=["192.168.28.34"],
netgroups=['A', 'D'],
can_ping_targets=[sleep_task])
test = TestCase([sleep_task, ping_task], name=test_name)
scheduler.tests.append(test)

test_name = "Mix static and assigned IPs"
sleep_task = SleepTask(requested_ips=["192.168.27.23",
"192.168.27.34"],
netgroups=['A'],
auto_ipv4=2)
ping_task = PingTask(netgroups=['A', 'D'],
can_ping_targets=[sleep_task])
test = TestCase([sleep_task, ping_task], name=test_name)
scheduler.tests.append(test)

# Same IPs fail
# TODO: fail test individually on isolator error
# sleep_task_a = SleepTask(ip="192.168.254.1")

0 comments on commit c0a9f55

Please sign in to comment.
You can’t perform that action at this time.