forked from fabric8io/kubernetes-client
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test (kubernetes-client-api) : Remove redundant methods and nested cl…
…asses in ConfigTest - Remove `@Nested` class BuildConfigured as it doesn’t have any common setup, teardown blocks - Remove these tests as they were already covered by ConfigSourcePrecedenceTest: - `testOverrideViaSystemProperties` - `testSystemPropertiesAndBuilderGetMorePrecedenceOverKubeconfig` - Rename tests with legacy names starting with `testXXXX` - Add `@DisplayName` annotation for tests wherever applicable - Remove `assertConfig` method and inline assertions in tests wherever it’s getting used - Remove abstract test class introduced in fabric8io#6157 `AutoConfiguredDisabledScenarios`, duplicate tests so that it’s more clear in case of failure - Move this test outside of ConfigTest as a separate test class `ConfigDisableAutoConfigurationTest` Signed-off-by: Rohan Kumar <[email protected]>
- Loading branch information
1 parent
b270347
commit aac7306
Showing
6 changed files
with
856 additions
and
326 deletions.
There are no files selected for viewing
581 changes: 581 additions & 0 deletions
581
...ient-api/src/test/java/io/fabric8/kubernetes/client/ConfigDisableAutoConfigurationIT.java
Large diffs are not rendered by default.
Oops, something went wrong.
563 changes: 240 additions & 323 deletions
563
kubernetes-client-api/src/test/java/io/fabric8/kubernetes/client/ConfigTest.java
Large diffs are not rendered by default.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
kubernetes-client-api/src/test/resources/config-disable-autoconfiguration/kube-config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
apiVersion: v1 | ||
clusters: | ||
- cluster: | ||
certificate-authority: ca.crt | ||
extensions: | ||
- extension: | ||
last-update: Mon, 22 Jul 2024 15:23:30 IST | ||
provider: test.sigs.k8s.io | ||
version: v1.33.1 | ||
name: cluster_info | ||
server: https://172.28.128.4:8443 | ||
name: test | ||
contexts: | ||
- context: | ||
cluster: test | ||
extensions: | ||
- extension: | ||
last-update: Mon, 22 Jul 2024 15:23:30 IST | ||
provider: test.sigs.k8s.io | ||
version: v1.33.1 | ||
name: context_info | ||
namespace: namespace-from-kubeconfig | ||
user: test | ||
name: test | ||
current-context: test | ||
kind: Config | ||
preferences: {} | ||
users: | ||
- name: test | ||
user: | ||
client-certificate: client.crt | ||
client-key: client.key | ||
token: token-from-kubeconfig |
1 change: 1 addition & 0 deletions
1
...s-client-api/src/test/resources/config-disable-autoconfiguration/serviceaccount/namespace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
namespace-from-mounted-serviceaccount |
1 change: 1 addition & 0 deletions
1
...netes-client-api/src/test/resources/config-disable-autoconfiguration/serviceaccount/token
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
token-from-mounted-serviceaccount |
3 changes: 0 additions & 3 deletions
3
kubernetes-client-api/src/test/resources/config-source-precedence/serviceaccount/ca.crt
This file was deleted.
Oops, something went wrong.