minimum viable (excluding auth)

This commit is contained in:
simon987
2019-03-09 09:20:51 -05:00
parent 5a7f3316e6
commit 6048cfbebc
11 changed files with 812 additions and 0 deletions

25
test/main_test.go Normal file
View File

@@ -0,0 +1,25 @@
package test
import (
"github.com/jinzhu/gorm"
_ "github.com/jinzhu/gorm/dialects/sqlite"
"github.com/simon987/ws_bucket/api"
"testing"
"time"
)
func TestMain(m *testing.M) {
//db, err := gorm.Open("postgres", "host=localhost user=ws_bucket dbname=ws_bucket password=ws_bucket sslmode=disable")
db, err := gorm.Open("sqlite3", ":memory:")
if err != nil {
panic(err)
}
a := api.New(db)
go a.Run()
time.Sleep(time.Millisecond * 100)
m.Run()
}