Skip to content

Commit bb84f11

Browse files
committed
fix testcase bug
1 parent 028d3d7 commit bb84f11

2 files changed

Lines changed: 0 additions & 44 deletions

File tree

src/main/java/io/github/kubesys/client/KubernetesClient.java

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -199,45 +199,6 @@ public KubernetesClient(String url, String token, KubernetesAnalyzer analyzer) t
199199
}
200200

201201

202-
/***************************************************************************
203-
*
204-
* using usename and password
205-
*
206-
***************************************************************************/
207-
208-
/**
209-
* 根据用户名密码创建Kubernetes连接
210-
* https://kubernetes.io/docs/reference/access-authn-authz/authentication/
211-
*
212-
* @param url 如https://IP:6443/
213-
* @param username basic authing
214-
* @param password basic authing
215-
* @throws KubernetesConnectionException KubernetesConnectionException
216-
*/
217-
public KubernetesClient(String url, String username, String password) throws KubernetesConnectionException {
218-
this(url, username, password, new KubernetesAnalyzer());
219-
}
220-
221-
/**
222-
* 根据用户名密码创建Kubernetes连接
223-
* https://kubernetes.io/docs/reference/access-authn-authz/authentication/
224-
*
225-
* @param url default is https://IP:6443/
226-
* @param username basic authing
227-
* @param password basic authing
228-
* @param analyzer 用于自动分析Kubernetes中所有kind资源,以及该资源对应的Url
229-
* @throws KubernetesConnectionException KubernetesConnectionException
230-
*/
231-
public KubernetesClient(String url, String username, String password, KubernetesAnalyzer analyzer) throws KubernetesConnectionException {
232-
try {
233-
this.kubernetesAdminConfig = new KubernetesAdminConfig(url, username, password);
234-
this.httpClient = createDefaultHttpClient(kubernetesAdminConfig);
235-
this.analyzer = analyzer.initIfNeed(this);
236-
} catch (Exception ex) {
237-
throw new KubernetesConnectionException(ex.toString());
238-
}
239-
}
240-
241202
/**********************************************************
242203
*
243204
*

src/test/java/io/github/kubesys/client/unit/AbstractClient.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ public static KubernetesClient createClient1(KubernetesAnalyzer ana) throws Exce
1919
new KubernetesClient(System.getenv("url"), System.getenv("token"), ana);
2020
}
2121

22-
public static KubernetesClient createClient2(KubernetesAnalyzer ana) throws Exception {
23-
return (ana == null) ? new KubernetesClient(System.getenv("url"), System.getenv("username"), System.getenv("password")) :
24-
new KubernetesClient(System.getenv("url"), System.getenv("username"), System.getenv("password"), ana);
25-
}
26-
2722
public static KubernetesClient createClient3(KubernetesAnalyzer ana) throws Exception {
2823
return (ana == null) ? new KubernetesClient(new File("admin.conf")) : new KubernetesClient(new File("admin.conf"), ana);
2924
}

0 commit comments

Comments
 (0)