// should fail without a credential
assertBuildStatus(Result.FAILURE, b.scheduleBuild2(0).get());
SystemCredentialsProvider.getInstance().setDomainCredentialsMap(Collections.singletonMap(Domain.global(),
Arrays.<Credentials>asList(
new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL, "1-bob", null, "bob","bob")
)
));
buildAndAssertSuccess(b);
assertBuildStatus(Result.FAILURE, c.scheduleBuild2(0).get());
SystemCredentialsProvider.getInstance().setDomainCredentialsMap(Collections.singletonMap(Domain.global(),
Arrays.<Credentials>asList(
new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL, "1-bob", null, "bob","bob"),
new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL, "2-charlie", null, "charlie","charlie")
)
));
buildAndAssertSuccess(c);
// b should still build fine.