Skip to content

Commit

Permalink
remove verbose option of test command
Browse files Browse the repository at this point in the history
  • Loading branch information
ak1ra24 committed Jan 31, 2020
1 parent 929f293 commit 437f885
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import (
var defaultCfgFile string = "spec.yaml"
var cfgFile string
var tnconfig shell.Tn

// var verbose bool = false
var verbose bool

// rootCmd represents the base command when called without any subcommands
Expand Down Expand Up @@ -67,7 +69,6 @@ func init() {
reconfCmd.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "verbose (default: false)")
execCmd.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "verbose (default: false)")
downCmd.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "verbose (default: false)")
testCmd.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "verbose (default: false)")

// Cobra also supports local flags, which will only run
// when this action is called directly.
Expand Down
4 changes: 2 additions & 2 deletions cmd/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
package cmd

import (
"fmt"
"os"
"strings"

"github.com/spf13/cobra"
"github.com/tinynetwork/tinet/internal/pkg/shell"
"github.com/tinynetwork/tinet/internal/pkg/utils"
)

// testCmd represents the test command
Expand All @@ -16,7 +16,7 @@ var testCmd = &cobra.Command{
Short: "Execute tests",
Run: func(cmd *cobra.Command, args []string) {
tnTestCmds := shell.TnTestCmdExec(tnconfig.Test)
utils.PrintCmd(os.Stdout, strings.Join(tnTestCmds, "\n"), verbose)
fmt.Fprintln(os.Stdout, strings.Join(tnTestCmds, "\n"))
},
}

Expand Down

0 comments on commit 437f885

Please sign in to comment.