File: setup_test.go

package info (click to toggle)
onedriver 0.15.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 616 kB
  • sloc: ansic: 132; makefile: 131; sh: 24
file content (20 lines) | stat: -rw-r--r-- 413 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package common

import (
	"os"
	"testing"

	"github.com/rs/zerolog"
	"github.com/rs/zerolog/log"
)

func TestMain(m *testing.M) {
	os.Chdir("../..")
	os.RemoveAll("tmp")
	f, _ := os.OpenFile("fusefs_tests.log", os.O_TRUNC|os.O_CREATE|os.O_RDWR, 0644)
	zerolog.SetGlobalLevel(zerolog.TraceLevel)
	log.Logger = log.Output(zerolog.ConsoleWriter{Out: f, TimeFormat: "15:04:05"})
	defer f.Close()

	os.Exit(m.Run())
}