Run tests in parallel
This commit is contained in:
parent
c5be03ab6b
commit
9b92e2b551
@ -21,6 +21,7 @@ func init() {
|
||||
}
|
||||
|
||||
func TestListTimezonesHandler(t *testing.T) {
|
||||
t.Parallel()
|
||||
database, err := postgres.Connect("pgtx", "example")
|
||||
if err != nil {
|
||||
t.Errorf("could not connect to db: %s", err)
|
||||
@ -38,6 +39,7 @@ func TestListTimezonesHandler(t *testing.T) {
|
||||
h.LoadRoutes(engine)
|
||||
|
||||
t.Run("RegisterUser", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
context.Request, err = http.NewRequest(http.MethodPost, "/api/v1/user/register", strings.NewReader(`{"password":"pass","email":"info@example.com","name":"Test"}`))
|
||||
if err != nil {
|
||||
t.Errorf("error creating request: %s", err)
|
||||
@ -62,6 +64,7 @@ func TestListTimezonesHandler(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("GetTransactions", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
context.Request, err = http.NewRequest(http.MethodGet, "/account/accountid/transactions", nil)
|
||||
if recorder.Code != http.StatusOK {
|
||||
t.Errorf("handler returned wrong status code: got %v want %v", recorder.Code, http.StatusOK)
|
||||
|
Loading…
x
Reference in New Issue
Block a user