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

@ -1,54 +0,0 @@
// +build e2e
package main
import (
"testing"
"time"
)
func TestInstallNoArgs(t *testing.T) {
cmd := cmdTestCase{
args: "install",
wantError: false,
testClusterMode: ExistingClusterMode,
goldenFile: "testdata/install/install_no_args.golden",
}
cmd.runTestCmd(t)
testUninstallSilent(t)
time.Sleep(30 * time.Second)
}
func TestInstallExtraComponents(t *testing.T) {
cmd := cmdTestCase{
args: "install --components-extra=image-reflector-controller,image-automation-controller",
wantError: false,
testClusterMode: ExistingClusterMode,
goldenFile: "testdata/install/install_extra_components.golden",
}
cmd.runTestCmd(t)
testUninstallSilentForExtraComponents(t)
time.Sleep(30 * time.Second)
}
func testUninstallSilent(t *testing.T) {
cmd := cmdTestCase{
args: "uninstall -s",
wantError: false,
testClusterMode: ExistingClusterMode,
goldenFile: "testdata/uninstall/uninstall.golden",
}
cmd.runTestCmd(t)
}
func testUninstallSilentForExtraComponents(t *testing.T) {
cmd := cmdTestCase{
args: "uninstall -s",
wantError: false,
testClusterMode: ExistingClusterMode,
goldenFile: "testdata/uninstall/uninstall_extra_components.golden",
}
cmd.runTestCmd(t)
}