Quick logic fix for MTU

Since Cirros has no proper ping utility, check that 9001 byte packet
could pass has no sense (ICMP will be fragmented).

Change-Id: I8501d71491ff72a56116198bbb71e6a262f49efb
Partial-Bug: #1572079
This commit is contained in:
Vladimir Eremin 2016-04-19 14:10:04 +03:00
parent 48fcef2830
commit 92ae4c8e4e

View File

@ -148,11 +148,9 @@ class TestJumboFrames(base_test_case.TestBasic):
Scenario:
1. Boot two instances on different compute hosts
2. Ping one from another with 1472 bytes package
3. Ping one from another with 8972 bytes package
4. Ping one from another with 8973 bytes package
5. Ping one from another with 14472 bytes package
6. Delete instances
2. Ping one from another with 1500 bytes packet
3. Ping one from another with 9000 bytes packet
4. Delete instances
"""
cluster_id = self.fuel_web.get_last_created_cluster()
@ -191,22 +189,14 @@ class TestJumboFrames(base_test_case.TestBasic):
timeout_msg=("Instance {0} is unreachable for 600 seconds".
format(destination_instance.id)))
for mtu in [1500, 9000, 9001]:
for mtu in [1500, 9000]:
size = mtu - 28 - mtu_offset
if mtu <= 9000:
asserts.assert_true(
self.ping_instance_from_instance(
source_instance, destination_instance, net_name,
net_destination, size=size, count=3),
"Ping response was not received for "
"{} bytes package".format(mtu))
else:
asserts.assert_false(
self.ping_instance_from_instance(
source_instance, destination_instance, net_name,
net_destination, size=size, count=3),
"Ping response was not received for "
"{} bytes package".format(mtu))
asserts.assert_true(
self.ping_instance_from_instance(
source_instance, destination_instance, net_name,
net_destination, size=size, count=3),
"Ping response was not received for "
"{} bytes package".format(mtu))
for instance in [source_instance, destination_instance]:
self.os_conn.delete_instance(instance)