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.
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.