1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-11-24 15:14:30 +02:00

updated some of the tests to use t.Parallel

This commit is contained in:
Gani Georgiev
2024-01-03 04:30:20 +02:00
parent 0599955676
commit 8f625daa2f
46 changed files with 374 additions and 0 deletions

View File

@@ -17,6 +17,8 @@ import (
) )
func TestAdminAuthWithPassword(t *testing.T) { func TestAdminAuthWithPassword(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "empty data", Name: "empty data",
@@ -119,6 +121,8 @@ func TestAdminAuthWithPassword(t *testing.T) {
} }
func TestAdminRequestPasswordReset(t *testing.T) { func TestAdminRequestPasswordReset(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "empty data", Name: "empty data",
@@ -188,6 +192,8 @@ func TestAdminRequestPasswordReset(t *testing.T) {
} }
func TestAdminConfirmPasswordReset(t *testing.T) { func TestAdminConfirmPasswordReset(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "empty data", Name: "empty data",
@@ -277,6 +283,8 @@ func TestAdminConfirmPasswordReset(t *testing.T) {
} }
func TestAdminRefresh(t *testing.T) { func TestAdminRefresh(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "unauthorized", Name: "unauthorized",
@@ -350,6 +358,8 @@ func TestAdminRefresh(t *testing.T) {
} }
func TestAdminsList(t *testing.T) { func TestAdminsList(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "unauthorized", Name: "unauthorized",
@@ -453,6 +463,8 @@ func TestAdminsList(t *testing.T) {
} }
func TestAdminView(t *testing.T) { func TestAdminView(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "unauthorized", Name: "unauthorized",
@@ -508,6 +520,8 @@ func TestAdminView(t *testing.T) {
} }
func TestAdminDelete(t *testing.T) { func TestAdminDelete(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "unauthorized", Name: "unauthorized",
@@ -603,6 +617,8 @@ func TestAdminDelete(t *testing.T) {
} }
func TestAdminCreate(t *testing.T) { func TestAdminCreate(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "unauthorized (while having at least 1 existing admin)", Name: "unauthorized (while having at least 1 existing admin)",
@@ -757,6 +773,8 @@ func TestAdminCreate(t *testing.T) {
} }
func TestAdminUpdate(t *testing.T) { func TestAdminUpdate(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "unauthorized", Name: "unauthorized",

View File

@@ -10,6 +10,8 @@ import (
) )
func TestNewApiErrorWithRawData(t *testing.T) { func TestNewApiErrorWithRawData(t *testing.T) {
t.Parallel()
e := apis.NewApiError( e := apis.NewApiError(
300, 300,
"message_test", "message_test",
@@ -33,6 +35,8 @@ func TestNewApiErrorWithRawData(t *testing.T) {
} }
func TestNewApiErrorWithValidationData(t *testing.T) { func TestNewApiErrorWithValidationData(t *testing.T) {
t.Parallel()
e := apis.NewApiError( e := apis.NewApiError(
300, 300,
"message_test", "message_test",
@@ -66,6 +70,8 @@ func TestNewApiErrorWithValidationData(t *testing.T) {
} }
func TestNewNotFoundError(t *testing.T) { func TestNewNotFoundError(t *testing.T) {
t.Parallel()
scenarios := []struct { scenarios := []struct {
message string message string
data any data any
@@ -87,6 +93,8 @@ func TestNewNotFoundError(t *testing.T) {
} }
func TestNewBadRequestError(t *testing.T) { func TestNewBadRequestError(t *testing.T) {
t.Parallel()
scenarios := []struct { scenarios := []struct {
message string message string
data any data any
@@ -108,6 +116,8 @@ func TestNewBadRequestError(t *testing.T) {
} }
func TestNewForbiddenError(t *testing.T) { func TestNewForbiddenError(t *testing.T) {
t.Parallel()
scenarios := []struct { scenarios := []struct {
message string message string
data any data any
@@ -129,6 +139,8 @@ func TestNewForbiddenError(t *testing.T) {
} }
func TestNewUnauthorizedError(t *testing.T) { func TestNewUnauthorizedError(t *testing.T) {
t.Parallel()
scenarios := []struct { scenarios := []struct {
message string message string
data any data any

View File

@@ -17,6 +17,8 @@ import (
) )
func TestBackupsList(t *testing.T) { func TestBackupsList(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "unauthorized", Name: "unauthorized",
@@ -84,6 +86,8 @@ func TestBackupsList(t *testing.T) {
} }
func TestBackupsCreate(t *testing.T) { func TestBackupsCreate(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "unauthorized", Name: "unauthorized",
@@ -198,6 +202,8 @@ func TestBackupsCreate(t *testing.T) {
} }
func TestBackupsUpload(t *testing.T) { func TestBackupsUpload(t *testing.T) {
t.Parallel()
// create dummy form data bodies // create dummy form data bodies
type body struct { type body struct {
buffer io.Reader buffer io.Reader
@@ -330,6 +336,8 @@ func TestBackupsUpload(t *testing.T) {
} }
func TestBackupsDownload(t *testing.T) { func TestBackupsDownload(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "unauthorized", Name: "unauthorized",
@@ -485,6 +493,8 @@ func TestBackupsDownload(t *testing.T) {
} }
func TestBackupsDelete(t *testing.T) { func TestBackupsDelete(t *testing.T) {
t.Parallel()
noTestBackupFilesChanges := func(t *testing.T, app *tests.TestApp) { noTestBackupFilesChanges := func(t *testing.T, app *tests.TestApp) {
files, err := getBackupFiles(app) files, err := getBackupFiles(app)
if err != nil { if err != nil {
@@ -645,6 +655,8 @@ func TestBackupsDelete(t *testing.T) {
} }
func TestBackupsRestore(t *testing.T) { func TestBackupsRestore(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "unauthorized", Name: "unauthorized",

View File

@@ -15,6 +15,8 @@ import (
) )
func Test404(t *testing.T) { func Test404(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Method: http.MethodGet, Method: http.MethodGet,
@@ -53,6 +55,8 @@ func Test404(t *testing.T) {
} }
func TestCustomRoutesAndErrorsHandling(t *testing.T) { func TestCustomRoutesAndErrorsHandling(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "custom route", Name: "custom route",
@@ -142,6 +146,8 @@ func TestCustomRoutesAndErrorsHandling(t *testing.T) {
} }
func TestRemoveTrailingSlashMiddleware(t *testing.T) { func TestRemoveTrailingSlashMiddleware(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "non /api/* route (exact match)", Name: "non /api/* route (exact match)",
@@ -215,6 +221,8 @@ func TestRemoveTrailingSlashMiddleware(t *testing.T) {
} }
func TestEagerRequestInfoCache(t *testing.T) { func TestEagerRequestInfoCache(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "custom non-api group route", Name: "custom non-api group route",
@@ -316,6 +324,8 @@ func TestEagerRequestInfoCache(t *testing.T) {
} }
func TestErrorHandler(t *testing.T) { func TestErrorHandler(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "apis.ApiError", Name: "apis.ApiError",

View File

@@ -17,6 +17,8 @@ import (
) )
func TestCollectionsList(t *testing.T) { func TestCollectionsList(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "unauthorized", Name: "unauthorized",
@@ -125,6 +127,8 @@ func TestCollectionsList(t *testing.T) {
} }
func TestCollectionView(t *testing.T) { func TestCollectionView(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "unauthorized", Name: "unauthorized",
@@ -193,6 +197,8 @@ func TestCollectionView(t *testing.T) {
} }
func TestCollectionDelete(t *testing.T) { func TestCollectionDelete(t *testing.T) {
t.Parallel()
ensureDeletedFiles := func(app *tests.TestApp, collectionId string) { ensureDeletedFiles := func(app *tests.TestApp, collectionId string) {
storageDir := filepath.Join(app.DataDir(), "storage", collectionId) storageDir := filepath.Join(app.DataDir(), "storage", collectionId)
@@ -338,6 +344,8 @@ func TestCollectionDelete(t *testing.T) {
} }
func TestCollectionCreate(t *testing.T) { func TestCollectionCreate(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "unauthorized", Name: "unauthorized",
@@ -715,6 +723,8 @@ func TestCollectionCreate(t *testing.T) {
} }
func TestCollectionUpdate(t *testing.T) { func TestCollectionUpdate(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "unauthorized", Name: "unauthorized",
@@ -1082,6 +1092,8 @@ func TestCollectionUpdate(t *testing.T) {
} }
func TestCollectionsImport(t *testing.T) { func TestCollectionsImport(t *testing.T) {
t.Parallel()
totalCollections := 11 totalCollections := 11
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{

View File

@@ -20,6 +20,8 @@ import (
) )
func TestFileToken(t *testing.T) { func TestFileToken(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "unauthorized", Name: "unauthorized",
@@ -92,6 +94,8 @@ func TestFileToken(t *testing.T) {
} }
func TestFileDownload(t *testing.T) { func TestFileDownload(t *testing.T) {
t.Parallel()
_, currentFile, _, _ := runtime.Caller(0) _, currentFile, _, _ := runtime.Caller(0)
dataDirRelPath := "../tests/data/" dataDirRelPath := "../tests/data/"
@@ -391,6 +395,8 @@ func TestFileDownload(t *testing.T) {
} }
func TestConcurrentThumbsGeneration(t *testing.T) { func TestConcurrentThumbsGeneration(t *testing.T) {
t.Parallel()
app, err := tests.NewTestApp() app, err := tests.NewTestApp()
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)

View File

@@ -8,6 +8,8 @@ import (
) )
func TestHealthAPI(t *testing.T) { func TestHealthAPI(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "health status returns 200", Name: "health status returns 200",

View File

@@ -9,6 +9,8 @@ import (
) )
func TestLogsList(t *testing.T) { func TestLogsList(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "unauthorized", Name: "unauthorized",
@@ -78,6 +80,8 @@ func TestLogsList(t *testing.T) {
} }
func TestLogView(t *testing.T) { func TestLogView(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "unauthorized", Name: "unauthorized",
@@ -136,6 +140,8 @@ func TestLogView(t *testing.T) {
} }
func TestLogsStats(t *testing.T) { func TestLogsStats(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "unauthorized", Name: "unauthorized",

View File

@@ -10,6 +10,8 @@ import (
) )
func TestRequireGuestOnly(t *testing.T) { func TestRequireGuestOnly(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "valid record token", Name: "valid record token",
@@ -104,6 +106,8 @@ func TestRequireGuestOnly(t *testing.T) {
} }
func TestRequireRecordAuth(t *testing.T) { func TestRequireRecordAuth(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "guest", Name: "guest",
@@ -242,6 +246,8 @@ func TestRequireRecordAuth(t *testing.T) {
} }
func TestRequireSameContextRecordAuth(t *testing.T) { func TestRequireSameContextRecordAuth(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "guest", Name: "guest",
@@ -358,6 +364,8 @@ func TestRequireSameContextRecordAuth(t *testing.T) {
} }
func TestRequireAdminAuth(t *testing.T) { func TestRequireAdminAuth(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "guest", Name: "guest",
@@ -452,6 +460,8 @@ func TestRequireAdminAuth(t *testing.T) {
} }
func TestRequireAdminAuthOnlyIfAny(t *testing.T) { func TestRequireAdminAuthOnlyIfAny(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "guest (while having at least 1 existing admin)", Name: "guest (while having at least 1 existing admin)",
@@ -571,6 +581,8 @@ func TestRequireAdminAuthOnlyIfAny(t *testing.T) {
} }
func TestRequireAdminOrRecordAuth(t *testing.T) { func TestRequireAdminOrRecordAuth(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "guest", Name: "guest",
@@ -731,6 +743,8 @@ func TestRequireAdminOrRecordAuth(t *testing.T) {
} }
func TestRequireAdminOrOwnerAuth(t *testing.T) { func TestRequireAdminOrOwnerAuth(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "guest", Name: "guest",
@@ -869,6 +883,8 @@ func TestRequireAdminOrOwnerAuth(t *testing.T) {
} }
func TestLoadCollectionContext(t *testing.T) { func TestLoadCollectionContext(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "missing collection", Name: "missing collection",

View File

@@ -17,6 +17,8 @@ import (
) )
func TestRecordAuthMethodsList(t *testing.T) { func TestRecordAuthMethodsList(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "missing collection", Name: "missing collection",
@@ -71,6 +73,8 @@ func TestRecordAuthMethodsList(t *testing.T) {
} }
func TestRecordAuthWithPassword(t *testing.T) { func TestRecordAuthWithPassword(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "invalid body format", Name: "invalid body format",
@@ -356,6 +360,8 @@ func TestRecordAuthWithPassword(t *testing.T) {
} }
func TestRecordAuthRefresh(t *testing.T) { func TestRecordAuthRefresh(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "unauthorized", Name: "unauthorized",
@@ -483,6 +489,8 @@ func TestRecordAuthRefresh(t *testing.T) {
} }
func TestRecordAuthRequestPasswordReset(t *testing.T) { func TestRecordAuthRequestPasswordReset(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "not an auth collection", Name: "not an auth collection",
@@ -568,6 +576,8 @@ func TestRecordAuthRequestPasswordReset(t *testing.T) {
} }
func TestRecordAuthConfirmPasswordReset(t *testing.T) { func TestRecordAuthConfirmPasswordReset(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "empty data", Name: "empty data",
@@ -681,6 +691,8 @@ func TestRecordAuthConfirmPasswordReset(t *testing.T) {
} }
func TestRecordAuthRequestVerification(t *testing.T) { func TestRecordAuthRequestVerification(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "not an auth collection", Name: "not an auth collection",
@@ -774,6 +786,8 @@ func TestRecordAuthRequestVerification(t *testing.T) {
} }
func TestRecordAuthConfirmVerification(t *testing.T) { func TestRecordAuthConfirmVerification(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "empty data", Name: "empty data",
@@ -902,6 +916,8 @@ func TestRecordAuthConfirmVerification(t *testing.T) {
} }
func TestRecordAuthRequestEmailChange(t *testing.T) { func TestRecordAuthRequestEmailChange(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "unauthorized", Name: "unauthorized",
@@ -1004,6 +1020,8 @@ func TestRecordAuthRequestEmailChange(t *testing.T) {
} }
func TestRecordAuthConfirmEmailChange(t *testing.T) { func TestRecordAuthConfirmEmailChange(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "not an auth collection", Name: "not an auth collection",
@@ -1124,6 +1142,8 @@ func TestRecordAuthConfirmEmailChange(t *testing.T) {
} }
func TestRecordAuthListExternalsAuths(t *testing.T) { func TestRecordAuthListExternalsAuths(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "unauthorized", Name: "unauthorized",
@@ -1224,6 +1244,8 @@ func TestRecordAuthListExternalsAuths(t *testing.T) {
} }
func TestRecordAuthUnlinkExternalsAuth(t *testing.T) { func TestRecordAuthUnlinkExternalsAuth(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "unauthorized", Name: "unauthorized",
@@ -1353,6 +1375,8 @@ func TestRecordAuthUnlinkExternalsAuth(t *testing.T) {
} }
func TestRecordAuthOAuth2Redirect(t *testing.T) { func TestRecordAuthOAuth2Redirect(t *testing.T) {
t.Parallel()
c1 := subscriptions.NewDefaultClient() c1 := subscriptions.NewDefaultClient()
c2 := subscriptions.NewDefaultClient() c2 := subscriptions.NewDefaultClient()

View File

@@ -17,6 +17,8 @@ import (
) )
func TestRecordCrudList(t *testing.T) { func TestRecordCrudList(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "missing collection", Name: "missing collection",
@@ -493,6 +495,8 @@ func TestRecordCrudList(t *testing.T) {
} }
func TestRecordCrudView(t *testing.T) { func TestRecordCrudView(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "missing collection", Name: "missing collection",
@@ -772,6 +776,8 @@ func TestRecordCrudView(t *testing.T) {
} }
func TestRecordCrudDelete(t *testing.T) { func TestRecordCrudDelete(t *testing.T) {
t.Parallel()
ensureDeletedFiles := func(app *tests.TestApp, collectionId string, recordId string) { ensureDeletedFiles := func(app *tests.TestApp, collectionId string, recordId string) {
storageDir := filepath.Join(app.DataDir(), "storage", collectionId, recordId) storageDir := filepath.Join(app.DataDir(), "storage", collectionId, recordId)
@@ -1015,6 +1021,8 @@ func TestRecordCrudDelete(t *testing.T) {
} }
func TestRecordCrudCreate(t *testing.T) { func TestRecordCrudCreate(t *testing.T) {
t.Parallel()
formData, mp, err := tests.MockMultipartData(map[string]string{ formData, mp, err := tests.MockMultipartData(map[string]string{
"title": "title_test", "title": "title_test",
}, "files") }, "files")
@@ -1591,6 +1599,8 @@ func TestRecordCrudCreate(t *testing.T) {
} }
func TestRecordCrudUpdate(t *testing.T) { func TestRecordCrudUpdate(t *testing.T) {
t.Parallel()
formData, mp, err := tests.MockMultipartData(map[string]string{ formData, mp, err := tests.MockMultipartData(map[string]string{
"title": "title_test", "title": "title_test",
}, "files") }, "files")

View File

@@ -14,6 +14,8 @@ import (
) )
func TestRequestInfo(t *testing.T) { func TestRequestInfo(t *testing.T) {
t.Parallel()
e := echo.New() e := echo.New()
req := httptest.NewRequest(http.MethodPost, "/?test=123", strings.NewReader(`{"test":456}`)) req := httptest.NewRequest(http.MethodPost, "/?test=123", strings.NewReader(`{"test":456}`))
req.Header.Set(echo.HeaderContentType, echo.MIMEApplicationJSON) req.Header.Set(echo.HeaderContentType, echo.MIMEApplicationJSON)
@@ -67,6 +69,8 @@ func TestRequestInfo(t *testing.T) {
} }
func TestRecordAuthResponse(t *testing.T) { func TestRecordAuthResponse(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -189,6 +193,8 @@ func TestRecordAuthResponse(t *testing.T) {
} }
func TestEnrichRecords(t *testing.T) { func TestEnrichRecords(t *testing.T) {
t.Parallel()
e := echo.New() e := echo.New()
req := httptest.NewRequest(http.MethodGet, "/?expand=rel_many", nil) req := httptest.NewRequest(http.MethodGet, "/?expand=rel_many", nil)
req.Header.Set(echo.HeaderContentType, echo.MIMEApplicationJSON) req.Header.Set(echo.HeaderContentType, echo.MIMEApplicationJSON)

View File

@@ -18,6 +18,8 @@ import (
) )
func TestSettingsList(t *testing.T) { func TestSettingsList(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "unauthorized", Name: "unauthorized",
@@ -97,6 +99,8 @@ func TestSettingsList(t *testing.T) {
} }
func TestSettingsSet(t *testing.T) { func TestSettingsSet(t *testing.T) {
t.Parallel()
validData := `{"meta":{"appName":"update_test"}}` validData := `{"meta":{"appName":"update_test"}}`
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
@@ -278,6 +282,8 @@ func TestSettingsSet(t *testing.T) {
} }
func TestSettingsTestS3(t *testing.T) { func TestSettingsTestS3(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "unauthorized", Name: "unauthorized",
@@ -344,6 +350,8 @@ func TestSettingsTestS3(t *testing.T) {
} }
func TestSettingsTestEmail(t *testing.T) { func TestSettingsTestEmail(t *testing.T) {
t.Parallel()
scenarios := []tests.ApiScenario{ scenarios := []tests.ApiScenario{
{ {
Name: "unauthorized", Name: "unauthorized",
@@ -508,6 +516,8 @@ func TestSettingsTestEmail(t *testing.T) {
} }
func TestGenerateAppleClientSecret(t *testing.T) { func TestGenerateAppleClientSecret(t *testing.T) {
t.Parallel()
key, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) key, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)

View File

@@ -8,6 +8,8 @@ import (
) )
func TestAdminQuery(t *testing.T) { func TestAdminQuery(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -20,6 +22,8 @@ func TestAdminQuery(t *testing.T) {
} }
func TestFindAdminById(t *testing.T) { func TestFindAdminById(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -47,6 +51,8 @@ func TestFindAdminById(t *testing.T) {
} }
func TestFindAdminByEmail(t *testing.T) { func TestFindAdminByEmail(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -76,6 +82,8 @@ func TestFindAdminByEmail(t *testing.T) {
} }
func TestFindAdminByToken(t *testing.T) { func TestFindAdminByToken(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -131,6 +139,8 @@ func TestFindAdminByToken(t *testing.T) {
} }
func TestTotalAdmins(t *testing.T) { func TestTotalAdmins(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -155,6 +165,8 @@ func TestTotalAdmins(t *testing.T) {
} }
func TestIsAdminEmailUnique(t *testing.T) { func TestIsAdminEmailUnique(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -180,6 +192,8 @@ func TestIsAdminEmailUnique(t *testing.T) {
} }
func TestDeleteAdmin(t *testing.T) { func TestDeleteAdmin(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -225,6 +239,8 @@ func TestDeleteAdmin(t *testing.T) {
} }
func TestSaveAdmin(t *testing.T) { func TestSaveAdmin(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()

View File

@@ -6,6 +6,8 @@ import (
) )
func TestGetDefaultRetryInterval(t *testing.T) { func TestGetDefaultRetryInterval(t *testing.T) {
t.Parallel()
if i := getDefaultRetryInterval(-1); i.Milliseconds() != 1000 { if i := getDefaultRetryInterval(-1); i.Milliseconds() != 1000 {
t.Fatalf("Expected 1000ms, got %v", i) t.Fatalf("Expected 1000ms, got %v", i)
} }
@@ -20,6 +22,8 @@ func TestGetDefaultRetryInterval(t *testing.T) {
} }
func TestBaseLockRetry(t *testing.T) { func TestBaseLockRetry(t *testing.T) {
t.Parallel()
scenarios := []struct { scenarios := []struct {
err error err error
failUntilAttempt int failUntilAttempt int

View File

@@ -16,6 +16,8 @@ import (
) )
func TestCollectionQuery(t *testing.T) { func TestCollectionQuery(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -28,6 +30,8 @@ func TestCollectionQuery(t *testing.T) {
} }
func TestFindCollectionsByType(t *testing.T) { func TestFindCollectionsByType(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -63,6 +67,8 @@ func TestFindCollectionsByType(t *testing.T) {
} }
func TestFindCollectionByNameOrId(t *testing.T) { func TestFindCollectionByNameOrId(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -92,6 +98,8 @@ func TestFindCollectionByNameOrId(t *testing.T) {
} }
func TestIsCollectionNameUnique(t *testing.T) { func TestIsCollectionNameUnique(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -116,6 +124,8 @@ func TestIsCollectionNameUnique(t *testing.T) {
} }
func TestFindCollectionReferences(t *testing.T) { func TestFindCollectionReferences(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -164,6 +174,8 @@ func TestFindCollectionReferences(t *testing.T) {
} }
func TestDeleteCollection(t *testing.T) { func TestDeleteCollection(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -251,6 +263,8 @@ func TestDeleteCollection(t *testing.T) {
} }
func TestSaveCollectionCreate(t *testing.T) { func TestSaveCollectionCreate(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -297,6 +311,8 @@ func TestSaveCollectionCreate(t *testing.T) {
} }
func TestSaveCollectionUpdate(t *testing.T) { func TestSaveCollectionUpdate(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -336,6 +352,8 @@ func TestSaveCollectionUpdate(t *testing.T) {
// indirect update of a field used in view should cause view(s) update // indirect update of a field used in view should cause view(s) update
func TestSaveCollectionIndirectViewsUpdate(t *testing.T) { func TestSaveCollectionIndirectViewsUpdate(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -395,6 +413,8 @@ func TestSaveCollectionIndirectViewsUpdate(t *testing.T) {
} }
func TestSaveCollectionViewWrapping(t *testing.T) { func TestSaveCollectionViewWrapping(t *testing.T) {
t.Parallel()
viewName := "test_wrapping" viewName := "test_wrapping"
scenarios := []struct { scenarios := []struct {
@@ -504,6 +524,8 @@ func TestSaveCollectionViewWrapping(t *testing.T) {
} }
func TestImportCollections(t *testing.T) { func TestImportCollections(t *testing.T) {
t.Parallel()
totalCollections := 11 totalCollections := 11
scenarios := []struct { scenarios := []struct {

View File

@@ -9,6 +9,8 @@ import (
) )
func TestExternalAuthQuery(t *testing.T) { func TestExternalAuthQuery(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -21,6 +23,8 @@ func TestExternalAuthQuery(t *testing.T) {
} }
func TestFindAllExternalAuthsByRecord(t *testing.T) { func TestFindAllExternalAuthsByRecord(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -58,6 +62,8 @@ func TestFindAllExternalAuthsByRecord(t *testing.T) {
} }
func TestFindFirstExternalAuthByExpr(t *testing.T) { func TestFindFirstExternalAuthByExpr(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -89,6 +95,8 @@ func TestFindFirstExternalAuthByExpr(t *testing.T) {
} }
func TestFindExternalAuthByRecordAndProvider(t *testing.T) { func TestFindExternalAuthByRecordAndProvider(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -125,6 +133,8 @@ func TestFindExternalAuthByRecordAndProvider(t *testing.T) {
} }
func TestSaveExternalAuth(t *testing.T) { func TestSaveExternalAuth(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -161,6 +171,8 @@ func TestSaveExternalAuth(t *testing.T) {
} }
func TestDeleteExternalAuth(t *testing.T) { func TestDeleteExternalAuth(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()

View File

@@ -12,6 +12,8 @@ import (
) )
func TestLogQuery(t *testing.T) { func TestLogQuery(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -24,6 +26,8 @@ func TestLogQuery(t *testing.T) {
} }
func TestFindLogById(t *testing.T) { func TestFindLogById(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -54,6 +58,8 @@ func TestFindLogById(t *testing.T) {
} }
func TestLogsStats(t *testing.T) { func TestLogsStats(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -75,6 +81,8 @@ func TestLogsStats(t *testing.T) {
} }
func TestDeleteOldLogs(t *testing.T) { func TestDeleteOldLogs(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -115,6 +123,8 @@ func TestDeleteOldLogs(t *testing.T) {
} }
func TestSaveLog(t *testing.T) { func TestSaveLog(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()

View File

@@ -11,6 +11,8 @@ import (
) )
func TestParamQuery(t *testing.T) { func TestParamQuery(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -23,6 +25,8 @@ func TestParamQuery(t *testing.T) {
} }
func TestFindParamByKey(t *testing.T) { func TestFindParamByKey(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -50,6 +54,8 @@ func TestFindParamByKey(t *testing.T) {
} }
func TestSaveParam(t *testing.T) { func TestSaveParam(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -92,6 +98,8 @@ func TestSaveParam(t *testing.T) {
} }
func TestSaveParamEncrypted(t *testing.T) { func TestSaveParamEncrypted(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -126,6 +134,8 @@ func TestSaveParamEncrypted(t *testing.T) {
} }
func TestDeleteParam(t *testing.T) { func TestDeleteParam(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()

View File

@@ -14,6 +14,8 @@ import (
) )
func TestExpandRecords(t *testing.T) { func TestExpandRecords(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -222,6 +224,8 @@ func TestExpandRecords(t *testing.T) {
} }
func TestExpandRecord(t *testing.T) { func TestExpandRecord(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -372,6 +376,8 @@ func TestExpandRecord(t *testing.T) {
} }
func TestIndirectExpandSingeVsArrayResult(t *testing.T) { func TestIndirectExpandSingeVsArrayResult(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()

View File

@@ -14,6 +14,8 @@ import (
) )
func TestSyncRecordTableSchema(t *testing.T) { func TestSyncRecordTableSchema(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -132,6 +134,8 @@ func TestSyncRecordTableSchema(t *testing.T) {
} }
func TestSingleVsMultipleValuesNormalization(t *testing.T) { func TestSingleVsMultipleValuesNormalization(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()

View File

@@ -19,6 +19,8 @@ import (
) )
func TestRecordQueryWithDifferentCollectionValues(t *testing.T) { func TestRecordQueryWithDifferentCollectionValues(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -58,6 +60,8 @@ func TestRecordQueryWithDifferentCollectionValues(t *testing.T) {
} }
func TestRecordQueryOneWithRecord(t *testing.T) { func TestRecordQueryOneWithRecord(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -82,6 +86,8 @@ func TestRecordQueryOneWithRecord(t *testing.T) {
} }
func TestRecordQueryAllWithRecordsSlices(t *testing.T) { func TestRecordQueryAllWithRecordsSlices(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -143,6 +149,8 @@ func TestRecordQueryAllWithRecordsSlices(t *testing.T) {
} }
func TestFindRecordById(t *testing.T) { func TestFindRecordById(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -203,6 +211,8 @@ func TestFindRecordById(t *testing.T) {
} }
func TestFindRecordsByIds(t *testing.T) { func TestFindRecordsByIds(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -294,6 +304,8 @@ func TestFindRecordsByIds(t *testing.T) {
} }
func TestFindRecordsByExpr(t *testing.T) { func TestFindRecordsByExpr(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -364,6 +376,8 @@ func TestFindRecordsByExpr(t *testing.T) {
} }
func TestFindFirstRecordByData(t *testing.T) { func TestFindFirstRecordByData(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -427,6 +441,8 @@ func TestFindFirstRecordByData(t *testing.T) {
} }
func TestFindRecordsByFilter(t *testing.T) { func TestFindRecordsByFilter(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -566,6 +582,8 @@ func TestFindRecordsByFilter(t *testing.T) {
} }
func TestFindFirstRecordByFilter(t *testing.T) { func TestFindFirstRecordByFilter(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -647,6 +665,8 @@ func TestFindFirstRecordByFilter(t *testing.T) {
} }
func TestCanAccessRecord(t *testing.T) { func TestCanAccessRecord(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -814,6 +834,8 @@ func TestCanAccessRecord(t *testing.T) {
} }
func TestIsRecordValueUnique(t *testing.T) { func TestIsRecordValueUnique(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -863,6 +885,8 @@ func TestIsRecordValueUnique(t *testing.T) {
} }
func TestFindAuthRecordByToken(t *testing.T) { func TestFindAuthRecordByToken(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -925,6 +949,8 @@ func TestFindAuthRecordByToken(t *testing.T) {
} }
func TestFindAuthRecordByEmail(t *testing.T) { func TestFindAuthRecordByEmail(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -956,6 +982,8 @@ func TestFindAuthRecordByEmail(t *testing.T) {
} }
func TestFindAuthRecordByUsername(t *testing.T) { func TestFindAuthRecordByUsername(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -988,6 +1016,8 @@ func TestFindAuthRecordByUsername(t *testing.T) {
} }
func TestSuggestUniqueAuthRecordUsername(t *testing.T) { func TestSuggestUniqueAuthRecordUsername(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -1025,6 +1055,8 @@ func TestSuggestUniqueAuthRecordUsername(t *testing.T) {
} }
func TestSaveRecord(t *testing.T) { func TestSaveRecord(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -1058,6 +1090,8 @@ func TestSaveRecord(t *testing.T) {
} }
func TestSaveRecordWithIdFromOtherCollection(t *testing.T) { func TestSaveRecordWithIdFromOtherCollection(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -1090,6 +1124,8 @@ func TestSaveRecordWithIdFromOtherCollection(t *testing.T) {
} }
func TestDeleteRecord(t *testing.T) { func TestDeleteRecord(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -1167,6 +1203,8 @@ func TestDeleteRecord(t *testing.T) {
} }
func TestDeleteRecordBatchProcessing(t *testing.T) { func TestDeleteRecordBatchProcessing(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()

View File

@@ -8,6 +8,8 @@ import (
) )
func TestSaveAndFindSettings(t *testing.T) { func TestSaveAndFindSettings(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()

View File

@@ -12,6 +12,8 @@ import (
) )
func TestHasTable(t *testing.T) { func TestHasTable(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -36,6 +38,8 @@ func TestHasTable(t *testing.T) {
} }
func TestTableColumns(t *testing.T) { func TestTableColumns(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -64,6 +68,8 @@ func TestTableColumns(t *testing.T) {
} }
func TestTableInfo(t *testing.T) { func TestTableInfo(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -92,6 +98,8 @@ func TestTableInfo(t *testing.T) {
} }
func TestDeleteTable(t *testing.T) { func TestDeleteTable(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -116,6 +124,8 @@ func TestDeleteTable(t *testing.T) {
} }
func TestVacuum(t *testing.T) { func TestVacuum(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -141,6 +151,8 @@ func TestVacuum(t *testing.T) {
} }
func TestTableIndexes(t *testing.T) { func TestTableIndexes(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()

View File

@@ -33,6 +33,8 @@ func ensureNoTempViews(app core.App, t *testing.T) {
} }
func TestDeleteView(t *testing.T) { func TestDeleteView(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -60,6 +62,8 @@ func TestDeleteView(t *testing.T) {
} }
func TestSaveView(t *testing.T) { func TestSaveView(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -180,6 +184,8 @@ func TestSaveView(t *testing.T) {
} }
func TestCreateViewSchemaWithDiscardedNestedTransaction(t *testing.T) { func TestCreateViewSchemaWithDiscardedNestedTransaction(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -196,6 +202,8 @@ func TestCreateViewSchemaWithDiscardedNestedTransaction(t *testing.T) {
} }
func TestCreateViewSchema(t *testing.T) { func TestCreateViewSchema(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -486,6 +494,8 @@ func TestCreateViewSchema(t *testing.T) {
} }
func TestFindRecordByViewFile(t *testing.T) { func TestFindRecordByViewFile(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()

View File

@@ -10,6 +10,8 @@ import (
) )
func TestAdminLoginValidateAndSubmit(t *testing.T) { func TestAdminLoginValidateAndSubmit(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -51,6 +53,8 @@ func TestAdminLoginValidateAndSubmit(t *testing.T) {
} }
func TestAdminLoginInterceptors(t *testing.T) { func TestAdminLoginInterceptors(t *testing.T) {
t.Parallel()
testApp, _ := tests.NewTestApp() testApp, _ := tests.NewTestApp()
defer testApp.Cleanup() defer testApp.Cleanup()

View File

@@ -11,6 +11,8 @@ import (
) )
func TestAdminPasswordResetConfirmValidateAndSubmit(t *testing.T) { func TestAdminPasswordResetConfirmValidateAndSubmit(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -99,6 +101,8 @@ func TestAdminPasswordResetConfirmValidateAndSubmit(t *testing.T) {
} }
func TestAdminPasswordResetConfirmInterceptors(t *testing.T) { func TestAdminPasswordResetConfirmInterceptors(t *testing.T) {
t.Parallel()
testApp, _ := tests.NewTestApp() testApp, _ := tests.NewTestApp()
defer testApp.Cleanup() defer testApp.Cleanup()

View File

@@ -10,6 +10,8 @@ import (
) )
func TestAdminPasswordResetRequestValidateAndSubmit(t *testing.T) { func TestAdminPasswordResetRequestValidateAndSubmit(t *testing.T) {
t.Parallel()
testApp, _ := tests.NewTestApp() testApp, _ := tests.NewTestApp()
defer testApp.Cleanup() defer testApp.Cleanup()
@@ -74,6 +76,8 @@ func TestAdminPasswordResetRequestValidateAndSubmit(t *testing.T) {
} }
func TestAdminPasswordResetRequestInterceptors(t *testing.T) { func TestAdminPasswordResetRequestInterceptors(t *testing.T) {
t.Parallel()
testApp, _ := tests.NewTestApp() testApp, _ := tests.NewTestApp()
defer testApp.Cleanup() defer testApp.Cleanup()

View File

@@ -12,6 +12,8 @@ import (
) )
func TestNewAdminUpsert(t *testing.T) { func TestNewAdminUpsert(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -31,6 +33,8 @@ func TestNewAdminUpsert(t *testing.T) {
} }
func TestAdminUpsertValidateAndSubmit(t *testing.T) { func TestAdminUpsertValidateAndSubmit(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -183,6 +187,8 @@ func TestAdminUpsertValidateAndSubmit(t *testing.T) {
} }
func TestAdminUpsertSubmitInterceptors(t *testing.T) { func TestAdminUpsertSubmitInterceptors(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -231,6 +237,8 @@ func TestAdminUpsertSubmitInterceptors(t *testing.T) {
} }
func TestAdminUpsertWithCustomId(t *testing.T) { func TestAdminUpsertWithCustomId(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()

View File

@@ -15,6 +15,8 @@ import (
) )
func TestAppleClientSecretCreateValidateAndSubmit(t *testing.T) { func TestAppleClientSecretCreateValidateAndSubmit(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()

View File

@@ -10,6 +10,8 @@ import (
) )
func TestBackupCreateValidateAndSubmit(t *testing.T) { func TestBackupCreateValidateAndSubmit(t *testing.T) {
t.Parallel()
scenarios := []struct { scenarios := []struct {
name string name string
backupName string backupName string

View File

@@ -12,6 +12,8 @@ import (
) )
func TestBackupUploadValidateAndSubmit(t *testing.T) { func TestBackupUploadValidateAndSubmit(t *testing.T) {
t.Parallel()
var zb bytes.Buffer var zb bytes.Buffer
zw := zip.NewWriter(&zb) zw := zip.NewWriter(&zb)
if err := zw.Close(); err != nil { if err := zw.Close(); err != nil {

View File

@@ -16,6 +16,8 @@ import (
) )
func TestNewCollectionUpsert(t *testing.T) { func TestNewCollectionUpsert(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -88,6 +90,8 @@ func TestNewCollectionUpsert(t *testing.T) {
} }
func TestCollectionUpsertValidateAndSubmit(t *testing.T) { func TestCollectionUpsertValidateAndSubmit(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -654,6 +658,8 @@ func TestCollectionUpsertValidateAndSubmit(t *testing.T) {
} }
func TestCollectionUpsertSubmitInterceptors(t *testing.T) { func TestCollectionUpsertSubmitInterceptors(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -704,6 +710,8 @@ func TestCollectionUpsertSubmitInterceptors(t *testing.T) {
} }
func TestCollectionUpsertWithCustomId(t *testing.T) { func TestCollectionUpsertWithCustomId(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()

View File

@@ -11,6 +11,8 @@ import (
) )
func TestCollectionsImportValidate(t *testing.T) { func TestCollectionsImportValidate(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -38,6 +40,8 @@ func TestCollectionsImportValidate(t *testing.T) {
} }
func TestCollectionsImportSubmit(t *testing.T) { func TestCollectionsImportSubmit(t *testing.T) {
t.Parallel()
totalCollections := 11 totalCollections := 11
scenarios := []struct { scenarios := []struct {
@@ -461,6 +465,8 @@ func TestCollectionsImportSubmit(t *testing.T) {
} }
func TestCollectionsImportSubmitInterceptors(t *testing.T) { func TestCollectionsImportSubmitInterceptors(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()

View File

@@ -8,6 +8,8 @@ import (
) )
func TestRealtimeSubscribeValidate(t *testing.T) { func TestRealtimeSubscribeValidate(t *testing.T) {
t.Parallel()
scenarios := []struct { scenarios := []struct {
clientId string clientId string
expectError bool expectError bool

View File

@@ -13,6 +13,8 @@ import (
) )
func TestRecordEmailChangeConfirmValidateAndSubmit(t *testing.T) { func TestRecordEmailChangeConfirmValidateAndSubmit(t *testing.T) {
t.Parallel()
testApp, _ := tests.NewTestApp() testApp, _ := tests.NewTestApp()
defer testApp.Cleanup() defer testApp.Cleanup()
@@ -145,6 +147,8 @@ func TestRecordEmailChangeConfirmValidateAndSubmit(t *testing.T) {
} }
func TestRecordEmailChangeConfirmInterceptors(t *testing.T) { func TestRecordEmailChangeConfirmInterceptors(t *testing.T) {
t.Parallel()
testApp, _ := tests.NewTestApp() testApp, _ := tests.NewTestApp()
defer testApp.Cleanup() defer testApp.Cleanup()

View File

@@ -12,6 +12,8 @@ import (
) )
func TestRecordEmailChangeRequestValidateAndSubmit(t *testing.T) { func TestRecordEmailChangeRequestValidateAndSubmit(t *testing.T) {
t.Parallel()
testApp, _ := tests.NewTestApp() testApp, _ := tests.NewTestApp()
defer testApp.Cleanup() defer testApp.Cleanup()
@@ -106,6 +108,8 @@ func TestRecordEmailChangeRequestValidateAndSubmit(t *testing.T) {
} }
func TestRecordEmailChangeRequestInterceptors(t *testing.T) { func TestRecordEmailChangeRequestInterceptors(t *testing.T) {
t.Parallel()
testApp, _ := tests.NewTestApp() testApp, _ := tests.NewTestApp()
defer testApp.Cleanup() defer testApp.Cleanup()

View File

@@ -10,6 +10,8 @@ import (
) )
func TestUserOauth2LoginValidate(t *testing.T) { func TestUserOauth2LoginValidate(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()

View File

@@ -10,6 +10,8 @@ import (
) )
func TestRecordPasswordLoginValidateAndSubmit(t *testing.T) { func TestRecordPasswordLoginValidateAndSubmit(t *testing.T) {
t.Parallel()
testApp, _ := tests.NewTestApp() testApp, _ := tests.NewTestApp()
defer testApp.Cleanup() defer testApp.Cleanup()
@@ -132,6 +134,8 @@ func TestRecordPasswordLoginValidateAndSubmit(t *testing.T) {
} }
func TestRecordPasswordLoginInterceptors(t *testing.T) { func TestRecordPasswordLoginInterceptors(t *testing.T) {
t.Parallel()
testApp, _ := tests.NewTestApp() testApp, _ := tests.NewTestApp()
defer testApp.Cleanup() defer testApp.Cleanup()

View File

@@ -13,6 +13,8 @@ import (
) )
func TestRecordPasswordResetConfirmValidateAndSubmit(t *testing.T) { func TestRecordPasswordResetConfirmValidateAndSubmit(t *testing.T) {
t.Parallel()
testApp, _ := tests.NewTestApp() testApp, _ := tests.NewTestApp()
defer testApp.Cleanup() defer testApp.Cleanup()
@@ -136,6 +138,8 @@ func TestRecordPasswordResetConfirmValidateAndSubmit(t *testing.T) {
} }
func TestRecordPasswordResetConfirmInterceptors(t *testing.T) { func TestRecordPasswordResetConfirmInterceptors(t *testing.T) {
t.Parallel()
testApp, _ := tests.NewTestApp() testApp, _ := tests.NewTestApp()
defer testApp.Cleanup() defer testApp.Cleanup()

View File

@@ -13,6 +13,8 @@ import (
) )
func TestRecordPasswordResetRequestSubmit(t *testing.T) { func TestRecordPasswordResetRequestSubmit(t *testing.T) {
t.Parallel()
testApp, _ := tests.NewTestApp() testApp, _ := tests.NewTestApp()
defer testApp.Cleanup() defer testApp.Cleanup()
@@ -116,6 +118,8 @@ func TestRecordPasswordResetRequestSubmit(t *testing.T) {
} }
func TestRecordPasswordResetRequestInterceptors(t *testing.T) { func TestRecordPasswordResetRequestInterceptors(t *testing.T) {
t.Parallel()
testApp, _ := tests.NewTestApp() testApp, _ := tests.NewTestApp()
defer testApp.Cleanup() defer testApp.Cleanup()

View File

@@ -12,6 +12,8 @@ import (
) )
func TestRecordVerificationConfirmValidateAndSubmit(t *testing.T) { func TestRecordVerificationConfirmValidateAndSubmit(t *testing.T) {
t.Parallel()
testApp, _ := tests.NewTestApp() testApp, _ := tests.NewTestApp()
defer testApp.Cleanup() defer testApp.Cleanup()
@@ -98,6 +100,8 @@ func TestRecordVerificationConfirmValidateAndSubmit(t *testing.T) {
} }
func TestRecordVerificationConfirmInterceptors(t *testing.T) { func TestRecordVerificationConfirmInterceptors(t *testing.T) {
t.Parallel()
testApp, _ := tests.NewTestApp() testApp, _ := tests.NewTestApp()
defer testApp.Cleanup() defer testApp.Cleanup()

View File

@@ -13,6 +13,8 @@ import (
) )
func TestRecordVerificationRequestSubmit(t *testing.T) { func TestRecordVerificationRequestSubmit(t *testing.T) {
t.Parallel()
testApp, _ := tests.NewTestApp() testApp, _ := tests.NewTestApp()
defer testApp.Cleanup() defer testApp.Cleanup()
@@ -134,6 +136,8 @@ func TestRecordVerificationRequestSubmit(t *testing.T) {
} }
func TestRecordVerificationRequestInterceptors(t *testing.T) { func TestRecordVerificationRequestInterceptors(t *testing.T) {
t.Parallel()
testApp, _ := tests.NewTestApp() testApp, _ := tests.NewTestApp()
defer testApp.Cleanup() defer testApp.Cleanup()

View File

@@ -14,6 +14,8 @@ import (
) )
func TestNewSettingsUpsert(t *testing.T) { func TestNewSettingsUpsert(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -30,6 +32,8 @@ func TestNewSettingsUpsert(t *testing.T) {
} }
func TestSettingsUpsertValidateAndSubmit(t *testing.T) { func TestSettingsUpsertValidateAndSubmit(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -127,6 +131,8 @@ func TestSettingsUpsertValidateAndSubmit(t *testing.T) {
} }
func TestSettingsUpsertSubmitInterceptors(t *testing.T) { func TestSettingsUpsertSubmitInterceptors(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()

View File

@@ -10,6 +10,8 @@ import (
) )
func TestEmailSendValidateAndSubmit(t *testing.T) { func TestEmailSendValidateAndSubmit(t *testing.T) {
t.Parallel()
scenarios := []struct { scenarios := []struct {
template string template string
email string email string

View File

@@ -9,6 +9,8 @@ import (
) )
func TestS3FilesystemValidate(t *testing.T) { func TestS3FilesystemValidate(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()
@@ -66,6 +68,8 @@ func TestS3FilesystemValidate(t *testing.T) {
} }
func TestS3FilesystemSubmitFailure(t *testing.T) { func TestS3FilesystemSubmitFailure(t *testing.T) {
t.Parallel()
app, _ := tests.NewTestApp() app, _ := tests.NewTestApp()
defer app.Cleanup() defer app.Cleanup()