Skip to content

Commit

Permalink
pr: Add the explain tests refactor setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzadlone committed Nov 22, 2022
1 parent 5764d7b commit 36da36a
Show file tree
Hide file tree
Showing 3 changed files with 427 additions and 1 deletion.
11 changes: 11 additions & 0 deletions tests/integration/explain/simple/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"testing"

testUtils "github.com/sourcenetwork/defradb/tests/integration"
explainUtils "github.com/sourcenetwork/defradb/tests/integration/explain"
)

type dataMap = map[string]any
Expand Down Expand Up @@ -56,6 +57,7 @@ var bookAuthorGQLSchema = (`
`)

// TODO: Remove after draft has received feedback.
func executeTestCase(t *testing.T, test testUtils.QueryTestCase) {
testUtils.ExecuteQueryTestCase(
t,
Expand All @@ -64,3 +66,12 @@ func executeTestCase(t *testing.T, test testUtils.QueryTestCase) {
test,
)
}

func executeExplainTestCase(t *testing.T, test explainUtils.ExplainRequestTestCase) {
explainUtils.ExecuteExplainRequestTestCase(
t,
bookAuthorGQLSchema,
[]string{"article", "book", "author", "authorContact", "contactAddress"},
test,
)
}
Loading

0 comments on commit 36da36a

Please sign in to comment.