kiviktest

package module
v3.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: Apache-2.0 Imports: 19 Imported by: 5

README

kiviktest

This package provides integration tests for the Kivik suite of packages.

License

This software is released under the terms of the Apache 2.0 license. See LICENCE.md, or read the full license.

Documentation

Index

Constants

View Source
const (
	SuiteAuto        = "auto"
	SuitePouchLocal  = "pouch"
	SuitePouchRemote = "pouchRemote"
	SuiteCouch16     = "couch16"
	SuiteCouch17     = "couch17"
	SuiteCouch20     = "couch20"
	SuiteCouch21     = "couch21"
	SuiteCouch22     = "couch22"
	SuiteCouch23     = "couch23"
	SuiteCouch30     = "couch30"
	SuiteCloudant    = "cloudant"
	SuiteKivikServer = "kivikServer"
	SuiteKivikMemory = "kivikMemory"
	SuiteKivikFS     = "kivikFilesystem"
)

The available test suites

Variables

AllSuites is a list of all defined suites.

Functions

func CleanupTests

func CleanupTests(driver, dsn string, verbose bool) error

CleanupTests attempts to clean up any stray test databases created by a previous test run.

func ConnectClients

func ConnectClients(driverName, dsn string, t *testing.T) (*kt.Context, error)

ConnectClients connects clients.

func DoTest

func DoTest(suite, envName string, t *testing.T)

DoTest runs a suite of tests.

func ListTests

func ListTests()

ListTests prints a list of available test suites to stdout.

func RegisterSuite

func RegisterSuite(suite string, conf kt.SuiteConfig)

RegisterSuite registers a Suite as available for testing.

func RunTests

func RunTests(opts Options)

RunTests runs the requested test suites against the requested driver and DSN.

func RunTestsInternal

func RunTestsInternal(ctx *kt.Context, suite string, t *testing.T)

RunTestsInternal is for internal use only.

func Test

func Test(driver, dsn string, testSuites []string, rw bool, t *testing.T)

Test is the main test entry point when running tests through the command line tool.

Types

type Options

type Options struct {
	Driver  string
	DSN     string
	Verbose bool
	RW      bool
	Match   string
	Suites  []string
	Cleanup bool
}

Options are the options to run a test from the command line tool.

Directories

Path Synopsis
Package kt provides common utilities for Kivik tests.
Package kt provides common utilities for Kivik tests.

Jump to

Keyboard shortcuts

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