Search in sources :

Example 1 with GitHubPluginConfig

use of org.jenkinsci.plugins.github.config.GitHubPluginConfig in project configuration-as-code-plugin by jenkinsci.

the class GitHubTest method configure_github.

@Test
@ConfiguredWithReadme("github/README.md")
public void configure_github() {
    final GitHubPluginConfig configuration = GlobalConfiguration.all().get(GitHubPluginConfig.class);
    assertThat(configuration.getConfigs(), hasSize(1));
    GitHubServerConfig config = configuration.getConfigs().get(0);
    assertThat(config.getApiUrl(), is("https://github.domain.local/api/v3"));
    assertThat(config.getCredentialsId(), is("[GitHubEEUser]"));
    assertThat(config.getName(), is("InHouse GitHub EE"));
    assertTrue(config.isManageHooks());
}
Also used : GitHubServerConfig(org.jenkinsci.plugins.github.config.GitHubServerConfig) GitHubPluginConfig(org.jenkinsci.plugins.github.config.GitHubPluginConfig) Test(org.junit.Test) ConfiguredWithReadme(io.jenkins.plugins.casc.misc.ConfiguredWithReadme)

Aggregations

ConfiguredWithReadme (io.jenkins.plugins.casc.misc.ConfiguredWithReadme)1 GitHubPluginConfig (org.jenkinsci.plugins.github.config.GitHubPluginConfig)1 GitHubServerConfig (org.jenkinsci.plugins.github.config.GitHubServerConfig)1 Test (org.junit.Test)1