Commit ba115151 authored by GuessWhoSamFoo's avatar GuessWhoSamFoo
Browse files

Changed default module for import to /


Signed-off-by: default avatarGuessWhoSamFoo <sfoohei@gmail.com>
parent 7284dcaa
......@@ -53,7 +53,7 @@ func TestImport_http(t *testing.T) {
in := map[string]interface{}{
OptionApp: appMock,
OptionModule: "",
OptionModule: "/",
OptionPath: ts.URL,
}
......
......@@ -49,7 +49,7 @@ func newImportCmd(a app.App) *cobra.Command {
importCmd.Flags().StringP(flagFilename, shortFilename, "", "Filename, directory, or URL for component to import")
viper.BindPFlag(vImportFilename, importCmd.Flags().Lookup(flagFilename))
importCmd.Flags().String(flagModule, "", "Component module")
importCmd.Flags().String(flagModule, "/", "Component module")
viper.BindPFlag(vImportModule, importCmd.Flags().Lookup(flagModule))
return importCmd
......
......@@ -24,12 +24,13 @@ import (
func Test_importCmd(t *testing.T) {
cases := []cmdTestCase{
{
name: "import location",
name: "import location without module",
args: []string{"import", "-f", "location"},
action: actionImport,
expected: map[string]interface{}{
actions.OptionApp: nil,
actions.OptionPath: "location",
actions.OptionApp: nil,
actions.OptionPath: "location",
actions.OptionModule: "/",
},
},
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment