forked from kubevirt/kubevirt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Current command line flags are setup at `init` but parsed multiple times by each test file. As the flags are bound to global variables and flag parsing should only be executed once (consequent calls are no-op), there is no point to execute the parse more than once. The test framework is expected to execute the parsing in its main function for its own flags, therefore, there should be no need to explicitly parse the flags in the tests. Signed-off-by: Edward Haas <[email protected]>
- Loading branch information
Showing
44 changed files
with
3 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,8 +35,6 @@ import ( | |
|
||
var _ = Describe("[rfe_id:500][crit:high][vendor:[email protected]][level:component]User Access", func() { | ||
|
||
tests.FlagParse() | ||
|
||
view := tests.ViewServiceAccountName | ||
edit := tests.EditServiceAccountName | ||
admin := tests.AdminServiceAccountName | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,6 @@ import ( | |
|
||
var _ = Describe("[rfe_id:899][crit:medium][vendor:[email protected]][level:component]Config", func() { | ||
|
||
tests.FlagParse() | ||
var virtClient kubecli.KubevirtClient | ||
|
||
BeforeEach(func() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,10 +37,8 @@ import ( | |
|
||
var _ = Describe("[rfe_id:127][posneg:negative][crit:medium][vendor:[email protected]][level:component]Console", func() { | ||
|
||
tests.FlagParse() | ||
var virtClient kubecli.KubevirtClient | ||
|
||
|
||
BeforeEach(func() { | ||
var err error | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,8 +40,6 @@ import ( | |
|
||
var _ = Describe("[rfe_id:588][crit:medium][vendor:[email protected]][level:component]ContainerDisk", func() { | ||
|
||
tests.FlagParse() | ||
|
||
var virtClient kubecli.KubevirtClient | ||
var err error | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,8 +46,6 @@ func waitForJobToCompleteWithStatus(virtClient *kubecli.KubevirtClient, jobPod * | |
|
||
var _ = Describe("[rfe_id:253][crit:medium][vendor:[email protected]][level:component]Expose", func() { | ||
|
||
tests.FlagParse() | ||
|
||
var virtClient kubecli.KubevirtClient | ||
var err error | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,8 +15,6 @@ import ( | |
) | ||
|
||
var _ = Describe("[rfe_id:3423][vendor:[email protected]][level:component]oc/kubectl get vm/vmi tests", func() { | ||
tests.FlagParse() | ||
|
||
var k8sClient, result string | ||
var vm *v1.VirtualMachine | ||
var virtCli kubecli.KubevirtClient | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,7 +61,6 @@ const ( | |
) | ||
|
||
var _ = Describe("[rfe_id:393][crit:high][vendor:[email protected]][level:system] VM Live Migration", func() { | ||
tests.FlagParse() | ||
var virtClient kubecli.KubevirtClient | ||
|
||
var originalKubeVirtConfig *k8sv1.ConfigMap | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,8 +40,6 @@ func assertPingFail(ip string, vmi *v1.VirtualMachineInstance) { | |
|
||
var _ = Describe("[rfe_id:150][crit:high][vendor:[email protected]][level:component]Networkpolicy", func() { | ||
|
||
tests.FlagParse() | ||
|
||
var virtClient kubecli.KubevirtClient | ||
|
||
var vmia *v1.VirtualMachineInstance | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,8 +44,6 @@ import ( | |
|
||
var _ = Describe("[rfe_id:3064][crit:medium][vendor:[email protected]][level:component]Pausing", func() { | ||
|
||
tests.FlagParse() | ||
|
||
var err error | ||
var virtClient kubecli.KubevirtClient | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,8 +44,6 @@ var _ = Describe("[rfe_id:588][crit:medium][vendor:[email protected]][level:comp | |
var err error | ||
var virtClient kubecli.KubevirtClient | ||
|
||
tests.FlagParse() | ||
|
||
BeforeEach(func() { | ||
virtClient, err = kubecli.GetKubevirtClient() | ||
tests.PanicOnError(err) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,8 +52,6 @@ import ( | |
|
||
var _ = Describe("[rfe_id:1177][crit:medium][vendor:[email protected]][level:component]VirtualMachine", func() { | ||
|
||
tests.FlagParse() | ||
|
||
var err error | ||
var virtClient kubecli.KubevirtClient | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,8 +141,6 @@ func createCommandWithNSAndRedirect(namespace, cmdName string, args ...string) ( | |
} | ||
|
||
var _ = Describe("[rfe_id:3423][crit:high][vendor:[email protected]][level:component]VmWatch", func() { | ||
tests.FlagParse() | ||
|
||
var err error | ||
var virtCli kubecli.KubevirtClient | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,8 +51,6 @@ const ( | |
|
||
var _ = Describe("[rfe_id:151][crit:high][vendor:[email protected]][level:component]CloudInit UserData", func() { | ||
|
||
tests.FlagParse() | ||
|
||
var err error | ||
var virtClient kubecli.KubevirtClient | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,8 +34,6 @@ import ( | |
|
||
var _ = Describe("[rfe_id:151][crit:high][vendor:[email protected]][level:component]IgnitionData", func() { | ||
|
||
tests.FlagParse() | ||
|
||
var err error | ||
var virtClient kubecli.KubevirtClient | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,8 +73,6 @@ func addNodeAffinityToVMI(vmi *v1.VirtualMachineInstance, nodeName string) { | |
|
||
var _ = Describe("[rfe_id:273][crit:high][vendor:[email protected]][level:component]VMIlifecycle", func() { | ||
|
||
tests.FlagParse() | ||
|
||
var err error | ||
var virtClient kubecli.KubevirtClient | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,8 +49,6 @@ import ( | |
|
||
var _ = Describe("[rfe_id:694][crit:medium][vendor:[email protected]][level:component]Networking", func() { | ||
|
||
tests.FlagParse() | ||
|
||
var err error | ||
var virtClient kubecli.KubevirtClient | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.