package legacy

import "github.com/datastax/astra-db-go/v2/integration/legacy"

Index

Functions

func Run

func Run()

Get the test environment as well as all tests, then run them. Tests should be of type harness.IntegrationTest:

func CreateCollection(e *harness.TestEnv) error { //... }

Tests should register themselves with the test harness in an `init` function:

func init() {
	// Register a single test that doesn't depent on prior tests
	harness.Register(harness.IntegrationTest{
		Name: "ListCollections", Run: ListCollections,
	})
	// Register multiple tests (order will be preserved).
	t := []harness.IntegrationTest{
		{Name: "CreateCollection", Run: CreateCollection},
		{Name: "GetCollection", Run: GetCollection},
		{Name: "DropCollection", Run: DropCollection},
	}
	harness.Register(t...)
 }

Directories

harness Package harness defines a test harness for running integration tests.
tests