Created
October 27, 2017 02:33
-
-
Save joatmon08/4e7bfa053d89ae429c5ae41696a1bf14 to your computer and use it in GitHub Desktop.
Behind the Talk, Part 2: Smoke Test Snippet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def run(host1_client, host2_client, network_name, cidr_block): | |
| ip_addresses = _get_ip_addresses(cidr_block, 5, 2) | |
| container1 = TestContainer(host1_client, ip_addresses[0], network_name) | |
| container2 = TestContainer(host2_client, ip_addresses[1], network_name) | |
| time.sleep(5) | |
| output1 = container1.ping(container2.ip_address) | |
| output2 = container2.ping(container1.ip_address) | |
| container1.destroy() | |
| container2.destroy() | |
| assert _lost_packets(output1) is False, 'Container on host1 cannot reach container on host2' | |
| assert _lost_packets(output2) is False, 'Container on host2 cannot reach container on host1' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment