fluxcd / image-automation-controller

GitOps Toolkit controller that patches container image tags in Git
https://fluxcd.io
Apache License 2.0
155 stars 67 forks source link

Adding assertions for AddChange test scenario for ResultV2 Test #686

Closed zhaque44 closed 3 weeks ago

zhaque44 commented 1 month ago

The updated test accounts for much needed assertions for AddChange scenario in Result V2 test:

This code snippet initializes an expectedFileChanges variable, which is containing the expected changes. Each file is associated with a set of object changes represented by ObjectChanges. Within each file's changes, specific objects are associated with an array of Change structs, where each struct represents a change in values. The g.Expect(result.FileChanges) statement asserts that the FileChanges field of the result variable matches the expected changes defined.

zhaque44 commented 1 month ago

Hi @souleb hope you are doing well, I made the necessary changes recommended here: https://github.com/fluxcd/image-automation-controller/pull/682#issuecomment-2122409405 please review this when you have a minute

zhaque44 commented 1 month ago

@souleb hey can you take a look at these changes please