Skip to content

Commit f3046e6

Browse files
committed
install pytest-spec and run tests in spec output format
1 parent 9067ca0 commit f3046e6

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

roles/testinfra/tasks/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22

33
- name: Install testinfra at version 5.0.0
44
pip: state=present name=testinfra version=5.0.0
5+
6+
- name: Install pytest-spec formatter at version 2.0.0
7+
pip: state=present name=pytest-spec version=2.0.0

scripts/update-vm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ verify_vm() {
6868
big_step "Verifying the VM..."
6969
cd $REPO_ROOT
7070
step "run integration tests"
71-
py.test -v --color=yes spec/*.py
71+
py.test -v --color=yes --spec spec/*.py
7272
}
7373

7474
big_step() {

spec/test_testinfra.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,9 @@
22
def test_testinfra_is_installed_at_version_5_0_0_(host):
33
cmd = host.run("pip3 show --disable-pip-version-check testinfra")
44
assert cmd.rc is 0
5-
assert "Name: testinfra\nVersion: 5.0.0" in cmd.stdout
5+
assert "Name: testinfra\nVersion: 5.0.0" in cmd.stdout
6+
7+
def test_pytest_spec_is_installed_at_version_2_0_0_(host):
8+
cmd = host.run("pip3 show --disable-pip-version-check pytest-spec")
9+
assert cmd.rc is 0
10+
assert "Name: pytest-spec\nVersion: 2.0.0" in cmd.stdout

0 commit comments

Comments
 (0)