Description: skipping the tests that need a network access to be run
Author: Pierre Gruet <pgt@debian.org>
Forwarded: not-needed
Last-Update: 2024-05-02

--- a/sshd-common/src/test/java/org/apache/sshd/client/config/hosts/HostConfigEntryTest.java
+++ b/sshd-common/src/test/java/org/apache/sshd/client/config/hosts/HostConfigEntryTest.java
@@ -33,6 +33,7 @@
 import org.apache.sshd.util.test.JUnitTestSupport;
 import org.apache.sshd.util.test.NoIoTestCase;
 import org.junit.FixMethodOrder;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.junit.runners.MethodSorters;
@@ -418,6 +419,7 @@
         assertEquals("Mismatched number of patterns", 3, GenericUtils.size(entries.get(0).getPatterns()));
     }
 
+    @Ignore("Requires notwork access")
     @Test
     public void testResolveIdentityFilePath() throws Exception {
         final String hostValue = getClass().getSimpleName();
--- a/sshd-core/src/test/java/org/apache/sshd/common/forward/PortForwardingTest.java
+++ b/sshd-core/src/test/java/org/apache/sshd/common/forward/PortForwardingTest.java
@@ -86,6 +86,7 @@
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.FixMethodOrder;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runners.MethodSorters;
 import org.slf4j.Logger;
@@ -372,6 +373,7 @@
         }
     }
 
+    @Ignore("No network access")
     @Test
     public void testRemoteForwardingNative() throws Exception {
         try (ClientSession session = createNativeSession(null)) {
@@ -400,6 +402,7 @@
         }
     }
 
+    @Ignore("No network access")
     @Test
     public void testRemoteForwardingNativeBigPayload() throws Exception {
         AtomicReference<SshdSocketAddress> localAddressHolder = new AtomicReference<>();
@@ -554,6 +557,7 @@
         }
     }
 
+    @Ignore("No network access")
     @Test
     public void testLocalForwardingNative() throws Exception {
         AtomicReference<SshdSocketAddress> localAddressHolder = new AtomicReference<>();
@@ -694,6 +698,7 @@
         }
     }
 
+    @Ignore("No network access")
     @Test
     public void testLocalForwardingNativeBigPayload() throws Exception {
         try (ClientSession session = createNativeSession(null)) {
@@ -799,6 +804,7 @@
         }
     }
 
+    @Ignore("No network access")
     @Test   // see SSHD-1066
     public void testLocalBindingOnDifferentInterfaces() throws Exception {
         InetSocketAddress addr = (InetSocketAddress) GenericUtils.head(sshd.getBoundAddresses());
--- a/sshd-core/src/test/java/org/apache/sshd/client/ClientTest.java
+++ b/sshd-core/src/test/java/org/apache/sshd/client/ClientTest.java
@@ -1805,6 +1805,7 @@
         }
     }
 
+    @Ignore("No network access")
     @Test // see SSHD-1295
     public void testConnectNoListenerIoTimeout() throws Exception {
         // Connect to a port where nothing listens.
@@ -1842,6 +1843,7 @@
         }
     }
 
+    @Ignore("No network access")
     @Test // see SSHD-1295
     public void testConnectNoListenerApplicationTimeout() throws Exception {
         // Connect to a port where nothing listens.
--- a/sshd-core/src/test/java/org/apache/sshd/common/forward/Sshd1033Test.java
+++ b/sshd-core/src/test/java/org/apache/sshd/common/forward/Sshd1033Test.java
@@ -44,6 +44,7 @@
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.FixMethodOrder;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runners.MethodSorters;
 import org.slf4j.Logger;
@@ -81,21 +82,25 @@
         sshd.stop();
     }
 
+    @Ignore("No network access")
     @Test
     public void testDirect() throws IOException {
         testRemoteURL(null);
     }
 
+    @Ignore("No network access")
     @Test
     public void testLocalAndDynamic() throws IOException {
         doTest(true, true);
     }
 
+    @Ignore("No network access")
     @Test
     public void testLocal() throws IOException {
         doTest(true, false);
     }
 
+    @Ignore("No network access")
     @Test
     public void testDynamic() throws IOException {
         doTest(false, true);
--- a/sshd-core/src/test/java/org/apache/sshd/client/simple/SimpleSessionClientTest.java
+++ b/sshd-core/src/test/java/org/apache/sshd/client/simple/SimpleSessionClientTest.java
@@ -34,6 +34,7 @@
 import org.apache.sshd.util.test.CommonTestSupportUtils;
 import org.apache.sshd.util.test.client.simple.BaseSimpleClientTestSupport;
 import org.junit.FixMethodOrder;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runners.MethodSorters;
 
@@ -109,6 +110,7 @@
         }
     }
 
+    @Ignore("No network access")
     @Test
     public void testAuthenticationTimeout() throws Exception {
         // make sure authentication occurs only for passwords
--- a/sshd-core/src/test/java/org/apache/sshd/common/auth/HostBasedAuthenticationTest.java
+++ b/sshd-core/src/test/java/org/apache/sshd/common/auth/HostBasedAuthenticationTest.java
@@ -40,6 +40,7 @@
 import org.apache.sshd.server.auth.pubkey.RejectAllPublickeyAuthenticator;
 import org.apache.sshd.util.test.CommonTestSupportUtils;
 import org.junit.FixMethodOrder;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runners.MethodSorters;
 
@@ -52,6 +53,7 @@
         super();
     }
 
+    @Ignore("No network access")
     @Test // see SSHD-620
     public void testHostBasedAuthentication() throws Exception {
         AtomicInteger invocationCount = new AtomicInteger(0);
@@ -64,6 +66,7 @@
         assertEquals("Mismatched authenticator invocation count", 1, invocationCount.get());
     }
 
+    @Ignore("No network access")
     @Test   // see SSHD-1114
     public void testHostBasedAuthenticationReporter() throws Exception {
         AtomicReference<String> hostnameClientHolder = new AtomicReference<>();
