Skip to content

MAP: apply defalut values to the expected object - #25

Merged
naoki9911 merged 1 commit into
mainfrom
map-default
Aug 17, 2026
Merged

MAP: apply defalut values to the expected object#25
naoki9911 merged 1 commit into
mainfrom
map-default

Conversation

@naoki9911

Copy link
Copy Markdown
Collaborator

MAP apply default values to the mutated object like below.
This required redundant definition of an expected object.

[internal/tester/testdata/map-object-defaults.test/kaptest.yaml]
[MAP] FAIL: pod-add-label - (CREATE) Pod:base - MUTATE ==> MUTATE
--- Binding:  Param: nil
  &v1.Pod{
        TypeMeta:   {Kind: "Pod", APIVersion: "v1"},
        ObjectMeta: {Name: "base", Namespace: "default", Labels: {"app": "ok-pod", "environment": "test"}},
        Spec: v1.PodSpec{
                Volumes:        nil,
                InitContainers: nil,
                Containers: []v1.Container{
                        {
                                ... // 16 identical fields
                                StartupProbe:             nil,
                                Lifecycle:                nil,
-                               TerminationMessagePath:   "",
+                               TerminationMessagePath:   "/dev/termination-log",
-                               TerminationMessagePolicy: "",
+                               TerminationMessagePolicy: "File",
-                               ImagePullPolicy:          "",
+                               ImagePullPolicy:          "Always",
...

This patch apply defalut values to the expected object, and no more default values are required.

MAP apply default values to the mutated object.
This patch apply defalut values to the expected object,
and no more default values are required.
@naoki9911

Copy link
Copy Markdown
Collaborator Author

Thanks!

@naoki9911
naoki9911 merged commit 910a486 into main Aug 17, 2026
4 checks passed
@naoki9911
naoki9911 deleted the map-default branch August 17, 2026 23:45
@github-actions github-actions Bot mentioned this pull request Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants