1
0
mirror of synced 2026-02-13 13:06:56 +00:00

tests/int: Run flux check after installation

Run flux check after installation to show the relevant cluster and
resource configurations in the environment.

Signed-off-by: Sunny <github@darkowlzz.space>
This commit is contained in:
Sunny
2024-05-10 14:45:31 +00:00
parent 6b1f0fedd9
commit b87d04e629
2 changed files with 20 additions and 3 deletions

View File

@@ -53,6 +53,9 @@ const (
// kubeconfigPath is the path of the file containing the kubeconfig
kubeconfigPath = "./build/kubeconfig"
// fluxBin is the path to the flux binary.
fluxBin = "./build/flux"
// default branch to be used when cloning git repositories
defaultBranch = "main"
@@ -291,6 +294,13 @@ func TestMain(m *testing.M) {
panic(fmt.Sprintf("error installing Flux: %v", err))
}
// On check failure, log and continue. Controllers may be ready by the time
// tests run.
log.Println("Running flux check")
if err := runFluxCheck(ctx); err != nil {
log.Printf("flux check failed: %v\n", err)
}
log.Println("Running e2e tests")
exitCode = m.Run()
}