Skip to content

Commit

Permalink
Uncomment flag checker
Browse files Browse the repository at this point in the history
Signed-off-by: neilnaveen <42328488+neilnaveen@users.noreply.github.com>
  • Loading branch information
neilnaveen committed Nov 19, 2024
1 parent 00ccf23 commit 45c8dcc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import (
)

func Test_E2E(t *testing.T) {
// if _, ok := os.LookupEnv("e2e"); !ok {
// t.Skip("E2E tests are not enabled")
// }
if _, ok := os.LookupEnv("e2e"); !ok {
t.Skip("E2E tests are not enabled")
}

// Setup storage backends
storageBackends := []struct {
Expand Down
8 changes: 4 additions & 4 deletions pkg/storages/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const (
CacheStackKey = "to_be_cached"
)

// SetupRedisTestDB initializes a new SQLStorage with the given DSN.
// SetupSQLTestDB initializes a new SQLStorage with the given DSN.
func SetupSQLTestDB(dsn string) (*SQLStorage, error) {
storage, err := NewSQLStorage(dsn, false)
if err != nil {
Expand All @@ -29,16 +29,16 @@ func SetupRedisTestDB(ctx context.Context, addr string) (*RedisStorage, error) {
rdb := redis.NewClient(&redis.Options{
Addr: addr,
})

// Verify connection
if err := rdb.Ping(ctx).Err(); err != nil {
return nil, fmt.Errorf("failed to connect to Redis: %w", err)
}

Check warning on line 36 in pkg/storages/storage.go

View check run for this annotation

Codecov / codecov/patch

pkg/storages/storage.go#L35-L36

Added lines #L35 - L36 were not covered by tests

// Clear the database before each test
if err := rdb.FlushDB(ctx).Err(); err != nil {
return nil, fmt.Errorf("failed to flush Redis database: %w", err)
}

Check warning on line 41 in pkg/storages/storage.go

View check run for this annotation

Codecov / codecov/patch

pkg/storages/storage.go#L40-L41

Added lines #L40 - L41 were not covered by tests

return &RedisStorage{Client: rdb}, nil
}

0 comments on commit 45c8dcc

Please sign in to comment.