mirror of
https://github.com/rancher/os.git
synced 2025-08-31 22:32:14 +00:00
test docker --tlsverify
This commit is contained in:
@@ -11,6 +11,6 @@ rancher:
|
||||
mtu: 1500
|
||||
docker:
|
||||
args: [daemon, --log-opt, max-file=2, --log-opt, max-size=25m, -s, overlay, -G, docker, -H, 'unix:///var/run/docker.sock', --userland-proxy=false]
|
||||
tls_args: [--tlsverify, --tlscacert=/home/rancher/.docker/ca.pem, --tlscert=/home/rancher/.docker/server-cert.pem, --tlskey=/home/rancher/.docker/server-key.pem, '-H=0.0.0.0:2376']
|
||||
tls: true
|
||||
ssh_authorized_keys:
|
||||
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDUlsWAL5Rf0Wis/A7k7Tlqx0fZS60VzCZrPZYbP/wkL95jv0XzCx8bd1rZHeybblHPDNpND3BLv4qPY5DxRyexF4seGuzcJI/pOvGUGjQondeMPgDTFEo5w939gSdeTZcfXzQ0wAVhzwDbgH4zPfMzbdoo8Aiu9jkKljXw8IFju0gh+t6iKkGZCIjKT9o7zza1vGfkodhvi2V3VzPdNO28gaxZaRNtmBYUoVnGyR6nXN1Q3CJaVuh5o6GPCOqrhHNbYOFZKBpDiHbxPhVpxHQD2+8yUSGTG7WW75FfZePja5y8d0c/O5L37ZYx4AZAd3KgQYDBT2XCEJGQNawNbfpt
|
||||
|
@@ -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):
|
||||
|
Reference in New Issue
Block a user