Skip to content

Commit

Permalink
Disable specific sqlite tests when using postgres.
Browse files Browse the repository at this point in the history
  • Loading branch information
gfyrag committed Mar 15, 2022
1 parent 2e7a5ae commit 17752af
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkg/storage/sqlstorage/driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@ package sqlstorage

import (
"context"
"github.com/numary/ledger/pkg/ledgertesting"
"github.com/stretchr/testify/assert"
"testing"
)

func TestNewOpenCloseDBDriver(t *testing.T) {

if ledgertesting.StorageDriverName() != "sqlite" {
return
}

d := NewOpenCloseDBDriver("sqlite", SQLite, func(name string) string {
return SQLiteMemoryConnString
})
Expand All @@ -28,6 +34,11 @@ func TestNewOpenCloseDBDriver(t *testing.T) {
}

func TestNewCachedDBDriver(t *testing.T) {

if ledgertesting.StorageDriverName() != "sqlite" {
return
}

d := NewCachedDBDriver("sqlite", SQLite, SQLiteMemoryConnString)
err := d.Initialize(context.Background())
assert.NoError(t, err)
Expand Down

0 comments on commit 17752af

Please sign in to comment.