test

package
v0.0.0-...-22d23f5 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package test contains for setup database for integration tests. For example, you can create "fake" domain objects here for using it in integration tests.

Example:

  • fake_order.go type FakeOrder struct { ID string Number string }

    NewFakeOrder() FakeOrder {}

  • test_suite.go type DBSuite struct {}

    func (s *DBSuite) SetupFakeOrder(orders ...FakeOrder) error { if err := insert(orders...); err != nil { ... } }

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBSuite

type DBSuite struct {
	suite.Suite

	Conn *sqlx.DB
}

func NewSuite

func NewSuite() DBSuite

func (*DBSuite) SetupSuite

func (suite *DBSuite) SetupSuite() error

Jump to

Keyboard shortcuts

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