From f14e2776601ec23db63a92920d05ed2e339c251f Mon Sep 17 00:00:00 2001 From: Eric Solender Date: Fri, 10 Sep 2021 18:45:02 -0400 Subject: [PATCH] fix index test --- index_test.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/index_test.go b/index_test.go index a124f95..8e6f23e 100644 --- a/index_test.go +++ b/index_test.go @@ -20,6 +20,7 @@ package gogm import ( + "context" "github.com/stretchr/testify/require" "log" "reflect" @@ -30,10 +31,10 @@ func testIndexManagement(req *require.Assertions) { req.Nil(err) req.NotNil(gogm) //delete everything - req.Nil(dropAllIndexesAndConstraints(gogm)) + req.Nil(dropAllIndexesAndConstraints(context.Background(), gogm)) //setup structure - mapp := toHashmapStructdecconf(map[string]structDecoratorConfig{ + _map := toHashmapStructdecconf(map[string]structDecoratorConfig{ "TEST1": { Label: "Test1", IsVertex: true, @@ -79,13 +80,13 @@ func testIndexManagement(req *require.Assertions) { }) //create stuff - req.Nil(createAllIndexesAndConstraints(gogm, mapp)) + req.Nil(createAllIndexesAndConstraints(context.Background(), gogm, _map)) log.Println("created indices and constraints") //validate - req.Nil(verifyAllIndexesAndConstraints(gogm, mapp)) + req.Nil(verifyAllIndexesAndConstraints(context.Background(), gogm, _map)) //clean up - req.Nil(dropAllIndexesAndConstraints(gogm)) + req.Nil(dropAllIndexesAndConstraints(context.Background(), gogm)) }