File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+
3+ - name : Install ansible-lint at version 4.2.0
4+ pip : state=present name=ansible-lint version=4.2.0
Original file line number Diff line number Diff line change @@ -67,6 +67,10 @@ update_vm() {
6767verify_vm () {
6868 big_step " Verifying the VM..."
6969 cd $REPO_ROOT
70+
71+ step " run ansible linting"
72+ ansible-lint --force-color
73+
7074 step " run integration tests"
7175 py.test -v --color=yes --spec spec/* .py
7276}
Original file line number Diff line number Diff line change 1010- hosts : localhost
1111 roles :
1212 - { role: readme, tags: "readme" }
13+ - { role: ansible-lint, tags: "ansible-lint" }
1314 - { role: testinfra, tags: "testinfra" }
Original file line number Diff line number Diff line change 1+
2+ def test_ansible_lint_is_installed_at_version_4_2_0_ (host ):
3+ cmd = host .run ("pip3 show --disable-pip-version-check ansible-lint" )
4+ assert cmd .rc is 0
5+ assert "Name: ansible-lint\n Version: 4.2.0" in cmd .stdout
6+
7+ def test_ansible_lint_command_is_found_ (host ):
8+ assert host .run ('which ansible-lint' ).rc is 0
9+
10+ def test_ansible_lint_version_command_reports_version_4_2_0_ (host ):
11+ assert '4.2.0' in host .run ('ansible-lint --version' ).stdout
You can’t perform that action at this time.
0 commit comments