image-automation-controller/pkg
Michael Bridgen e45b446b86 Correct directory diffing test and algorithm
Two steps:

1. TestDiffDirectories did not check if the expected only return value
was correct; the intention was there to do so (judging by the
comment "change in order"), but my eye for detail failed me.

2. Reversing the directory comparison in the test revealed bugs in the
comparison code -- in general, it should skip any directory that is
not a directory in the comparator.

To make this easier, the code now keeps track of the expected files it
saw. That means the check for whether an actual file has an expected
counterpart only has two cases, yes or no (rather that trying to
account for whether it's a directory and so on). If a directory was
skipped while scanning the expected files, it won't be in the actual
files anyway.

Signed-off-by: Michael Bridgen <mikeb@weave.works>
2021-10-18 14:49:48 +01:00
..
test Correct directory diffing test and algorithm 2021-10-18 14:49:48 +01:00
update update pkg/test and pkg/update with testenv 2021-09-28 18:28:41 +05:30