From fd50c57aff4b014e6776cfde69221f3aac3151f5 Mon Sep 17 00:00:00 2001 From: Vasiliy Vasilyuk Date: Wed, 5 Jul 2023 07:51:30 +0300 Subject: [PATCH] Mark tests as integration It is necessary so that these tests will not run when using the `make test-short` command. --- user_repository_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/user_repository_test.go b/user_repository_test.go index 9f83b7b..47eb755 100644 --- a/user_repository_test.go +++ b/user_repository_test.go @@ -16,6 +16,10 @@ import ( ) func TestUserRepository_CreateUser(t *testing.T) { + if testing.Short() { + t.Skip("skipping test in short mode") + } + newFullyFiledUser := func() User { return User{ ID: uuid.New(), @@ -63,6 +67,10 @@ func TestUserRepository_CreateUser(t *testing.T) { } func TestUserRepository_ReadUser(t *testing.T) { + if testing.Short() { + t.Skip("skipping test in short mode") + } + t.Run("Get an error if the user does not exist", func(t *testing.T) { // Arrange postgres := testingpg.New(t)