Initial commit
This commit is contained in:
23
vendor/github.com/hyperhq/hypercli/hyper/client_test.go
generated
vendored
Normal file
23
vendor/github.com/hyperhq/hypercli/hyper/client_test.go
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/hyperhq/hypercli/utils"
|
||||
)
|
||||
|
||||
func TestClientDebugEnabled(t *testing.T) {
|
||||
defer utils.DisableDebug()
|
||||
|
||||
clientFlags.Common.FlagSet.Parse([]string{"-D"})
|
||||
clientFlags.PostParse()
|
||||
|
||||
if os.Getenv("DEBUG") != "1" {
|
||||
t.Fatal("expected debug enabled, got false")
|
||||
}
|
||||
if logrus.GetLevel() != logrus.DebugLevel {
|
||||
t.Fatalf("expected logrus debug level, got %v", logrus.GetLevel())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user