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:
@ -1,4 +1,4 @@
|
||||
package samechannelgateway
|
||||
package samechannel
|
||||
|
||||
import (
|
||||
"github.com/42wim/matterbridge/bridge/config"
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user