use of org.jenkinsci.test.acceptance.plugins.configuration_as_code.JcascManage in project acceptance-test-harness by jenkinsci.
the class ConfigurationAsCodeTest method loadAndReload.
@Test
public void loadAndReload() {
final String EXPECTED_DESC = "JCasC populated description";
JcascManage jm = new JcascManage(jenkins);
jm.open();
jm.configure(resource("/configuration_as_code/trivial.yaml").asFile().getAbsolutePath());
assertThat(jenkins.open(), hasContent(EXPECTED_DESC));
JenkinsConfig gc = jenkins.getConfigPage();
gc.configure(() -> gc.setDescription("Changed"));
assertThat(jenkins.open(), Matchers.not(hasContent(EXPECTED_DESC)));
jm.open();
jm.reload();
assertThat(jenkins.open(), hasContent(EXPECTED_DESC));
}
Aggregations