Skip to content

Commit

Permalink
Add test case to check new if branch
Browse files Browse the repository at this point in the history
Add test case to check newly introduced branch in
the `getIdentifierFromKubernetesEntityList` function.
  • Loading branch information
HeavyWombat committed Oct 14, 2023
1 parent d74f059 commit 1c52e49
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/dyff/compare_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,15 @@ listY: [ Yo, Yo, Yo ]
Expect(isSameDetail(actual, expected)).To(BeTrue())
})

It("should process simple lists independent of other compare settings", func() {
from := yml(`list: [ A, B, C, D, E ]`)
to := yml(`list: [ A, B, C, D, E ]`)

results, err := compare(from, to, dyff.KubernetesEntityDetection(false))
Expect(err).To(BeNil())
Expect(results).To(BeNil())
})

It("should return all differences between the files with multiple documents", func() {
expected := []dyff.Diff{
singleDiff("#0/spec/template/spec/containers/name=registry/resources/limits/cpu", dyff.MODIFICATION, "100m", "1000m"),
Expand Down

0 comments on commit 1c52e49

Please sign in to comment.