use of org.jenkinsci.test.acceptance.plugins.credentials.UserPwdCredential in project acceptance-test-harness by jenkinsci.
the class SshSlaveLauncher method pwdCredentials.
/**
* Add username/password based credentials to the configuration
*
* @param username to use
* @param password for the username
* @return the SshSlaveLauncher to be configured
*/
public SshSlaveLauncher pwdCredentials(String username, String password) {
final SshCredentialDialog dia = this.addCredential();
final UserPwdCredential cred = dia.select(UserPwdCredential.class);
cred.username.set(username);
cred.password.set(password);
// credentials are identified by their id. Set username as id so it can be found by it
cred.setId(username);
cred.add();
waitForCredentialVisible(username);
return this;
}
use of org.jenkinsci.test.acceptance.plugins.credentials.UserPwdCredential in project acceptance-test-harness by jenkinsci.
the class ConfigFileProviderTest method setup.
@Before
public void setup() {
CredentialsPage cp = new CredentialsPage(jenkins, ManagedCredentials.DEFAULT_DOMAIN);
cp.open();
UserPwdCredential cred = cp.add(UserPwdCredential.class);
cred.username.set(CRED_USR);
cred.password.set(CRED_PWD);
cred.setId(CRED_ID);
cp.create();
}
use of org.jenkinsci.test.acceptance.plugins.credentials.UserPwdCredential in project acceptance-test-harness by jenkinsci.
the class FolderPluginTest method createCredentials.
private void createCredentials(final Folder f) {
final CredentialsPage mc = new CredentialsPage(f, ManagedCredentials.DEFAULT_DOMAIN);
mc.open();
final UserPwdCredential cred = mc.add(UserPwdCredential.class);
cred.username.set(CRED_USER);
cred.password.set(CRED_PASS);
cred.setId(CRED_ID);
mc.create();
}
Aggregations