1
0
mirror of https://github.com/rancher/os.git synced 2025-09-16 15:09:27 +00:00

test docker --tlsverify

This commit is contained in:
Ivan Mikushin
2015-12-11 13:40:24 +05:00
parent 3e44413aa9
commit fde9d035b0
2 changed files with 3 additions and 16 deletions

View File

@@ -71,26 +71,13 @@ def test_docker_tls_args(qemu, cloud_config):
u.wait_for_ssh(ssh_command)
subprocess.check_call(
ssh_command + ['sudo', 'ros', 'tls', 'generate', '-s', '--hostname', '10.10.2.120', '-d', '~/.docker'],
ssh_command + ['sudo', 'ros', 'tls', 'gen'],
stderr=subprocess.STDOUT, universal_newlines=True)
subprocess.check_call(
ssh_command + ['sudo', 'ros', 'config', 'set', 'rancher.docker.tls', 'true'],
ssh_command + ['docker', '--tlsverify', '-H', '127.0.0.1:2376', 'version'],
stderr=subprocess.STDOUT, universal_newlines=True)
subprocess.check_call(
ssh_command + ['sudo', 'system-docker', 'restart', 'docker'],
stderr=subprocess.STDOUT, universal_newlines=True)
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']['tls_args'])
assert v.find(expected) != -1
@pytest.mark.timeout(40)
def test_rancher_network(qemu, cloud_config):