From 46a5c65939c6a4742b7c844fb65cbde5b0fbce3c Mon Sep 17 00:00:00 2001 From: siyul-park Date: Sun, 26 Nov 2023 00:11:24 -0500 Subject: [PATCH] test: add load exists --- pkg/loader/loader_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/loader/loader_test.go b/pkg/loader/loader_test.go index 9dcf76bd..59479d12 100644 --- a/pkg/loader/loader_test.go +++ b/pkg/loader/loader_test.go @@ -71,6 +71,13 @@ func TestLoader_LoadOne(t *testing.T) { _, ok = tb.LookupByID(spec2.GetID()) assert.True(t, ok) + r, err = ld.LoadOne(context.Background(), spec2.GetID()) + assert.NoError(t, err) + assert.NotNil(t, r) + + _, ok = tb.LookupByID(spec2.GetID()) + assert.True(t, ok) + st.DeleteOne(context.Background(), storage.Where[ulid.ULID](scheme.KeyID).EQ(spec2.GetID())) r, err = ld.LoadOne(context.Background(), spec2.GetID())