diff --git a/tests/test_conda.py b/tests/test_conda.py index 5aadb8a90c89b3caa71040ca6e47c74a7ff0a7e1..d7e96842da7cb87256c6302c24b6872a30daafeb 100644 --- a/tests/test_conda.py +++ b/tests/test_conda.py @@ -4,8 +4,8 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( '.molecule/ansible_inventory').get_hosts('all') -def test_conda_user(User): - user = User('conda') +def test_conda_user(host): + user = host.user('conda') assert user.exists assert user.group == 'users' assert user.home == '/home/conda' @@ -13,12 +13,12 @@ def test_conda_user(User): assert user.expiration_date is None -def test_conda_version(Command): - cmd = Command('/opt/conda/bin/conda --version 2>&1') +def test_conda_version(host): + cmd = host.run('/opt/conda/bin/conda --version 2>&1') assert cmd.rc == 0 assert cmd.stdout.strip() == 'conda 4.3.14' -def test_conda_path(Command): - cmd = Command('su -l -c "echo \$PATH" conda') +def test_conda_path(host): + cmd = host.run('su -l -c "echo \$PATH" conda') assert cmd.stdout.startswith('/opt/conda/bin:') diff --git a/tests/test_conda_uid.py b/tests/test_conda_uid.py index d46041d065076c3fef81cfe66f692b4ba48426fa..d15930999a439712d19bc0b037358219304536bd 100644 --- a/tests/test_conda_uid.py +++ b/tests/test_conda_uid.py @@ -5,8 +5,8 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( '.molecule/ansible_inventory').get_hosts('set_uid') -def test_conda_uid(User): - user = User('conda') +def test_conda_uid(host): + user = host.user('conda') assert user.uid == 48