jfrog / vault-plugin-secrets-artifactory

HashiCorp Vault Secrets Plugin for Artifactory
https://jfrog.com
Apache License 2.0
41 stars 20 forks source link

test: config/rotate with a bad current token returns the wrong error #93

Open TJM opened 1 year ago

TJM commented 1 year ago

https://github.com/jfrog/artifactory-secrets-plugin/pull/88/files/4ffd1cba0391435ed41c7067081c3e565fd26eae#r1184453545

This is a matter of opinion, I think that it should contain "that" error, but it does not. It returns the error about the certificate instead. I want to adjust this in a future MR.. trying to not change a bunch of code while writing the tests ;)

I think I want to "return" the correct error (error parsing existing access token) ... maybe including the reason (could not get the certificate). I was just not sure how I wanted to handle it just yet. Trying to emulate these error cases is kinda hard. I think a pure mock test may actually be easier here.