integrationtest

package
v0.0.0-...-e6e2e8d Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package integrationtest provides db helpers used in integration tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Flush

func Flush(t *testing.T, db *sql.DB)

Flush flushes all db tables without droping.

func SetupDB

func SetupDB(t *testing.T, driver, source string) *sql.DB

SetupDB sets up connection with database for testing and then cleans it.

func SetupServer

func SetupServer(t *testing.T) *httpserver.Server

SetupServer returns test server that cleans up database after each integration test.

func SetupTX

func SetupTX(t *testing.T, driver, source string) *sql.Tx

SetupTX sets up a database transaction to be used in tests.

Once the tests are done it will rollback the transaction.

Types

This section is empty.

Directories

Path Synopsis
Package helpers provides shared test helpers.
Package helpers provides shared test helpers.

Jump to

Keyboard shortcuts

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