integration_test

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestEnabled

func TestEnabled() bool

TestEnabled determines if integration testing is enabled by checking env variable flag 'ENABLE_INTEGRATION_TEST'. Default is false.

Types

type TestSuite

type TestSuite interface {
	// StartUp - initializes the external component, returns the connection if database
	StartUp() interface{}
	// CleanUp - clear test data or shutdown the external component
	CleanUp()

	// Create a record in db
	Create(ctx context.Context, v interface{}) error
	// Find a record in db using primary key ID
	FindByID(ctx context.Context, entity interface{}, id uint) error
}

TestSuite interface for integration testing of external components such as database or webservice

Directories

Path Synopsis
Package sql provides test suite for integration test with database
Package sql provides test suite for integration test with database

Jump to

Keyboard shortcuts

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