Remove unnecessary arg parsing from tests

This commit is contained in:
Ian Howell
2019-05-29 15:15:01 -05:00
parent 4c6b8486c9
commit 3dae793f70
3 changed files with 1 additions and 7 deletions

View File

@@ -1,7 +1,6 @@
package cmd_test
import (
"os"
"testing"
"github.com/ian-howell/airshipctl/cmd"
@@ -9,7 +8,7 @@ import (
)
func TestRoot(t *testing.T) {
cmdTests := []*test.CmdTest {
cmdTests := []*test.CmdTest{
&test.CmdTest{
Name: "default",
CmdLine: "",
@@ -19,7 +18,6 @@ func TestRoot(t *testing.T) {
if err != nil {
t.Fatalf("Could not create root command: %s", err.Error())
}
rootCmd.PersistentFlags().Parse(os.Args[1:])
for _, tt := range cmdTests {
test.RunTest(t, tt, rootCmd)
}