use of org.jenkinsci.test.acceptance.plugins.artifactory.ArtifactoryGlobalConfig.Server in project acceptance-test-harness by jenkinsci.
the class ArtifactoryPluginTest method check_config_is_persisted.
@Test
public void check_config_is_persisted() {
final ArtifactoryContainer artifactory = artifactoryContainer.get();
waitForArtifactory(artifactory);
ArtifactoryGlobalConfig.Server server = configureArtifactory(artifactory);
jenkins.configure();
server.testConnectionButton.click();
waitFor(hasContent("Found Artifactory"));
server.username.set("bob");
server.testConnectionButton.click();
waitFor(hasContent("Error occurred while requesting version information: Unauthorized"));
server.url.set("http://localhost:4898/blabla");
server.testConnectionButton.click();
waitFor(hasContent(Pattern.compile("Error occurred while requesting version information: Connection( to http://localhost:4898)* refused")));
}
use of org.jenkinsci.test.acceptance.plugins.artifactory.ArtifactoryGlobalConfig.Server in project acceptance-test-harness by jenkinsci.
the class ArtifactoryPluginTest method configureArtifactory.
ArtifactoryGlobalConfig.Server configureArtifactory(ArtifactoryContainer artifactory) {
JenkinsConfig config = jenkins.getConfigPage();
config.configure();
ArtifactoryGlobalConfig global = new ArtifactoryGlobalConfig(config);
Server server = global.addServer();
server.id.set("artifactoryId");
server.url.set(artifactory.getURL());
server.username.set("admin");
server.password.set("password");
config.save();
return server;
}
Aggregations