On Saturday, 1 March 2014, Mark Waite <[email protected]> wrote:
> I'd like to write several tests for the git-client-plugin which use > credentials, since there are many ways that the git-client-plugin may fail > in the context of using credentials. The failure modes tend to be platform > dependent, and installation dependent, so they are very interesting cases > for test automation. Unfortunately, I haven't been able to identify easy > ways that I could create credential based tests of git-client-plugin. > > Are there examples to which I could refer, or plugin source code which > might get me closer to writing a credential based test? > > I found ConfidentialStoreRule and MockSecretRule in a groovy based test > case which looked like they might help, but I couldn't find the correct set > of pom changes to make those rules available for the git-client-plugin. > > Easiest way is just to add them to the CredentialsStore of the Jenkins in your JenkinsRule... That's a throw away instance so you should be fine adding to its store If you want to be more insulated, create a folder and add the credentials to the folder as that way they will be scoped to the folder also Or, am I approaching the problem incorrectly because there is some far > better way to test code which depends on various forms of credentials? > > -- > Thanks! > Mark Waite > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to > [email protected]<javascript:_e(%7B%7D,'cvml','jenkinsci-dev%[email protected]');> > . > For more options, visit https://groups.google.com/groups/opt_out. > -- Sent from my phone -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
