@@ -20,7 +20,7 @@ protected function setUp(): void
2020 {
2121 parent ::setUp ();
2222
23- $ this ->tempFolder = __DIR__ . DIRECTORY_SEPARATOR . 'temp ' ;
23+ $ this ->tempFolder = __DIR__ . DIRECTORY_SEPARATOR . 'temp ' ;
2424 KubernetesCluster::setTempFolder ($ this ->tempFolder );
2525 }
2626
@@ -36,19 +36,19 @@ protected function tearDown(): void
3636
3737 public function test_kube_config_from_yaml_file_with_base64_encoded_ssl ()
3838 {
39- $ cluster = KubernetesCluster::fromKubeConfigYamlFile (__DIR__ . '/cluster/kubeconfig.yaml ' , 'minikube ' );
39+ $ cluster = KubernetesCluster::fromKubeConfigYamlFile (__DIR__ . '/cluster/kubeconfig.yaml ' , 'minikube ' );
4040
4141 [
4242 'verify ' => $ caPath ,
4343 'cert ' => $ certPath ,
4444 'ssl_key ' => $ keyPath ,
4545 ] = $ cluster ->getClient ()->getConfig ();
4646
47- $ tempFilePath = $ this ->tempFolder . DIRECTORY_SEPARATOR . 'ctx-minikube-minikube-httpsminikube8443- ' ;
47+ $ tempFilePath = $ this ->tempFolder . DIRECTORY_SEPARATOR . 'ctx-minikube-minikube-httpsminikube8443- ' ;
4848
49- $ this ->assertSame ($ tempFilePath . 'ca-cert.pem ' , $ caPath );
50- $ this ->assertSame ($ tempFilePath . 'client-cert.pem ' , $ certPath );
51- $ this ->assertSame ($ tempFilePath . 'client-key.pem ' , $ keyPath );
49+ $ this ->assertSame ($ tempFilePath. 'ca-cert.pem ' , $ caPath );
50+ $ this ->assertSame ($ tempFilePath. 'client-cert.pem ' , $ certPath );
51+ $ this ->assertSame ($ tempFilePath. 'client-key.pem ' , $ keyPath );
5252
5353 $ this ->assertEquals ("some-ca \n" , file_get_contents ($ caPath ));
5454 $ this ->assertEquals ("some-cert \n" , file_get_contents ($ certPath ));
@@ -57,7 +57,7 @@ public function test_kube_config_from_yaml_file_with_base64_encoded_ssl()
5757
5858 public function test_kube_config_from_yaml_file_with_paths_to_ssl ()
5959 {
60- $ cluster = KubernetesCluster::fromKubeConfigYamlFile (__DIR__ . '/cluster/kubeconfig.yaml ' , 'minikube-2 ' );
60+ $ cluster = KubernetesCluster::fromKubeConfigYamlFile (__DIR__ . '/cluster/kubeconfig.yaml ' , 'minikube-2 ' );
6161
6262 [
6363 'verify ' => $ caPath ,
@@ -72,7 +72,7 @@ public function test_kube_config_from_yaml_file_with_paths_to_ssl()
7272
7373 public function test_kube_config_from_yaml_file_with_skip_tols ()
7474 {
75- $ cluster = KubernetesCluster::fromKubeConfigYamlFile (__DIR__ . '/cluster/kubeconfig.yaml ' , 'minikube-skip-tls ' );
75+ $ cluster = KubernetesCluster::fromKubeConfigYamlFile (__DIR__ . '/cluster/kubeconfig.yaml ' , 'minikube-skip-tls ' );
7676
7777 [
7878 'verify ' => $ verify ,
@@ -87,7 +87,7 @@ public function test_kube_config_from_yaml_file_with_skip_tols()
8787
8888 public function test_cluster_can_get_correct_config_for_token_socket_connection ()
8989 {
90- $ cluster = KubernetesCluster::fromUrl ('http://127.0.0.1:8080 ' )->loadTokenFromFile (__DIR__ . '/cluster/token.txt ' );
90+ $ cluster = KubernetesCluster::fromUrl ('http://127.0.0.1:8080 ' )->loadTokenFromFile (__DIR__ . '/cluster/token.txt ' );
9191
9292 $ reflectionMethod = new \ReflectionMethod ($ cluster , 'buildStreamContextOptions ' );
9393
@@ -123,7 +123,7 @@ public function test_cluster_can_get_correct_config_for_user_pass_socket_connect
123123
124124 public function test_cluster_can_get_correct_config_for_ssl_socket_connection ()
125125 {
126- $ cluster = KubernetesCluster::fromKubeConfigYamlFile (__DIR__ . '/cluster/kubeconfig.yaml ' , 'minikube-2 ' );
126+ $ cluster = KubernetesCluster::fromKubeConfigYamlFile (__DIR__ . '/cluster/kubeconfig.yaml ' , 'minikube-2 ' );
127127
128128 $ reflectionMethod = new \ReflectionMethod ($ cluster , 'buildStreamContextOptions ' );
129129
@@ -145,28 +145,28 @@ public function test_kube_config_from_yaml_cannot_load_if_no_cluster()
145145 {
146146 $ this ->expectException (KubeConfigClusterNotFound::class);
147147
148- KubernetesCluster::fromKubeConfigYamlFile (__DIR__ . '/cluster/kubeconfig.yaml ' , 'minikube-without-cluster ' );
148+ KubernetesCluster::fromKubeConfigYamlFile (__DIR__ . '/cluster/kubeconfig.yaml ' , 'minikube-without-cluster ' );
149149 }
150150
151151 public function test_kube_config_from_yaml_cannot_load_if_no_user ()
152152 {
153153 $ this ->expectException (KubeConfigUserNotFound::class);
154154
155- $ cluster = KubernetesCluster::fromKubeConfigYamlFile (__DIR__ . '/cluster/kubeconfig.yaml ' , 'minikube-without-user ' );
155+ $ cluster = KubernetesCluster::fromKubeConfigYamlFile (__DIR__ . '/cluster/kubeconfig.yaml ' , 'minikube-without-user ' );
156156 }
157157
158158 public function test_kube_config_from_yaml_cannot_load_if_wrong_context ()
159159 {
160160 $ this ->expectException (KubeConfigContextNotFound::class);
161161
162- KubernetesCluster::fromKubeConfigYamlFile (__DIR__ . '/cluster/kubeconfig.yaml ' , 'inexistent-context ' );
162+ KubernetesCluster::fromKubeConfigYamlFile (__DIR__ . '/cluster/kubeconfig.yaml ' , 'inexistent-context ' );
163163 }
164164
165165 public function test_kube_config_from_yaml_invalid_base64_ca ()
166166 {
167167 $ this ->expectException (KubeConfigBaseEncodedDataInvalid::class);
168168
169- KubernetesCluster::fromKubeConfigYamlFile (__DIR__ . '/cluster/kubeconfig.yaml ' , 'minikube-invalid-base64-ca ' );
169+ KubernetesCluster::fromKubeConfigYamlFile (__DIR__ . '/cluster/kubeconfig.yaml ' , 'minikube-invalid-base64-ca ' );
170170 }
171171
172172 public function test_http_authentication ()
@@ -180,7 +180,7 @@ public function test_http_authentication()
180180
181181 public function test_bearer_token_authentication ()
182182 {
183- $ cluster = KubernetesCluster::fromUrl ('http://127.0.0.1:8080 ' )->loadTokenFromFile (__DIR__ . '/cluster/token.txt ' );
183+ $ cluster = KubernetesCluster::fromUrl ('http://127.0.0.1:8080 ' )->loadTokenFromFile (__DIR__ . '/cluster/token.txt ' );
184184
185185 ['headers ' => ['authorization ' => $ token ]] = $ cluster ->getClient ()->getConfig ();
186186
@@ -208,7 +208,7 @@ public function test_in_cluster_config()
208208 */
209209 public function test_from_environment_variable (?string $ context = null , ?string $ expectedDomain = null )
210210 {
211- $ _SERVER ['KUBECONFIG ' ] = __DIR__ . '/cluster/kubeconfig.yaml:: ' . __DIR__ . '/cluster/kubeconfig-2.yaml ' ;
211+ $ _SERVER ['KUBECONFIG ' ] = __DIR__ . '/cluster/kubeconfig.yaml:: ' . __DIR__ . '/cluster/kubeconfig-2.yaml ' ;
212212
213213 $ cluster = KubernetesCluster::fromKubeConfigVariable ($ context );
214214
@@ -224,7 +224,7 @@ public static function environmentVariableContextProvider(): iterable
224224
225225 public function test_kube_config_from_array_with_base64_encoded_ssl ()
226226 {
227- $ cluster = KubernetesCluster::fromKubeConfigArray (yaml_parse_file (__DIR__ . '/cluster/kubeconfig.yaml ' ), 'minikube ' );
227+ $ cluster = KubernetesCluster::fromKubeConfigArray (yaml_parse_file (__DIR__ . '/cluster/kubeconfig.yaml ' ), 'minikube ' );
228228
229229 [
230230 'verify ' => $ caPath ,
@@ -239,7 +239,7 @@ public function test_kube_config_from_array_with_base64_encoded_ssl()
239239
240240 public function test_kube_config_from_yaml_file_with_cmd_auth_as_json ()
241241 {
242- $ cluster = KubernetesCluster::fromKubeConfigYamlFile (__DIR__ . '/cluster/kubeconfig-command.yaml ' , 'minikube ' );
242+ $ cluster = KubernetesCluster::fromKubeConfigYamlFile (__DIR__ . '/cluster/kubeconfig-command.yaml ' , 'minikube ' );
243243
244244 ['headers ' => ['authorization ' => $ token ]] = $ cluster ->getClient ()->getConfig ();
245245
@@ -248,7 +248,7 @@ public function test_kube_config_from_yaml_file_with_cmd_auth_as_json()
248248
249249 public function test_kube_config_from_yaml_file_with_cmd_auth_as_string ()
250250 {
251- $ cluster = KubernetesCluster::fromKubeConfigYamlFile (__DIR__ . '/cluster/kubeconfig-command.yaml ' , 'minikube-2 ' );
251+ $ cluster = KubernetesCluster::fromKubeConfigYamlFile (__DIR__ . '/cluster/kubeconfig-command.yaml ' , 'minikube-2 ' );
252252
253253 ['headers ' => ['authorization ' => $ token ]] = $ cluster ->getClient ()->getConfig ();
254254
0 commit comments