summaryrefslogtreecommitdiff
path: root/test/command_callback
diff options
context:
space:
mode:
authorserapas <vytautas.macionis@manomail.de>2021-02-28 13:43:23 +0100
committerGitHub <noreply@github.com>2021-02-28 21:43:23 +0900
commit038e4a8c31feb03beea02c09d953affc8c460515 (patch)
tree4470f633a25e7fda68d9dca34c10d7ba8c1bf6cf /test/command_callback
parent76965615558e9398ef4cc79991632a7b68a6c7bc (diff)
downloadale-038e4a8c31feb03beea02c09d953affc8c460515.zip
Fix ansible-lint linter definition. (#3601)
* Fix ansible-lint linter definition. Use ansible-lint's feature auto-detection instead of temporary file. For auto-detection to work, ansible project has to be also a git repository. Don't use yaml rules. These are checked by yamllint. Refactor pattern to work with ansible-lint >=5.0 version. Clean-up obsolete test cases. * Pull Request changes
Diffstat (limited to 'test/command_callback')
-rw-r--r--test/command_callback/test_ansible_lint_command_callback.vader9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/command_callback/test_ansible_lint_command_callback.vader b/test/command_callback/test_ansible_lint_command_callback.vader
index ddc6c6c8..a3fbde23 100644
--- a/test/command_callback/test_ansible_lint_command_callback.vader
+++ b/test/command_callback/test_ansible_lint_command_callback.vader
@@ -7,11 +7,16 @@ After:
unlet! b:executable
call ale#assert#TearDownLinterTest()
-Execute(The ansible_lint command callback should return default string):
+Execute(The ansible_lint version <5.0.0 command callback should return default string):
+ GivenCommandOutput ['v4.1.2']
AssertLinter 'ansible-lint', ale#Escape('ansible-lint') . ' -p %t'
+Execute(The ansible_lint version >=5.0.0 command callback should return default string):
+ GivenCommandOutput ['v5.1.2']
+ AssertLinter 'ansible-lint', ale#Escape('ansible-lint') . ' --parseable-severity -x yaml'
+
Execute(The ansible_lint executable should be configurable):
let g:ale_ansible_ansible_lint_executable = '~/.local/bin/ansible-lint'
-
+ GivenCommandOutput ['v4.1.2']
AssertLinter '~/.local/bin/ansible-lint',
\ ale#Escape('~/.local/bin/ansible-lint') . ' -p %t'