Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing tests of Jenkins.agentProtocols #2580

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.