Rewrite the controller tests to test the new behavior of the reconciler
and also simplify the tests for scenarios that are now being tests in
internal/source package, especially the git operations related tests.
Some of the old controller tests are still kept to ensure those
functionalities continue to work after the controller rewrite, even if
some of them are redundant. They can be removed in the future for the
tests in the respective subpackages, internal/policy and
internal/source.
New tests that focus the status conditions and notifications have been
added for various possible scenarios.
The test helpers have been modified to simplify their usage and some
have been replaced with their equivalent version from the testutils
package.
Signed-off-by: Sunny <github@darkowlzz.space>
Set package name in the files under internal/controller to have the
base name of the directory.
This style is recommended by Go, and certain text editors/IDEs get
confused when the names don't match.
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
This replaces the `fluxcd/go-git` fork with official go-git v5.7.0
release, after all patches from the fork have been included
upstream.
Signed-off-by: Hidde Beydals <hidde@hhh.computer>