mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-29 07:29:29 +01:00
minor: fix lint errors by using assert.Len
I noticed while prepping another PR that golangci-lint fails at HEAD. Generated with ```perl -pi -e 's/assert[.]Equal[(]t, (\d+), len[(]([^)]+)[)][)]/assert.Len(t, $2, $1)/' gateway/gateway_test.go```
This commit is contained in:
parent
56e7bd01ca
commit
a6daf411b9
@ -170,15 +170,15 @@ func maketestRouter(input []byte) *Router {
|
|||||||
|
|
||||||
func TestNewRouter(t *testing.T) {
|
func TestNewRouter(t *testing.T) {
|
||||||
r := maketestRouter(testconfig)
|
r := maketestRouter(testconfig)
|
||||||
assert.Equal(t, 1, len(r.Gateways))
|
assert.Len(t, r.Gateways, 1)
|
||||||
assert.Equal(t, 3, len(r.Gateways["bridge1"].Bridges))
|
assert.Len(t, r.Gateways["bridge1"].Bridges, 3)
|
||||||
assert.Equal(t, 3, len(r.Gateways["bridge1"].Channels))
|
assert.Len(t, r.Gateways["bridge1"].Channels, 3)
|
||||||
r = maketestRouter(testconfig2)
|
r = maketestRouter(testconfig2)
|
||||||
assert.Equal(t, 2, len(r.Gateways))
|
assert.Len(t, r.Gateways, 2)
|
||||||
assert.Equal(t, 3, len(r.Gateways["bridge1"].Bridges))
|
assert.Len(t, r.Gateways["bridge1"].Bridges, 3)
|
||||||
assert.Equal(t, 2, len(r.Gateways["bridge2"].Bridges))
|
assert.Len(t, r.Gateways["bridge2"].Bridges, 2)
|
||||||
assert.Equal(t, 3, len(r.Gateways["bridge1"].Channels))
|
assert.Len(t, r.Gateways["bridge1"].Channels, 3)
|
||||||
assert.Equal(t, 2, len(r.Gateways["bridge2"].Channels))
|
assert.Len(t, r.Gateways["bridge2"].Channels, 2)
|
||||||
assert.Equal(t, &config.ChannelInfo{
|
assert.Equal(t, &config.ChannelInfo{
|
||||||
Name: "general",
|
Name: "general",
|
||||||
Direction: "inout",
|
Direction: "inout",
|
||||||
|
Loading…
Reference in New Issue
Block a user