cosmium/api/tests/config_test.go

22 lines
428 B
Go
Raw Normal View History

package tests_test
import (
"net/http/httptest"
"github.com/pikami/cosmium/api"
2024-02-21 21:40:54 +00:00
"github.com/pikami/cosmium/api/config"
)
func runTestServer() *httptest.Server {
2024-02-21 21:40:54 +00:00
config.Config.AccountKey = config.DefaultAccountKey
config.Config.ExplorerPath = "/tmp/nothing"
2024-02-21 21:40:54 +00:00
return httptest.NewServer(api.CreateRouter())
}
const (
testAccountKey = "account-key"
testDatabaseName = "test-db"
testCollectionName = "test-coll"
)