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:25:32 +01:00
parent 134f4f8ec8
commit 95159e5265
Signed by: Kichiyaki
GPG Key ID: B5445E357FB8B892
2 changed files with 40 additions and 0 deletions

View File

@ -15,6 +15,10 @@ import (
func TestGroup_Create(t *testing.T) {
t.Parallel()
if testing.Short() {
t.Skip("skipping long-running test")
}
repo := bundb.NewGroup(newDB(t))
t.Run("OK", func(t *testing.T) {
@ -49,6 +53,10 @@ func TestGroup_Create(t *testing.T) {
func TestGroup_Update(t *testing.T) {
t.Parallel()
if testing.Short() {
t.Skip("skipping long-running test")
}
db := newDB(t)
fixture := loadFixtures(t, db)
repo := bundb.NewGroup(db)
@ -139,6 +147,10 @@ func TestGroup_Update(t *testing.T) {
func TestGroup_List(t *testing.T) {
t.Parallel()
if testing.Short() {
t.Skip("skipping long-running test")
}
db := newDB(t)
fixture := loadFixtures(t, db)
repo := bundb.NewGroup(db)
@ -275,6 +287,10 @@ func TestGroup_List(t *testing.T) {
func TestGroup_Get(t *testing.T) {
t.Parallel()
if testing.Short() {
t.Skip("skipping long-running test")
}
db := newDB(t)
fixture := loadFixtures(t, db)
repo := bundb.NewGroup(db)
@ -330,6 +346,10 @@ func TestGroup_Get(t *testing.T) {
func TestGroup_Delete(t *testing.T) {
t.Parallel()
if testing.Short() {
t.Skip("skipping long-running test")
}
db := newDB(t)
fixture := loadFixtures(t, db)
groupRepo := bundb.NewGroup(db)
@ -402,6 +422,10 @@ func TestGroup_Delete(t *testing.T) {
func TestGroup_DeleteMany(t *testing.T) {
t.Parallel()
if testing.Short() {
t.Skip("skipping long-running test")
}
db := newDB(t)
fixture := loadFixtures(t, db)
groupRepo := bundb.NewGroup(db)

View File

@ -15,6 +15,10 @@ import (
func TestMonitor_Create(t *testing.T) {
t.Parallel()
if testing.Short() {
t.Skip("skipping long-running test")
}
db := newDB(t)
fixture := loadFixtures(t, db)
repo := bundb.NewMonitor(db)
@ -80,6 +84,10 @@ func TestMonitor_Create(t *testing.T) {
func TestMonitor_List(t *testing.T) {
t.Parallel()
if testing.Short() {
t.Skip("skipping long-running test")
}
db := newDB(t)
fixture := loadFixtures(t, db)
repo := bundb.NewMonitor(db)
@ -142,6 +150,10 @@ func TestMonitor_List(t *testing.T) {
func TestMonitor_Get(t *testing.T) {
t.Parallel()
if testing.Short() {
t.Skip("skipping long-running test")
}
db := newDB(t)
fixture := loadFixtures(t, db)
repo := bundb.NewMonitor(db)
@ -193,6 +205,10 @@ func TestMonitor_Get(t *testing.T) {
func TestMonitor_Delete(t *testing.T) {
t.Parallel()
if testing.Short() {
t.Skip("skipping long-running test")
}
db := newDB(t)
fixture := loadFixtures(t, db)
repo := bundb.NewMonitor(db)