mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-16 19:33:09 -06:00
Return nil early on fail
This commit is contained in:
parent
5c8296236d
commit
9f63d9f0c3
|
|
@ -3,12 +3,13 @@ package devices
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/matrix-org/dendrite/clientapi/auth/authtypes"
|
|
||||||
"github.com/stretchr/testify/assert"
|
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/matrix-org/dendrite/clientapi/auth/authtypes"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
var dataSource string
|
var dataSource string
|
||||||
|
|
@ -102,6 +103,7 @@ func createTestDevice(devSpecScheme *deviceSpec, count int) (devices []*authtype
|
||||||
db, err := NewDatabase(dataSource, "localhost")
|
db, err := NewDatabase(dataSource, "localhost")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
for i := 0; i < count; i++ {
|
for i := 0; i < count; i++ {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue