1
0
mirror of https://github.com/xorcare/testing-go-code-with-postgres.git synced 2025-06-30 23:23:40 +02:00

Mark tests as integration

It is necessary so that these tests will not run when using the
`make test-short` command.
This commit is contained in:
Vasiliy Vasilyuk
2023-07-05 07:51:30 +03:00
parent b346272f7f
commit fd50c57aff

View File

@ -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)