Search in sources :

Example 1 with StatisticsConfiguration

use of org.jenkins.plugins.statistics.gatherer.StatisticsConfiguration in project configuration-as-code-plugin by jenkinsci.

the class StatisticsGathererTest method configure_statistics.

@Test
@ConfiguredWithReadme("statistics-gatherer/README.md")
public void configure_statistics() {
    StatisticsConfiguration config = StatisticsConfiguration.get();
    assertNotNull(config);
    assertThat(config.getBuildUrl(), containsString("http://elasticsearch:9200/jenkins-stats/builds"));
    assertTrue(config.getShouldSendApiHttpRequests());
    assertTrue(config.getBuildInfo());
    assertFalse(config.getQueueInfo());
    assertFalse(config.getProjectInfo());
    assertFalse(config.getBuildStepInfo());
    assertTrue(config.getScmCheckoutInfo());
}
Also used : StatisticsConfiguration(org.jenkins.plugins.statistics.gatherer.StatisticsConfiguration) Test(org.junit.Test) ConfiguredWithReadme(io.jenkins.plugins.casc.misc.ConfiguredWithReadme)

Aggregations

ConfiguredWithReadme (io.jenkins.plugins.casc.misc.ConfiguredWithReadme)1 StatisticsConfiguration (org.jenkins.plugins.statistics.gatherer.StatisticsConfiguration)1 Test (org.junit.Test)1