Skip to content

Commit

Permalink
test: fix test execution
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasoares committed Jun 26, 2023
1 parent e2c35c5 commit 3acaad3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/messagepool/cache/redis_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"os"
"testing"

"github.com/spf13/viper"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/takenet/deckard/internal/config"
Expand Down Expand Up @@ -32,6 +33,8 @@ func TestNewCacheWithoutServerShouldErrorIntegration(t *testing.T) {
t.Skip()
}

defer viper.Reset()
config.CacheConnectionRetryEnabled.Set(false)
config.RedisPort.Set(12345)

_, err := NewRedisCache(ctx)
Expand Down
3 changes: 3 additions & 0 deletions internal/messagepool/storage/mongo_storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"os"
"testing"

"github.com/spf13/viper"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/takenet/deckard/internal/config"
Expand Down Expand Up @@ -67,6 +68,8 @@ func TestNewStorageWithoutServerShouldErrorIntegration(t *testing.T) {
t.Skip()
}

defer viper.Reset()
config.StorageConnectionRetryEnabled.Set(false)
config.MongoAddresses.Set("localhost:41343")
config.MongoDatabase.Set("unit_test")

Expand Down

0 comments on commit 3acaad3

Please sign in to comment.