mirror of
https://github.com/rancher/os.git
synced 2025-09-01 06:40:31 +00:00
test docker config
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
import pytest
|
||||
import rancherostest.util as u
|
||||
import string
|
||||
import subprocess
|
||||
import yaml
|
||||
|
||||
|
||||
ssh_command = ['ssh', '-p', '2222', '-F', './assets/scripts_ssh_config', '-i', './tests/integration/assets/test.key',
|
||||
'rancher@localhost']
|
||||
cloud_config_path = './tests/integration/assets/cloud-config-01.yml'
|
||||
cloud_config_path = './tests/integration/assets/test_01/cloud-config.yml'
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
@@ -39,6 +40,20 @@ def test_rancher_environment(qemu, cloud_config):
|
||||
assert v.strip() == cloud_config['rancher']['environment']['FLANNEL_NETWORK']
|
||||
|
||||
|
||||
@pytest.mark.timeout(40)
|
||||
def test_docker_args(qemu, cloud_config):
|
||||
assert qemu is not None
|
||||
u.wait_for_ssh(ssh_command)
|
||||
|
||||
v = subprocess.check_output(
|
||||
ssh_command + ['sh', '-c', 'ps -ef | grep docker'],
|
||||
stderr=subprocess.STDOUT, universal_newlines=True)
|
||||
|
||||
expected = string.join(cloud_config['rancher']['docker']['args'])
|
||||
|
||||
assert v.find(expected) != -1
|
||||
|
||||
|
||||
@pytest.mark.timeout(40)
|
||||
def test_rancher_network(qemu, cloud_config):
|
||||
assert qemu is not None
|
||||
|
Reference in New Issue
Block a user