Skip to content

Commit

Permalink
Merge pull request #34 from bpineau/glog_dont_log_to_tmp
Browse files Browse the repository at this point in the history
Prevent glog from writing to /tmp during tests
  • Loading branch information
bpineau committed Apr 19, 2018
2 parents 0db2752 + b0949cb commit 6cf8a82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ func init() {
log.Fatal("Failed to bind cli argument:", err)
}

RootCmd.PersistentFlags().BoolVarP(&dryRun, "dry-run", "d", false, "Dry-run mode: don't store anything.")
RootCmd.PersistentFlags().BoolVarP(&dryRun, "dry-run", "d", false, "Dry-run mode: don't store anything")
bindPFlag("dry-run", "dry-run")

RootCmd.PersistentFlags().BoolVarP(&dumpMode, "dump-only", "m", false, "Dump mode: dump everything and exit")
RootCmd.PersistentFlags().BoolVarP(&dumpMode, "dump-only", "m", false, "Dump mode: dump everything once and exit")
bindPFlag("dump-only", "dump-only")

RootCmd.PersistentFlags().StringVarP(&logLevel, "log-level", "v", "info", "Log level")
Expand Down
2 changes: 2 additions & 0 deletions pkg/controller/controller_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package controller

import (
"flag"
"strings"
"testing"
"time"
Expand Down Expand Up @@ -73,6 +74,7 @@ var (
)

func TestController(t *testing.T) {
flag.Lookup("logtostderr").Value.Set("true")

conf := &config.KfConfig{
Logger: log.New("info", "", "test"),
Expand Down

0 comments on commit 6cf8a82

Please sign in to comment.