tokenbridge/deployment-e2e/molecule/repo/tests/test_non_existing.py
Przemyslaw Rzad 54858ae597
Molecule tests for deploying repository (#194)
* Squashed commits

* All jobs

* Rollback changes

* Dependencies

* Remove .git checking

* Resolve path issues

* New way of copying repository.

* Test non existing .git

* New repo task

* Typo

* Do not fail mkdir if folder exists

* Test double task

* zipping the archives

* Increase no_output_timeout because of slowly installing apt-get
2019-09-06 15:24:30 +02:00

24 lines
718 B
Python

import os
import pytest
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
@pytest.mark.parametrize("path", [
("/home/poadocker/bridge/node_modules"),
("/home/poadocker/bridge/ui/node_modules"),
("/home/poadocker/bridge/oracle/node_modules"),
("/home/poadocker/bridge/monitor/node_modules"),
("/home/poadocker/bridge/contracts/node_modules"),
])
def test_non_existing_node_modules(host, path):
assert not host.file(path).exists
@pytest.mark.parametrize("path", [
("/home/poadocker/bridge/.git")
])
def test_non_existing_git(host, path):
assert not host.file(path).exists