Skip to content

fix: validate client cert paths exist on disk before proceeding

feistel requested to merge feistel/gitlab-shell:verify/cafile into main

I've moved the check inside if strings.HasPrefix(gitlabURL, httpsProtocol) since if that's not the case the cafile is not needed and an empty string is often passed.

Self signed cert option enabled test has been removed since it wasn't passing a valid cafile (and the test would always fail). See Invalid cert with self signed cert option enabled for a test with selfsigned cert and a valid cafile.

setupWithRequests has been modified to fix TestFailedRequests: if a valid cafile is not passed then an error is thrown before the client is return. setupWithRequests wasn't propagating the error and the test was always failing.

Closes #486 (closed)

Merge request reports