Skip to content

Commit 6663380

Browse files
committed
adding assertions for AddChange test scenario
Signed-off-by: zhaque44 <[email protected]>
1 parent 0c7b287 commit 6663380

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

pkg/update/result_test.go

+22
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,28 @@ func TestResultV2(t *testing.T) {
117117
Setter: "foo-ns:policy",
118118
})
119119

120+
expectedFileChanges := map[string]ObjectChanges{
121+
"foo.yaml": {
122+
objectNames[0]: []Change{
123+
{
124+
OldValue: "aaa",
125+
NewValue: "bbb",
126+
Setter: "foo-ns:policy:name",
127+
},
128+
},
129+
},
130+
"bar.yaml": {
131+
objectNames[1]: []Change{
132+
{
133+
OldValue: "cccc:v1.0",
134+
NewValue: "cccc:v1.2",
135+
Setter: "foo-ns:policy",
136+
},
137+
},
138+
},
139+
}
140+
g.Expect(result.FileChanges).To(Equal(expectedFileChanges))
141+
120142
result = ResultV2{
121143
FileChanges: map[string]ObjectChanges{
122144
"foo.yaml": {

0 commit comments

Comments
 (0)