modtest

package
v0.8.0-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Package modtest gives a test real modules, from a catalogue on this machine: the one scripts/make-test-catalog.sh makes. The server has no module's code in it, so a test of what it does with a real one needs that catalogue, and is skipped without it.

WMS_TEST_CATALOG=<folder> go test ./...

Index

Constants

View Source
const EnvCatalog = "WMS_TEST_CATALOG"

EnvCatalog names the folder.

View Source
const ServerVersion = "0.8.0-alpha"

ServerVersion is the server the modules are told they run on: this one, as cmd/wittymediaserver says (a test there keeps the two the same). An older version here has every module that needs this server refuse to be added, failing each test that uses it.

Variables

View Source
var Wire func(*modules.Manager)

Wire sets up what this package can't reach without going in a circle, as the server does at start.

Functions

func Need

func Need(t testing.TB, ids ...string) *modules.Manager

Need installs modules for a test from the catalogue, or skips the test if there isn't one.

func Runner

func Runner(t testing.TB) string

Runner is the path of WittyPlay's game runner, from the catalogue.

Types

This section is empty.

Jump to

Keyboard shortcuts

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