cli/debug: use string-literals for easier grep'ing
Also removed some newlines from t.Fatal() as they shouldn't be needed. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
02815416bb
commit
c3d533f37f
1 changed files with 4 additions and 4 deletions
|
@ -14,20 +14,20 @@ func TestEnable(t *testing.T) {
|
||||||
}()
|
}()
|
||||||
Enable()
|
Enable()
|
||||||
if os.Getenv("DEBUG") != "1" {
|
if os.Getenv("DEBUG") != "1" {
|
||||||
t.Fatalf("expected DEBUG=1, got %s\n", os.Getenv("DEBUG"))
|
t.Fatalf("expected DEBUG=1, got %s", os.Getenv("DEBUG"))
|
||||||
}
|
}
|
||||||
if logrus.GetLevel() != logrus.DebugLevel {
|
if logrus.GetLevel() != logrus.DebugLevel {
|
||||||
t.Fatalf("expected log level %v, got %v\n", logrus.DebugLevel, logrus.GetLevel())
|
t.Fatalf("expected log level %v, got %v", logrus.DebugLevel, logrus.GetLevel())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestDisable(t *testing.T) {
|
func TestDisable(t *testing.T) {
|
||||||
Disable()
|
Disable()
|
||||||
if os.Getenv("DEBUG") != "" {
|
if os.Getenv("DEBUG") != "" {
|
||||||
t.Fatalf("expected DEBUG=\"\", got %s\n", os.Getenv("DEBUG"))
|
t.Fatalf(`expected DEBUG="", got %s`, os.Getenv("DEBUG"))
|
||||||
}
|
}
|
||||||
if logrus.GetLevel() != logrus.InfoLevel {
|
if logrus.GetLevel() != logrus.InfoLevel {
|
||||||
t.Fatalf("expected log level %v, got %v\n", logrus.InfoLevel, logrus.GetLevel())
|
t.Fatalf("expected log level %v, got %v", logrus.InfoLevel, logrus.GetLevel())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue