unittest

package
v0.0.0-...-48b9d42 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(dsn string) (*sqlx.DB, error)

func CreateDBIfNotExist

func CreateDBIfNotExist(dsn string) error

func DropDBIfExist

func DropDBIfExist(dsn string) error

Types

type PostgresConfig

type PostgresConfig struct {
	User     string
	Password string
	Host     string
	Port     string
	DBName   string
}

type PostgresSuite

type PostgresSuite struct {
	MigrationPath string

	Image string
	// contains filtered or unexported fields
}

PostgresSuite is unit test for postgres

func (*PostgresSuite) Dsn

func (s *PostgresSuite) Dsn() string

func (*PostgresSuite) Setup

func (s *PostgresSuite) Setup()

func (*PostgresSuite) TearDown

func (s *PostgresSuite) TearDown()

Jump to

Keyboard shortcuts

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