testmysql

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package testmysql supplies connection details for the integration tests.

The tests talk to a real MariaDB rather than a stub because the behaviour they pin down — server-side cancellation, streaming, information_schema timing — only exists on a real server.

Start one with: make db-up

Index

Constants

View Source
const (
	DefaultHost     = "127.0.0.1"
	DefaultPort     = 13306
	DefaultUser     = "root"
	DefaultPassword = "datavase-test"
	DefaultDatabase = "datavase_test"
)

Defaults matching the container started by `make db-up`. The port is deliberately not 3306 so the tests never reach a developer's own MySQL.

View Source
const (
	EnvHost     = "DATAVASE_TEST_HOST"
	EnvPort     = "DATAVASE_TEST_PORT"
	EnvUser     = "DATAVASE_TEST_USER"
	EnvPassword = "DATAVASE_TEST_PASSWORD"
	EnvDatabase = "DATAVASE_TEST_DATABASE"
)

Environment variables that override the defaults.

Variables

This section is empty.

Functions

func DataSource

func DataSource(t *testing.T) (*config.DataSource, string)

DataSource returns the test datasource and its password.

Types

This section is empty.

Jump to

Keyboard shortcuts

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