test

package
v0.0.0-...-8832f83 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2019 License: BSD-3-Clause Imports: 7 Imported by: 0

README

These tests require the fixtures in ./fixtures to be loaded:

go run ./tools/schema_loader -action-schema test/acceptance/graphql_resolvers_local/fixtures/actions_schema.json -thing-schema test/acceptance/graphql_resolvers_local/fixtures/things_schema.json 
go run ./tools/fixture_importer/ -fixture-file test/acceptance/graphql_resolvers_local/fixtures/data.json

Documentation

Overview

_       _

*__ _____ __ ___ ___ __ _| |_ ___ *\ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \ * \ V V / __/ (_| |\ V /| | (_| | || __/ * \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___| * * Copyright © 2016 - 2019 Weaviate. All rights reserved. * LICENSE: https://github.com/creativesoftwarefdn/weaviate/blob/develop/LICENSE.md * DESIGN & CONCEPT: Bob van Luijt (@bobvanluijt) * CONTACT: hello@creativesoftwarefdn.org

_       _

*__ _____ __ ___ ___ __ _| |_ ___ *\ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \ * \ V V / __/ (_| |\ V /| | (_| | || __/ * \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___| * * Copyright © 2016 - 2019 Weaviate. All rights reserved. * LICENSE: https://github.com/creativesoftwarefdn/weaviate/blob/develop/LICENSE.md * DESIGN & CONCEPT: Bob van Luijt (@bobvanluijt) * CONTACT: hello@creativesoftwarefdn.org

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func QueryGraphQL

func QueryGraphQL(t *testing.T, auth runtime.ClientAuthInfoWriterFunc, operation string, query string, variables map[string]interface{}) (*models.GraphQLResponse, error)

Performa a GraphQL request

Types

type GraphQLResult

type GraphQLResult struct {
	Result interface{}
}

func AssertGraphQL

func AssertGraphQL(t *testing.T, auth runtime.ClientAuthInfoWriterFunc, query string) *GraphQLResult

Perform a query and assert that it is successful

func (*GraphQLResult) AsSlice

func (g *GraphQLResult) AsSlice() []interface{}

Cast the result to a slice

func (GraphQLResult) Get

func (g GraphQLResult) Get(paths ...string) *GraphQLResult

Drill down in the result

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL