testutils

package
v0.17.6 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0, MIT Imports: 11 Imported by: 0

Documentation

Overview

Utilities for _test.go files

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(command string, args ...string) (string, error)

func MustExecute

func MustExecute(command string, args ...string) string

func ReadTests

func ReadTests(pattern string) (map[string]TestCase, error)

func RunTest

func RunTest(t *testing.T, db database.Database, test TestCase, mode schema.GeneratorMode, sqlParser database.Parser, version string)

Types

type TestCase

type TestCase struct {
	Current    string  // default: empty schema
	Desired    string  // default: empty schema
	Output     *string // default: use Desired as Output
	MinVersion string  `yaml:"min_version"`
	MaxVersion string  `yaml:"max_version"`
	User       string
}

Jump to

Keyboard shortcuts

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