Skip to content

Commit

Permalink
simpler (#1817)
Browse files Browse the repository at this point in the history
  • Loading branch information
wind57 authored Dec 9, 2024
1 parent 776ec1e commit 5702462
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,15 @@ protected static void beforeAll() {
util = new Util(K3S);
}

protected static KubernetesClient client() {
String kubeConfigYaml = K3S.getKubeConfigYaml();
Config config = Config.fromKubeconfig(kubeConfigYaml);
return new KubernetesClientBuilder().withConfig(config).build();
}

@TestConfiguration
static class TestConfig {

@Bean
@Primary
KubernetesClient kubernetesClient() {
return client();
String kubeConfigYaml = K3S.getKubeConfigYaml();
Config config = Config.fromKubeconfig(kubeConfigYaml);
return new KubernetesClientBuilder().withConfig(config).build();
}

}
Expand Down

0 comments on commit 5702462

Please sign in to comment.