use of com.dabsquared.gitlabjenkins.connection.GitLabConnectionConfig in project gitlab-branch-source-plugin by Argelbargel.
the class SettingsUtils method gitLabConnectionNames.
static List<String> gitLabConnectionNames() {
GitLabConnectionConfig config = connectionConfig();
List<String> names = new ArrayList<>();
for (GitLabConnection conn : config.getConnections()) {
names.add(conn.getName());
}
return names;
}
use of com.dabsquared.gitlabjenkins.connection.GitLabConnectionConfig in project configuration-as-code-plugin by jenkinsci.
the class GitLabConfigurationTest method configure_gitlab_connection.
@Test
@ConfiguredWithReadme("gitlab/README.md")
public void configure_gitlab_connection() {
final Jenkins jenkins = Jenkins.get();
final GitLabConnectionConfig gitLabConnections = jenkins.getDescriptorByType(GitLabConnectionConfig.class);
assertEquals(1, gitLabConnections.getConnections().size());
final GitLabConnection gitLabConnection = gitLabConnections.getConnections().get(0);
assertEquals("gitlab_token", gitLabConnection.getApiTokenId());
assertEquals("my_gitlab_server", gitLabConnection.getName());
assertEquals("autodetect", gitLabConnection.getClientBuilderId());
assertEquals("https://gitlab.com/", gitLabConnection.getUrl());
assertEquals(20, gitLabConnection.getConnectionTimeout());
assertEquals(10, gitLabConnection.getReadTimeout());
assertTrue(gitLabConnection.isIgnoreCertificateErrors());
}
Aggregations