You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
773 B

import pytest
from enough.common.openstack import Heat, Stack
from enough.common.ssh import SSH
from tests import prepare_config_dir
def test_ssh(openstack_name, openstack_provider, tmpdir):
domain = ''
d = Heat.hostvars_to_stack(openstack_name, openstack_provider)
config_dir = prepare_config_dir(domain, tmpdir)
provider = openstack_provider['openstack_provider']
ssh = SSH(config_dir, domain=domain, provider=provider)
s = Stack(config_dir, d)
r = ssh.ssh(openstack_name, ['uptime'], interactive=False)
assert r.returncode == 0
assert 'load average' in r.stdout.decode('utf-8')