Skip to content

Commit

Permalink
Update files
Browse files Browse the repository at this point in the history
  • Loading branch information
raminqaf committed Dec 4, 2024
1 parent d894e57 commit e67908e
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 34 deletions.
2 changes: 0 additions & 2 deletions kpops/components/common/kubernetes_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ def model_dump(self, **_: Any) -> dict[str, Any]:
return super().model_dump(
mode="json",
by_alias=True,
exclude_none=True,
exclude_defaults=True,
exclude_unset=True,
)

Expand Down
76 changes: 44 additions & 32 deletions tests/component_handlers/helm_wrapper/test_helm_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,20 @@ def test_calculate_changes_unchanged(self, helm_diff: HelmDiff):
]
assert list(helm_diff.calculate_changes(templates, templates)) == [
Change(
old_value={
"apiVersion": "v1",
"kind": "Deployment",
"metadata": {},
},
new_value={
"apiVersion": "v1",
"kind": "Deployment",
"metadata": {},
},
old_value=KubernetesManifest(
**{
"apiVersion": "v1",
"kind": "Deployment",
"metadata": {},
}
),
new_value=KubernetesManifest(
**{
"apiVersion": "v1",
"kind": "Deployment",
"metadata": {},
}
),
),
]

Expand Down Expand Up @@ -96,32 +100,40 @@ def test_calculate_changes_matching(self, helm_diff: HelmDiff):
)
) == [
Change(
old_value={
"apiVersion": "v1",
"kind": "Deployment",
"metadata": {"a": "1"},
},
new_value={
"apiVersion": "v1",
"kind": "Deployment",
"metadata": {"a": "2"},
},
old_value=KubernetesManifest(
**{
"apiVersion": "v1",
"kind": "Deployment",
"metadata": {"a": "1"},
}
),
new_value=KubernetesManifest(
**{
"apiVersion": "v1",
"kind": "Deployment",
"metadata": {"a": "2"},
}
),
),
Change(
old_value={
"apiVersion": "v1",
"kind": "Deployment",
"metadata": {"b": "1"},
},
new_value={},
old_value=KubernetesManifest(
**{
"apiVersion": "v1",
"kind": "Deployment",
"metadata": {"b": "1"},
}
),
new_value=None,
),
Change(
old_value={},
new_value={
"apiVersion": "v1",
"kind": "Deployment",
"metadata": {"c": "1"},
},
old_value=None,
new_value=KubernetesManifest(
**{
"apiVersion": "v1",
"kind": "Deployment",
"metadata": {"c": "1"},
}
),
),
]

Expand Down

0 comments on commit e67908e

Please sign in to comment.