qa

package
v0.39.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HTTPFailures = []HTTPFixture{
	{
		MatchAny:     true,
		ReuseRequest: true,
		Status:       418,
		Response: apierr.APIError{
			ErrorCode:  "NONSENSE",
			StatusCode: 418,
			Message:    "I'm a teapot",
		},
	},
}

Functions

func IsInDebug added in v0.30.0

func IsInDebug() bool

detects if test is run from "debug test" feature in VSCode

Types

type HTTPFixture

type HTTPFixture struct {
	Method          string
	Resource        string
	Response        interface{}
	Status          int
	ExpectedRequest interface{}
	ReuseRequest    bool
	MatchAny        bool
}

HTTPFixture defines request structure for test

type HTTPFixtures

type HTTPFixtures []HTTPFixture

func (HTTPFixtures) Apply

func (fixtures HTTPFixtures) Apply(t *testing.T, callback func(ctx context.Context, cfg *config.Config))

HTTPFixturesApply is a helper method for executing a callback and closing emulated server after

func (HTTPFixtures) ApplyClient

func (fixtures HTTPFixtures) ApplyClient(t *testing.T, callback func(ctx context.Context, client *client.DatabricksClient))

func (HTTPFixtures) Client

func (fixtures HTTPFixtures) Client(t *testing.T) (*client.DatabricksClient, *httptest.Server)

func (HTTPFixtures) Config

func (fixtures HTTPFixtures) Config(t *testing.T) (*config.Config, *httptest.Server)

Client creates DatabricksClient for emulated HTTP server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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