5
5
import static org .hamcrest .Matchers .hasItem ;
6
6
import static org .hamcrest .Matchers .is ;
7
7
import static org .hamcrest .io .FileMatchers .anExistingFile ;
8
- import static org .jenkinsci .plugins .gitclient .verifier .KnownHostsTestUtil .isKubernetesCI ;
9
8
import static org .mockito .Mockito .spy ;
10
9
import static org .mockito .Mockito .when ;
11
10
@@ -54,9 +53,6 @@ public void testVerifyHostKeyOption() throws IOException {
54
53
55
54
@ Test
56
55
public void testVerifyServerHostKeyWhenFirstConnection () throws Exception {
57
- if (isKubernetesCI ()) {
58
- return ; // Test fails with connection timeout on ci.jenkins.io kubernetes agents
59
- }
60
56
File file = new File (testFolder .getRoot () + "path/to/file" );
61
57
AcceptFirstConnectionVerifier acceptFirstConnectionVerifier = spy (new AcceptFirstConnectionVerifier ());
62
58
when (acceptFirstConnectionVerifier .getKnownHostsFile ()).thenReturn (file );
@@ -81,9 +77,6 @@ public void testVerifyServerHostKeyWhenFirstConnection() throws Exception {
81
77
82
78
@ Test
83
79
public void testVerifyServerHostKeyWhenSecondConnectionWithEqualKeys () throws Exception {
84
- if (isKubernetesCI ()) {
85
- return ; // Test fails with connection timeout on ci.jenkins.io kubernetes agents
86
- }
87
80
String hostKeyEntry =
88
81
"|1|FJGXVAi7jMQIsl1J6uE6KnCiteM=|xlH92KQ91GuBgRxvRbU/sBo60Bo= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg=" ;
89
82
@@ -112,9 +105,6 @@ public void testVerifyServerHostKeyWhenSecondConnectionWithEqualKeys() throws Ex
112
105
113
106
@ Test
114
107
public void testVerifyServerHostKeyWhenHostnameWithoutPort () throws Exception {
115
- if (isKubernetesCI ()) {
116
- return ; // Test fails with connection timeout on ci.jenkins.io kubernetes agents
117
- }
118
108
String hostKeyEntry =
119
109
"github.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg=" ;
120
110
File mockedKnownHosts = knownHostsTestUtil .createFakeKnownHosts (hostKeyEntry );
@@ -138,9 +128,6 @@ public void testVerifyServerHostKeyWhenHostnameWithoutPort() throws Exception {
138
128
139
129
@ Test
140
130
public void testVerifyServerHostKeyWhenSecondConnectionWhenNotDefaultAlgorithm () throws Exception {
141
- if (isKubernetesCI ()) {
142
- return ; // Test fails with connection timeout on ci.jenkins.io kubernetes agents
143
- }
144
131
String fileContent =
145
132
"""
146
133
github.com,140.82.121.4\
@@ -201,9 +188,6 @@ public void testVerifyServerHostKeyWhenSecondConnectionWithNonEqualKeys() throws
201
188
202
189
@ Test
203
190
public void testVerifyServerHostKeyWhenConnectionWithAnotherHost () throws Exception {
204
- if (isKubernetesCI ()) {
205
- return ; // Test fails with connection timeout on ci.jenkins.io kubernetes agents
206
- }
207
191
String bitbucketFileContent =
208
192
"""
209
193
|1|HnmPCP38pBhCY0NUtBXSraOg9pM=|L6YZ9asEeb2xplTDEThGOxRq7ZY=\
@@ -236,9 +220,6 @@ public void testVerifyServerHostKeyWhenConnectionWithAnotherHost() throws Except
236
220
237
221
@ Test
238
222
public void testVerifyServerHostKeyWhenHostnamePortProvided () throws Exception {
239
- if (isKubernetesCI ()) {
240
- return ; // Test fails with connection timeout on ci.jenkins.io kubernetes agents
241
- }
242
223
String fileContent =
243
224
"""
244
225
|1|6uMj3M7sLgZpn54vQbGqgPNTCVM=|OkV9Lu9REJZR5QCVrITAIY34I1M=\
0 commit comments