Search in sources :

Example 1 with GiteaServers

use of org.jenkinsci.plugin.gitea.servers.GiteaServers in project configuration-as-code-plugin by jenkinsci.

the class GiteaServerTest method configure_gitea.

@Test
@ConfiguredWithReadme("gitea/README.md")
public void configure_gitea() {
    final GiteaServers configuration = GlobalConfiguration.all().get(GiteaServers.class);
    assertEquals(configuration.getServers().size(), 1);
    GiteaServer config = configuration.getServers().get(0);
    assertEquals("https://my-scm-url", config.getServerUrl());
    assertEquals("<my-credential-id>", config.getCredentialsId());
    assertEquals("scm", config.getDisplayName());
    assertTrue(config.isManageHooks());
}
Also used : GiteaServers(org.jenkinsci.plugin.gitea.servers.GiteaServers) GiteaServer(org.jenkinsci.plugin.gitea.servers.GiteaServer) Test(org.junit.Test) ConfiguredWithReadme(io.jenkins.plugins.casc.misc.ConfiguredWithReadme)

Aggregations

ConfiguredWithReadme (io.jenkins.plugins.casc.misc.ConfiguredWithReadme)1 GiteaServer (org.jenkinsci.plugin.gitea.servers.GiteaServer)1 GiteaServers (org.jenkinsci.plugin.gitea.servers.GiteaServers)1 Test (org.junit.Test)1