airshipctl/cmd/version_test.go
Ian Howell 6e41a56a7d Rename module to reflect its new location
Change-Id: I5c8c524c4d3f569b21b5b829722b3c49952cb0ab
2019-07-01 12:15:29 -05:00

26 lines
473 B
Go

package cmd_test
import (
"testing"
"opendev.org/airship/airshipctl/cmd"
"opendev.org/airship/airshipctl/test"
)
func TestVersion(t *testing.T) {
cmdTests := []*test.CmdTest{
{
Name: "version",
CmdLine: "version",
},
}
rootCmd, _, err := cmd.NewRootCmd(nil)
if err != nil {
t.Fatalf("Could not create root command: %s", err.Error())
}
rootCmd.AddCommand(cmd.NewVersionCommand())
for _, tt := range cmdTests {
test.RunTest(t, tt, rootCmd)
}
}