summaryrefslogtreecommitdiff
path: root/test/linter/test_hadolint.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/linter/test_hadolint.vader')
-rw-r--r--test/linter/test_hadolint.vader25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/linter/test_hadolint.vader b/test/linter/test_hadolint.vader
new file mode 100644
index 00000000..da335400
--- /dev/null
+++ b/test/linter/test_hadolint.vader
@@ -0,0 +1,25 @@
+Before:
+ call ale#assert#SetUpLinterTest('dockerfile', 'hadolint')
+
+After:
+ call ale#assert#TearDownLinterTest()
+
+Execute(We should not use Docker by default):
+ AssertLinter 'hadolint', 'hadolint --no-color -'
+
+Execute(Options should be passed correctly when docker is disabled):
+ let b:ale_dockerfile_hadolint_options = '--ignore DL3006'
+
+ AssertLinter 'hadolint', 'hadolint --ignore DL3006 --no-color -'
+
+Execute(The command should be correct when using Docker):
+ let b:ale_dockerfile_hadolint_use_docker = 'always'
+
+ AssertLinter 'docker', 'docker run --rm -i hadolint/hadolint hadolint --no-color -'
+
+Execute(The command should be correct when using docker and supplying options):
+ let b:ale_dockerfile_hadolint_use_docker = 'always'
+ let b:ale_dockerfile_hadolint_options = '--ignore DL3006'
+
+ AssertLinter 'docker',
+ \ 'docker run --rm -i hadolint/hadolint hadolint --ignore DL3006 --no-color -'