Skip to content

Commit aaf9ec1

Browse files
committed
Use only one constant for windows
1 parent f205803 commit aaf9ec1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/test/java/org/csanchez/jenkins/plugins/kubernetes/pipeline/ContainerExecDecoratorWindowsTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
import org.jvnet.hudson.test.LoggerRule;
6464
import org.jvnet.hudson.test.recipes.WithTimeout;
6565

66+
import static org.csanchez.jenkins.plugins.kubernetes.KubernetesTestUtil.WINDOWS_1809_BUILD;
6667
import static org.csanchez.jenkins.plugins.kubernetes.KubernetesTestUtil.assumeKubernetes;
6768
import static org.csanchez.jenkins.plugins.kubernetes.KubernetesTestUtil.assumeWindows;
6869
import static org.csanchez.jenkins.plugins.kubernetes.KubernetesTestUtil.deletePods;
@@ -75,7 +76,6 @@
7576
import static org.mockito.Mockito.when;
7677

7778
public class ContainerExecDecoratorWindowsTest {
78-
public static final String WINDOWS_BUILD = "10.0.17763";
7979
@Rule
8080
public ExpectedException exception = ExpectedException.none();
8181

@@ -101,7 +101,7 @@ public class ContainerExecDecoratorWindowsTest {
101101
@BeforeClass
102102
public static void setUpClass() throws Exception {
103103
assumeKubernetes();
104-
assumeWindows(WINDOWS_BUILD);
104+
assumeWindows(WINDOWS_1809_BUILD);
105105
}
106106

107107
@Before
@@ -110,7 +110,7 @@ public void configureCloud() throws Exception {
110110
client = cloud.connect();
111111
deletePods(client, getLabels(this, name), false);
112112

113-
String image = "mcr.microsoft.com/windows:" + WINDOWS_BUILD + ".2686";
113+
String image = "mcr.microsoft.com/windows:" + WINDOWS_1809_BUILD + ".2686";
114114
String containerName = "container";
115115
String podName = "test-command-execution-" + RandomStringUtils.random(5, "bcdfghjklmnpqrstvwxz0123456789");
116116
pod = client.pods().create(new PodBuilder()
@@ -126,7 +126,7 @@ public void configureCloud() throws Exception {
126126
.withArgs("Start-Sleep", "2147483")
127127
.build())
128128
.addToNodeSelector("kubernetes.io/os", "windows")
129-
.addToNodeSelector("node.kubernetes.io/windows-build", WINDOWS_BUILD)
129+
.addToNodeSelector("node.kubernetes.io/windows-build", WINDOWS_1809_BUILD)
130130
.withTerminationGracePeriodSeconds(0L)
131131
.endSpec().build());
132132

0 commit comments

Comments
 (0)