refactor: categorize tests - short/long running
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Dawid Wysokiński 2023-02-11 09:21:44 +01:00
parent d4d2b0a709
commit 8ae4ff3307
Signed by: Kichiyaki
GPG Key ID: B5445E357FB8B892
4 changed files with 28 additions and 0 deletions

View File

@ -17,6 +17,10 @@ import (
func TestAPIKey_Create(t *testing.T) {
t.Parallel()
if testing.Short() {
t.Skip("skipping long-running test")
}
db := newDB(t)
fixture := loadFixtures(t, db)
repo := bundb.NewAPIKey(db)
@ -71,6 +75,10 @@ func TestAPIKey_Create(t *testing.T) {
func TestAPIKey_Get(t *testing.T) {
t.Parallel()
if testing.Short() {
t.Skip("skipping long-running test")
}
db := newDB(t)
fixture := loadFixtures(t, db)
repo := bundb.NewAPIKey(db)

View File

@ -17,5 +17,9 @@ func TestChecker_Name(t *testing.T) {
func TestChecker_Check(t *testing.T) {
t.Parallel()
if testing.Short() {
t.Skip("skipping long-running test")
}
assert.NoError(t, bundb.NewChecker(newDB(t)).Check(context.Background()))
}

View File

@ -17,6 +17,10 @@ import (
func TestSession_CreateOrUpdate(t *testing.T) {
t.Parallel()
if testing.Short() {
t.Skip("skipping long-running test")
}
db := newDB(t)
fixture := loadFixtures(t, db)
repo := bundb.NewSession(db)
@ -78,6 +82,10 @@ func TestSession_CreateOrUpdate(t *testing.T) {
func TestSession_Get(t *testing.T) {
t.Parallel()
if testing.Short() {
t.Skip("skipping long-running test")
}
db := newDB(t)
fixture := loadFixtures(t, db)
repo := bundb.NewSession(db)

View File

@ -15,6 +15,10 @@ import (
func TestUser_Create(t *testing.T) {
t.Parallel()
if testing.Short() {
t.Skip("skipping long-running test")
}
db := newDB(t)
fixture := loadFixtures(t, db)
repo := bundb.NewUser(db)
@ -64,6 +68,10 @@ func TestUser_Create(t *testing.T) {
func TestUser_Get(t *testing.T) {
t.Parallel()
if testing.Short() {
t.Skip("skipping long-running test")
}
db := newDB(t)
fixture := loadFixtures(t, db)
repo := bundb.NewUser(db)