summaryrefslogtreecommitdiff
path: root/run_test.go
diff options
context:
space:
mode:
authorEyal Posener <[email protected]>2017-05-06 23:06:58 +0300
committerEyal Posener <[email protected]>2017-05-06 23:07:26 +0300
commitf740f61fbbe06da0381d899376cbf99853630b88 (patch)
tree97ab8ccef7ae63f9edcf295854fb72d1cd5a25f6 /run_test.go
parent8d6ebaa18327f3cb65b38ab3d0ba6b4a8dc231ea (diff)
[test] chdir and set logger only once
Diffstat (limited to 'run_test.go')
-rw-r--r--run_test.go14
1 files changed, 1 insertions, 13 deletions
diff --git a/run_test.go b/run_test.go
index 95b48b3..147a361 100644
--- a/run_test.go
+++ b/run_test.go
@@ -8,19 +8,7 @@ import (
func TestCompleter_Complete(t *testing.T) {
t.Parallel()
-
- // Set debug environment variable so logs will be printed
- if testing.Verbose() {
- os.Setenv(envDebug, "1")
- // refresh the logger with environment variable set
- Log = getLogger()
- }
-
- // Change to tests directory for testing completion of files and directories
- err := os.Chdir("./tests")
- if err != nil {
- t.Fatal(err)
- }
+ initTests()
c := Command{
Sub: map[string]Command{