You've already forked testing-go-code-with-postgres
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:
@ -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)
|
||||
|
Reference in New Issue
Block a user