mirror of
https://github.com/pushbits/server.git
synced 2025-06-06 12:41:59 +02:00
add tests for config
This commit is contained in:
parent
d39e2ea9a4
commit
e87f775b1d
11 changed files with 461 additions and 6 deletions
13
tests/mockups/database.go
Normal file
13
tests/mockups/database.go
Normal file
|
@ -0,0 +1,13 @@
|
|||
package mockups
|
||||
|
||||
import (
|
||||
"github.com/pushbits/server/internal/authentication/credentials"
|
||||
"github.com/pushbits/server/internal/configuration"
|
||||
"github.com/pushbits/server/internal/database"
|
||||
)
|
||||
|
||||
// GetEmptyDatabase returns an empty sqlite database object
|
||||
func GetEmptyDatabase() (*database.Database, error) {
|
||||
cm := credentials.CreateManager(false, configuration.CryptoConfig{})
|
||||
return database.Create(cm, "sqlite3", "pushbits-test.db")
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue