You've already forked testing-go-code-with-postgres
mirror of
https://github.com/xorcare/testing-go-code-with-postgres.git
synced 2025-07-03 23:30:31 +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) {
|
func TestUserRepository_CreateUser(t *testing.T) {
|
||||||
|
if testing.Short() {
|
||||||
|
t.Skip("skipping test in short mode")
|
||||||
|
}
|
||||||
|
|
||||||
newFullyFiledUser := func() User {
|
newFullyFiledUser := func() User {
|
||||||
return User{
|
return User{
|
||||||
ID: uuid.New(),
|
ID: uuid.New(),
|
||||||
@ -63,6 +67,10 @@ func TestUserRepository_CreateUser(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestUserRepository_ReadUser(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) {
|
t.Run("Get an error if the user does not exist", func(t *testing.T) {
|
||||||
// Arrange
|
// Arrange
|
||||||
postgres := testingpg.New(t)
|
postgres := testingpg.New(t)
|
||||||
|
Reference in New Issue
Block a user