Skip to content

Commit 160b1de

Browse files
committed
[JENKINS-48437] Some should assume a unix environment
1 parent 7172acd commit 160b1de

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/test/java/org/jenkinsci/plugins/docker/workflow/RegistryEndpointStepTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
import org.jenkinsci.plugins.workflow.job.WorkflowRun;
4747
import org.jenkinsci.plugins.workflow.steps.*;
4848

49+
import static org.jenkinsci.plugins.docker.workflow.DockerTestUtil.assumeNotWindows;
4950
import static org.junit.Assert.assertEquals;
5051
import static org.junit.Assert.assertNotNull;
5152

@@ -108,6 +109,8 @@ public class RegistryEndpointStepTest {
108109

109110
@Test
110111
public void stepExecutionWithCredentials() throws Exception {
112+
assumeNotWindows();
113+
111114
IdCredentials registryCredentials = new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL, "registryCreds", null, "me", "pass");
112115
CredentialsProvider.lookupStores(r.jenkins).iterator().next().addCredentials(Domain.global(), registryCredentials);
113116

@@ -127,6 +130,7 @@ public void stepExecutionWithCredentials() throws Exception {
127130

128131
@Test
129132
public void stepExecutionWithCredentialsAndQueueItemAuthenticator() throws Exception {
133+
assumeNotWindows();
130134

131135
r.getInstance().setSecurityRealm(r.createDummySecurityRealm());
132136
MockAuthorizationStrategy auth = new MockAuthorizationStrategy()

src/test/java/org/jenkinsci/plugins/docker/workflow/ServerEndpointStepTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ public class ServerEndpointStepTest {
114114
@Test public void stepExecutionWithCredentials() {
115115
story.addStep(new Statement() {
116116
@Override public void evaluate() throws Throwable {
117+
assumeNotWindows();
117118
IdCredentials serverCredentials = new DockerServerCredentials(CredentialsScope.GLOBAL, "serverCreds", null, "clientKey", "clientCertificate", "serverCaCertificate");
118119
CredentialsProvider.lookupStores(story.j.jenkins).iterator().next().addCredentials(Domain.global(), serverCredentials);
119120
WorkflowJob p = story.j.jenkins.createProject(WorkflowJob.class, "prj");
@@ -133,6 +134,7 @@ public class ServerEndpointStepTest {
133134
story.addStep(new Statement() {
134135
@Override
135136
public void evaluate() throws Throwable {
137+
assumeNotWindows();
136138
story.j.getInstance().setSecurityRealm(story.j.createDummySecurityRealm());
137139
MockAuthorizationStrategy auth = new MockAuthorizationStrategy()
138140
.grant(Jenkins.READ).everywhere().to("alice")

0 commit comments

Comments
 (0)