heavyweight

package
v0.0.0-...-3674750 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package heavyweight contains test helpers that are costly and you should think **real carefully** before using in your tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FullTestDBEmptyV2

func FullTestDBEmptyV2(t testing.TB, overrideFn func(c *erinaceus.Config, s *erinaceus.Secrets)) (erinaceus.GeneralConfig, *sqlx.DB)

FullTestDBEmptyV2 creates an empty DB (without migrations).

func FullTestDBNoFixturesV2

func FullTestDBNoFixturesV2(t testing.TB, overrideFn func(c *erinaceus.Config, s *erinaceus.Secrets)) (erinaceus.GeneralConfig, *sqlx.DB)

FullTestDBNoFixturesV2 is the same as FullTestDB, but it does not load fixtures.

func FullTestDBV2

func FullTestDBV2(t testing.TB, overrideFn func(c *erinaceus.Config, s *erinaceus.Secrets)) (erinaceus.GeneralConfig, *sqlx.DB)

FullTestDBV2 creates a pristine DB which runs in a separate database than the normal unit tests, so you can do things like use other Postgres connection types with it.

Types

type Kind

type Kind int
const (
	KindEmpty Kind = iota
	KindTemplate
	KindFixtures
)

func (Kind) PrepareDB

func (c Kind) PrepareDB(t testing.TB, overrideFn func(c *erinaceus.Config, s *erinaceus.Secrets)) (erinaceus.GeneralConfig, *sqlx.DB)

Jump to

Keyboard shortcuts

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