From ba4d2efe506e4d94e66675661ff58b69315632e0 Mon Sep 17 00:00:00 2001 From: Sarah Funkhouser <147884153+golanglemonade@users.noreply.github.com> Date: Sun, 22 Sep 2024 10:24:44 -0600 Subject: [PATCH] fix tests too Signed-off-by: Sarah Funkhouser <147884153+golanglemonade@users.noreply.github.com> --- jsonschema/schema_generator.go | 3 ++- pkg/testutils/client.go | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/jsonschema/schema_generator.go b/jsonschema/schema_generator.go index f0c72e74..6b948086 100644 --- a/jsonschema/schema_generator.go +++ b/jsonschema/schema_generator.go @@ -11,8 +11,9 @@ import ( "github.com/invopop/yaml" "github.com/mcuadros/go-defaults" - "github.com/theopenlane/core/config" "github.com/theopenlane/utils/envparse" + + "github.com/theopenlane/core/config" ) // const values used for the schema generator diff --git a/pkg/testutils/client.go b/pkg/testutils/client.go index 927e6240..6541fbb4 100644 --- a/pkg/testutils/client.go +++ b/pkg/testutils/client.go @@ -14,6 +14,7 @@ import ( "github.com/theopenlane/core/pkg/openlaneclient" echo "github.com/theopenlane/echox" "github.com/theopenlane/echox/middleware/echocontext" + "github.com/vektah/gqlparser/v2/ast" ) // localRoundTripper is an http.RoundTripper that executes HTTP transactions @@ -108,10 +109,10 @@ func testGraphServer(t *testing.T, c *generated.Client) *handler.Server { )) // lower the cache size for testing - srv.SetQueryCache(lru.New(1000)) + srv.SetQueryCache(lru.New[*ast.QueryDocument](1000)) srv.Use(extension.AutomaticPersistedQuery{ - Cache: lru.New(100), //nolint:mnd + Cache: lru.New[string](100), //nolint:mnd }) // add all extension to the server