testfixtures

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package testfixtures locates the shared golden test data under the repository's top-level testdata/ directory, so tests in every package read one copy of each fixture rather than carrying their own.

Layout:

testdata/prod-2026-09-03/  a real production item, end to end: the
                           complete, compact and partial bundles (JSON),
                           the complete bundle as CBOR, the production
                           keyring, the reference verifier's offline
                           reports and the server's online reports
testdata/tamper/           mutations of the complete bundle with the
                           server's and the reference verifier's reports
testdata/staging-2026-09-03/ a staging item whose bundle carries a real
                           Bitcoin regtest commitment (raw transaction,
                           txoutproof, block merkle root) ahead of its
                           Stellar testnet one, the staging keyring, and
                           the server's online report
testdata/whitepaper/       the Appendix D worked bundle, its derivation
                           trace, and the Appendix C vectors

Index

Constants

View Source
const (
	ProdDir       = "prod-2026-09-03"
	ProdComplete  = "proof-complete.json"
	ProdCompact   = "proof-compact.json"
	ProdPartial   = "proof-partial.json"
	ProdCBOR      = "proof-complete.cbor"
	ProdKeyring   = "keyring.json"
	TamperDir     = "tamper"
	StagingDir    = "staging-2026-09-03"
	WhitepaperDir = "whitepaper"
	AppendixD     = "bundle.json"
)

Fixture names, so a typo is a compile error rather than a missing file.

Variables

This section is empty.

Functions

func Path

func Path(parts ...string) string

Path joins parts under Root.

func Read

func Read(t testing.TB, parts ...string) []byte

Read returns a fixture's bytes, failing the test when it cannot be read.

func Root

func Root() string

Root returns the absolute path of the repository's testdata directory.

Types

This section is empty.

Jump to

Keyboard shortcuts

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