6e41a56a7d
Change-Id: I5c8c524c4d3f569b21b5b829722b3c49952cb0ab
26 lines
473 B
Go
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)
|
|
}
|
|
}
|