1
0
mirror of https://github.com/rancher/os.git synced 2025-10-20 23:14:30 +00:00

test_rancher_network - wip

This commit is contained in:
Ivan Mikushin
2015-05-08 19:39:09 +05:00
parent 3eefe3785b
commit 4d594b768f
2 changed files with 18 additions and 1 deletions

View File

@@ -3,6 +3,11 @@ rancher:
environment:
ETCD_DISCOVERY: https://discovery.etcd.io/c2c219023108cda9529364d6d983fe13
FLANNEL_NETWORK: 10.244.0.0/16
network:
interfaces:
eth0:
address: 10.0.2.15/24
gateway: 10.0.2.2
mtu: 1500
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDUlsWAL5Rf0Wis/A7k7Tlqx0fZS60VzCZrPZYbP/wkL95jv0XzCx8bd1rZHeybblHPDNpND3BLv4qPY5DxRyexF4seGuzcJI/pOvGUGjQondeMPgDTFEo5w939gSdeTZcfXzQ0wAVhzwDbgH4zPfMzbdoo8Aiu9jkKljXw8IFju0gh+t6iKkGZCIjKT9o7zza1vGfkodhvi2V3VzPdNO28gaxZaRNtmBYUoVnGyR6nXN1Q3CJaVuh5o6GPCOqrhHNbYOFZKBpDiHbxPhVpxHQD2+8yUSGTG7WW75FfZePja5y8d0c/O5L37ZYx4AZAd3KgQYDBT2XCEJGQNawNbfpt

View File

@@ -36,3 +36,15 @@ def test_rancher_environment(qemu, cloud_config_01):
stderr=subprocess.STDOUT, universal_newlines=True)
assert v.strip() == cloud_config_01['rancher']['environment']['FLANNEL_NETWORK']
@pytest.mark.timeout(40)
def test_rancher_network(qemu, cloud_config_01):
assert qemu is not None
u.wait_for_ssh(ssh_command)
v = subprocess.check_output(
ssh_command + ['ip', 'route', 'get', 'to', '10.10.10.10'],
stderr=subprocess.STDOUT, universal_newlines=True)
assert v.split(' ')[2] == cloud_config_01['rancher']['network']['interfaces']['eth0']['gateway']