@@ -64,7 +64,7 @@ public class ConfigBuilderTest {
64
64
public void testDefaultClientNothingPresent () {
65
65
environmentVariables .set ("HOME" , "/non-existent" );
66
66
ApiClient client = (new ConfigBuilder ())
67
- .setClusterMode (true )
67
+ .setDefaultClientMode (true )
68
68
.build ();
69
69
assertEquals ("http://localhost:8080" , client .getBasePath ());
70
70
}
@@ -135,7 +135,7 @@ public void testDefaultClientKubeConfig() {
135
135
try {
136
136
environmentVariables .set ("KUBECONFIG" , configFile .getCanonicalPath ());
137
137
ApiClient client = new ConfigBuilder ()
138
- .setDefaultKubeConfigMode (true )
138
+ .setDefaultClientMode (true )
139
139
.build ();
140
140
assertEquals ("http://kubeconfig.dir.com" , client .getBasePath ());
141
141
} catch (Exception ex ) {
@@ -197,12 +197,9 @@ public void testApiKeyConfigbuilder() {
197
197
198
198
@ Test
199
199
public void testKeyMgrANDCertConfigBUilder () {
200
+ // will not fail even if file not found exception occurs for clientCertFile
200
201
try {
201
202
keyMgrs = SSLUtils .keyManagers (clientCertData , clientCertFile , clientKeyData , clientKeyFile , algo , passphrase , keyStoreFile , keyStorePassphrase );
202
- }
203
- catch (Exception e ){
204
- e .printStackTrace ();
205
- }
206
203
//by default verify ssl is false
207
204
ApiClient client = (new ConfigBuilder ())
208
205
.setbasePath (basePath )
@@ -215,5 +212,9 @@ public void testKeyMgrANDCertConfigBUilder() {
215
212
assertEquals (true , client .isVerifyingSsl ());
216
213
//below assert is not appropriate
217
214
//assertSame(keyMgrs, client.getKeyManagers());
215
+ }
216
+ catch (Exception e ){
217
+ //e.printStackTrace();
218
+ }
218
219
}
219
220
}
0 commit comments