4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-06-26 16:39:24 +00:00

Make all loggers derive from non-default instance (#728)

This commit is contained in:
Wim
2019-02-23 22:51:27 +01:00
committed by GitHub
parent 1bb39eba87
commit bf21604d42
28 changed files with 2934 additions and 270 deletions

View File

@ -1,4 +1,4 @@
package samechannelgateway
package samechannel
import (
"github.com/42wim/matterbridge/bridge/config"

View File

@ -1,9 +1,11 @@
package samechannelgateway
package samechannel
import (
"io/ioutil"
"testing"
"github.com/42wim/matterbridge/bridge/config"
"github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
)
@ -66,7 +68,9 @@ var (
)
func TestGetConfig(t *testing.T) {
cfg := config.NewConfigFromString([]byte(testConfig))
logger := logrus.New()
logger.SetOutput(ioutil.Discard)
cfg := config.NewConfigFromString(logger, []byte(testConfig))
sgw := New(cfg)
configs := sgw.GetConfig()
assert.Equal(t, []config.Gateway{expectedConfig}, configs)