Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[JENKINS-51469] Add Essentials configuration to CasC tests
- Loading branch information
Showing
3 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/test/java/org/jenkinsci/plugins/casc/EssentialsTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package org.jenkinsci.plugins.casc; | ||
|
||
import jenkins.model.Jenkins; | ||
import org.jenkinsci.plugins.casc.misc.ConfiguredWithCode; | ||
import org.jenkinsci.plugins.casc.misc.JenkinsConfiguredWithCodeRule; | ||
import org.junit.Rule; | ||
import org.junit.Test; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
public class EssentialsTest { | ||
@Rule | ||
public JenkinsConfiguredWithCodeRule j = new JenkinsConfiguredWithCodeRule(); | ||
|
||
@Test | ||
@ConfiguredWithCode("EssentialsTest.yml") | ||
public void essentialsTest() throws Exception { | ||
final Jenkins jenkins = Jenkins.getInstance(); | ||
assertEquals("Welcome to Jenkins Essentials!", jenkins.getSystemMessage()); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/test/resources/org/jenkinsci/plugins/casc/EssentialsTest.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
jenkins: | ||
systemMessage: "Welcome to Jenkins Essentials!" | ||
numExecutors: 0 | ||
metricsaccesskey: | ||
accessKeys: | ||
- key: "evergreen" | ||
description: "Key for evergreen health-check" | ||
canHealthCheck: true | ||
canPing: false | ||
canThreadDump: false | ||
canMetrics: false | ||
origins: "*" |