Activity-Relay/cli/cli_test.go
Naoki Kosaka e0c0f1a68d
Use viper as Configuration manager. (#11)
* Use viper in CLI.

* Use viper in Server.

* Use viper in Worker.
2018-12-23 14:52:43 +09:00

20 lines
339 B
Go

package main
import (
"os"
"testing"
"github.com/spf13/viper"
)
func TestMain(m *testing.M) {
viper.Set("Actor_pem", "misc/testKey.pem")
viper.Set("Relay_domain", "relay.yukimochi.example.org")
initConfig()
relayState.RedisClient.FlushAll().Result()
code := m.Run()
os.Exit(code)
relayState.RedisClient.FlushAll().Result()
}