Refactor e2e tests

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
Stefan Prodan
2021-08-16 21:16:28 +03:00
parent cec8b5336c
commit d1982e64b2
28 changed files with 272 additions and 161 deletions

View File

@ -23,12 +23,6 @@ import (
"sigs.k8s.io/controller-runtime/pkg/envtest"
)
func TestMain(m *testing.M) {
// Ensure tests print consistent timestamps regardless of timezone
os.Setenv("TZ", "UTC")
os.Exit(m.Run())
}
func readYamlObjects(objectFile string) ([]client.Object, error) {
obj, err := os.ReadFile(objectFile)
if err != nil {
@ -245,11 +239,3 @@ func executeCommand(cmd string) (string, error) {
return result, err
}
func TestVersion(t *testing.T) {
cmd := cmdTestCase{
args: "--version",
goldenValue: "flux version 0.0.0-dev.0\n",
}
cmd.runTestCmd(t)
}