Skip to content

Commit

Permalink
Removing tests of Jenkins.agentProtocols (#2580)
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick authored Oct 28, 2024
1 parent b948fb5 commit ea5814c
Show file tree
Hide file tree
Showing 14 changed files with 0 additions and 71 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ jenkins:
workDirPath: "/tmp"

slaveAgentPort: 50000
agentProtocols:
- "jnlp2"

tool:
git:
Expand Down
2 changes: 0 additions & 2 deletions demos/external-workspace-manager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ jenkins:
- diskRefId: "localdisk"
nodeMountPoint: "/tmp/localdisk"
slaveAgentPort: 50000
agentProtocols:
- "jnlp2"

unclassified:
exwsGlobalConfigurationDiskPools:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,6 @@ private void _setValue(Owner target, Type value) throws Exception {
o = collection.toArray((Object[]) Array.newInstance(type, collection.size()));

// if setter expect a Set, convert Collection to Set
// see jenkins.agentProtocols
} else if (c.isAssignableFrom(Set.class)) {
o = new HashSet((Collection) value);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package io.jenkins.plugins.casc;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThrows;

import java.util.Set;
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.JenkinsRule;
Expand Down Expand Up @@ -36,7 +34,5 @@ public void twoUnknown() {
public void ignoreKnownAlias() throws Exception {
ConfigurationAsCode.get().configure(getClass().getResource("known.yml").toExternalForm());
assertThat(j.jenkins.getSystemMessage(), is("Configured by Configuration as Code plugin"));
Set<String> agentProtocols = j.jenkins.getAgentProtocols();
assertThat(agentProtocols, hasSize(2));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue;

import io.jenkins.plugins.casc.CasCGlobalConfig;
import io.jenkins.plugins.casc.ConfigurationAsCode;
import io.jenkins.plugins.casc.ConfigurationContext;
import io.jenkins.plugins.casc.ConfiguratorException;
import io.jenkins.plugins.casc.ConfiguratorRegistry;
import java.util.Set;
import jenkins.model.Jenkins;
import org.junit.BeforeClass;
import org.junit.ClassRule;
Expand Down Expand Up @@ -87,14 +85,6 @@ public void sequenceValue() throws ConfiguratorException {

// merge without conflicts
ConfigurationAsCode.get().configure(sequenceA, sequenceB);

Set<String> agentProtocals = Jenkins.get().getAgentProtocols();
assertTrue(
"unexpected sequence merging (missing Ping) with override merge strategy",
agentProtocals.contains("Ping"));
assertTrue(
"unexpected sequence merging (missing JNLP4-connect) with override merge strategy",
agentProtocals.contains("JNLP4-connect"));
}

@Test
Expand Down
3 changes: 0 additions & 3 deletions plugin/src/test/resources/io/jenkins/plugins/casc/known.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,3 @@ x-alias:

jenkins:
<<: *message
agentProtocols:
- JNLP4-connect
- Ping
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@ jenkins:
env:
- key: VARIABLE2
value: bar
agentProtocols:
- "jnlp2"
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@ jenkins:
env:
- key: VARIABLE1
value: foo
agentProtocols:
- "jnlp1"
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@ jenkins:
env:
- key: VARIABLE2
value: bar
agentProtocols:
- "jnlp2"
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@ jenkins:
env:
- key: VARIABLE1
value: foo
agentProtocols:
- "Ping"
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@ jenkins:
env:
- key: VARIABLE1
value: foo
agentProtocols:
- "JNLP4-connect"
6 changes: 0 additions & 6 deletions test-harness/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,6 @@
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>jackson2-api</artifactId>
</dependency>
<!-- Needed for AgentProtocolsTest -->
<dependency>
<groupId>org.jenkins-ci.modules</groupId>
<artifactId>instance-identity</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit ea5814c

Please sign in to comment.