-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #666 from Vlatombe/JENKINS-60537
[JENKINS-60537] Fix support of pod templates with multiple labels
- Loading branch information
Showing
2 changed files
with
30 additions
and
8 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
29 changes: 29 additions & 0 deletions
29
src/test/java/org/csanchez/jenkins/plugins/kubernetes/PodTemplateJenkinsTest.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,29 @@ | ||
package org.csanchez.jenkins.plugins.kubernetes; | ||
|
||
import org.junit.Rule; | ||
import org.junit.Test; | ||
import org.jvnet.hudson.test.Issue; | ||
import org.jvnet.hudson.test.JenkinsRule; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
public class PodTemplateJenkinsTest { | ||
@Rule | ||
public JenkinsRule j = new JenkinsRule(); | ||
|
||
@Test | ||
@Issue("JENKINS-60537") | ||
public void singleLabel() { | ||
PodTemplate podTemplate = new PodTemplate(); | ||
podTemplate.setLabel("foo"); | ||
assertEquals("foo" , podTemplate.getLabelsMap().get("jenkins/label")); | ||
} | ||
|
||
@Test | ||
@Issue("JENKINS-60537") | ||
public void multiLabel() { | ||
PodTemplate podTemplate = new PodTemplate(); | ||
podTemplate.setLabel("foo bar"); | ||
assertEquals("foo bar", podTemplate.getLabelsMap().get("jenkins/label")); | ||
} | ||
} |