mirror of
https://github.com/fluxcd/flux2.git
synced 2025-10-29 23:37:47 +08:00
Refactor e2e tests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user