We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb647b0 commit 71f6937Copy full SHA for 71f6937
kr8s/tests/test_config.py
@@ -51,7 +51,14 @@ async def test_kubeconfig_from_dict(temp_kubeconfig, cls):
51
with open(temp_kubeconfig) as fh:
52
config = yaml.safe_load(fh)
53
kubeconfig = await cls(config)
54
- assert kubeconfig.raw == config
+ assert kubeconfig.raw["clusters"] == config["clusters"]
55
+ assert kubeconfig.raw["users"] == config["users"]
56
+ assert kubeconfig.raw["contexts"] == config["contexts"]
57
+ # Preferences and extensions are optional
58
+ if "preferences" in config:
59
+ assert kubeconfig.raw["preferences"] == config["preferences"]
60
+ if "extensions" in config:
61
+ assert kubeconfig.raw["extensions"] == config["extensions"]
62
63
64
@pytest.mark.parametrize("cls", [KubeConfig, KubeConfigSet])
0 commit comments