Fix err checks from volume manager
What does this MR do?
Fix err checks from volume manager
Why was this MR needed?
In !1989 (merged) we
started wrapping the
errors
with the new Go 1.13 syntax. What we failed to update is the assertions,
we still used the old assertions such as
==
and using type
assertion
which don't work when the errors are wrapped. Using
errors.Is
and
errors.As
.
The tests didn't catch this because we mock the errors and we just
return the error and don't wrap it with %w
like it is done in the
actual implement so the old assertions worked fine.
Testing
config.toml
[[runners]]
name = "docker"
url = "http://192.168.144.160:3000"
token = "xxxx"
executor = "docker"
[runners.docker]
tls_verify = false
image = "alpine:3.11"
privileged = true
disable_entrypoint_overwrite = false
oom_kill_disable = false
disable_cache = true
volumes = ["/cache", "/tmp/builds:/builds" ]
shm_size = 0
helper_image = "gitlab/gitlab-runner-helper:x86_64-4c96e5ad"
Does this MR meet the acceptance criteria?
-
Documentation created/updated -
Added tests for this feature/bug -
In case of conflicts with master
- branch was rebased
What are the relevant issue numbers?
Closes #25428 (closed)