fixture

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package fixture builds fake WordPress/WooCommerce, Magento 2 and Laravel databases for tests. All data is invented: names from short lists, streets and cities mixed at random, phone numbers in the 555-01xx range reserved for fiction, IP addresses from the documentation ranges. Secret-looking strings are assembled at run time so that none sits in the repository.

Index

Constants

This section is empty.

Variables

View Source
var Platforms = []string{"wordpress", "magento2", "laravel"}

Platforms lists the fixtures Build can make.

Functions

func Build

func Build(ctx context.Context, admin *sql.DB, platform, database string, opts Options) error

Build drops and recreates the database and fills it with fake data for the platform. admin needs multiStatements=true and the right to create databases.

Types

type Options

type Options struct {
	// Canary is placed inside several stored values. Reports must never
	// contain it.
	Canary string
}

Options for Build.

Jump to

Keyboard shortcuts

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