From b2dd425f8b380a7395bf40785a48f9dec20946c8 Mon Sep 17 00:00:00 2001 From: Bart Venter Date: Fri, 14 Jun 2024 13:38:38 +0000 Subject: [PATCH] test(all): Update import paths due to renaming of `drivertest` --- memcache/memcache_test.go | 10 +++++----- redis/redis_test.go | 10 +++++----- rediscluster/rediscluster_test.go | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/memcache/memcache_test.go b/memcache/memcache_test.go index ea49abe..70ca120 100644 --- a/memcache/memcache_test.go +++ b/memcache/memcache_test.go @@ -8,7 +8,7 @@ import ( "time" cache "github.com/bartventer/gocache" - "github.com/bartventer/gocache/internal/cachetest" + "github.com/bartventer/gocache/drivertest" "github.com/bradfitz/gomemcache/memcache" "github.com/docker/docker/api/types/container" "github.com/stretchr/testify/assert" @@ -134,14 +134,14 @@ func (h *harness) Close() { // Cleanup is handled in setup function } -func (h *harness) Options() cachetest.Options { - return cachetest.Options{ +func (h *harness) Options() drivertest.Options { + return drivertest.Options{ PatternMatchingDisabled: true, // Memcached does not support pattern matching CloseIsNoop: true, // Cache can still be used after closing } } -func newHarness(ctx context.Context, t *testing.T) (cachetest.Harness, error) { +func newHarness(ctx context.Context, t *testing.T) (drivertest.Harness, error) { cache := setupCache(t) return &harness{ cache: cache, @@ -149,5 +149,5 @@ func newHarness(ctx context.Context, t *testing.T) (cachetest.Harness, error) { } func TestConformance(t *testing.T) { - cachetest.RunConformanceTests(t, newHarness) + drivertest.RunConformanceTests(t, newHarness) } diff --git a/redis/redis_test.go b/redis/redis_test.go index ce5f223..b36be5c 100644 --- a/redis/redis_test.go +++ b/redis/redis_test.go @@ -7,7 +7,7 @@ import ( "time" cache "github.com/bartventer/gocache" - "github.com/bartventer/gocache/internal/cachetest" + "github.com/bartventer/gocache/drivertest" "github.com/docker/docker/api/types/container" "github.com/redis/go-redis/v9" "github.com/stretchr/testify/assert" @@ -112,14 +112,14 @@ func (h *harness) Close() { // Cleanup is handled in setup function } -func (h *harness) Options() cachetest.Options { - return cachetest.Options{ +func (h *harness) Options() drivertest.Options { + return drivertest.Options{ PatternMatchingDisabled: false, CloseIsNoop: false, } } -func newHarness(ctx context.Context, t *testing.T) (cachetest.Harness, error) { +func newHarness(ctx context.Context, t *testing.T) (drivertest.Harness, error) { cache := setupCache(t) return &harness{ cache: cache, @@ -127,5 +127,5 @@ func newHarness(ctx context.Context, t *testing.T) (cachetest.Harness, error) { } func TestConformance(t *testing.T) { - cachetest.RunConformanceTests(t, newHarness) + drivertest.RunConformanceTests(t, newHarness) } diff --git a/rediscluster/rediscluster_test.go b/rediscluster/rediscluster_test.go index c05ab0e..df507b3 100644 --- a/rediscluster/rediscluster_test.go +++ b/rediscluster/rediscluster_test.go @@ -7,7 +7,7 @@ import ( "time" cache "github.com/bartventer/gocache" - "github.com/bartventer/gocache/internal/cachetest" + "github.com/bartventer/gocache/drivertest" "github.com/docker/docker/api/types/container" "github.com/docker/go-connections/nat" "github.com/redis/go-redis/v9" @@ -128,14 +128,14 @@ func (h *harness) Close() { // Cleanup is handled in setup function } -func (h *harness) Options() cachetest.Options { - return cachetest.Options{ +func (h *harness) Options() drivertest.Options { + return drivertest.Options{ PatternMatchingDisabled: false, CloseIsNoop: false, } } -func newHarness(ctx context.Context, t *testing.T) (cachetest.Harness, error) { +func newHarness(ctx context.Context, t *testing.T) (drivertest.Harness, error) { cache := setupCache(t) return &harness{ cache: cache, @@ -143,5 +143,5 @@ func newHarness(ctx context.Context, t *testing.T) (cachetest.Harness, error) { } func TestConformance(t *testing.T) { - cachetest.RunConformanceTests(t, newHarness) + drivertest.RunConformanceTests(t, newHarness) }