From 869f3aaf0190cecaeae08a44c82daa6481bca707 Mon Sep 17 00:00:00 2001 From: atye Date: Sun, 12 Feb 2023 23:30:00 -0500 Subject: [PATCH] undo minor changes --- internal/powerflex/storage_pool_cache.go | 1 + internal/powerflex/storage_pool_cache_test.go | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/powerflex/storage_pool_cache.go b/internal/powerflex/storage_pool_cache.go index f93425f2..8fb0066f 100644 --- a/internal/powerflex/storage_pool_cache.go +++ b/internal/powerflex/storage_pool_cache.go @@ -87,5 +87,6 @@ func (c *StoragePoolCache) GetStoragePoolNameByID(ctx context.Context, tokenGett } c.cache.Add(id, pool.Name) + return pool.Name, nil } diff --git a/internal/powerflex/storage_pool_cache_test.go b/internal/powerflex/storage_pool_cache_test.go index ab47767c..6afa9e19 100644 --- a/internal/powerflex/storage_pool_cache_test.go +++ b/internal/powerflex/storage_pool_cache_test.go @@ -267,10 +267,8 @@ func TestStoragePoolCache_GetStoragePoolNameByID(t *testing.T) { }) defer powerFlexSvr.Close() - client := newPowerFlexClient(t, powerFlexSvr.URL) - // Attempt to create new storage pool with cache size - _, gotErr := powerflex.NewStoragePoolCache(client, 0) + _, gotErr := powerflex.NewStoragePoolCache(newPowerFlexClient(t, powerFlexSvr.URL), 0) wantErr := fmt.Errorf("cache size must be at least one") if gotErr.Error() != wantErr.Error() { t.Errorf("New Storage Pool Cache: got err = %v, want: %v", gotErr, wantErr)