summaryrefslogtreecommitdiff
path: root/test/test_dockerfile_hadolint_linter.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_dockerfile_hadolint_linter.vader')
-rw-r--r--test/test_dockerfile_hadolint_linter.vader20
1 files changed, 18 insertions, 2 deletions
diff --git a/test/test_dockerfile_hadolint_linter.vader b/test/test_dockerfile_hadolint_linter.vader
index 6e02b212..ba7e2187 100644
--- a/test/test_dockerfile_hadolint_linter.vader
+++ b/test/test_dockerfile_hadolint_linter.vader
@@ -19,6 +19,7 @@ After:
Restore
silent! unlet b:ale_dockerfile_hadolint_use_docker
silent! unlet b:ale_dockerfile_hadolint_docker_image
+ silent! unlet b:ale_dockerfile_hadolint_options
Execute(linter honors ..._use_docker correctly):
@@ -55,15 +56,30 @@ Execute(command is correct when using docker):
let b:ale_dockerfile_hadolint_use_docker = 'always'
AssertEqual
- \ "docker run --rm -i hadolint/hadolint hadolint --no-color -",
+ \ "docker run --rm -i hadolint/hadolint hadolint --no-color -",
\ ale_linters#dockerfile#hadolint#GetCommand(bufnr(''))
+Execute(command is correct when using docker and supplying options):
+ let b:ale_dockerfile_hadolint_use_docker = 'always'
+ let b:ale_dockerfile_hadolint_options = '--ignore DL3006'
+
+ AssertEqual
+ \ "docker run --rm -i hadolint/hadolint hadolint --ignore DL3006 --no-color -",
+ \ ale_linters#dockerfile#hadolint#GetCommand(bufnr(''))
Execute(command is correct when not docker):
let b:ale_dockerfile_hadolint_use_docker = 'never'
AssertEqual
- \ "hadolint --no-color -",
+ \ "hadolint --no-color -",
+ \ ale_linters#dockerfile#hadolint#GetCommand(bufnr(''))
+
+Execute(command is correct when not docker and supplying options):
+ let b:ale_dockerfile_hadolint_use_docker = 'never'
+ let b:ale_dockerfile_hadolint_options = '--ignore DL3006'
+
+ AssertEqual
+ \ "hadolint --ignore DL3006 --no-color -",
\ ale_linters#dockerfile#hadolint#GetCommand(bufnr(''))
Execute(test warnings from hadolint):