helpers

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

package: tests/helpers / testkit type: tool job: shared helpers for driving a ranke.Sequencer from tests and test tooling limits: the contract only — no fixtures, no assertions, no backend knowledge (-> tests, tests/backends)

Index

Constants

View Source
const FoundBranch = "main"

FoundBranch is the branch Found binds the first contributor to — "main", which the fixtures then contribute to, so a test archive holds one branch rather than two.

Variables

This section is empty.

Functions

func Contribute

func Contribute(ctx context.Context, seq ranke.Sequencer, branch string, claims []ranke.Claim,
	opts ...ranke.ContributionOption) (ranke.Id, error)

Contribute drives one contribution through the Sequencer contract's seven steps — open, fill, verify, persist, merge, bookmark — returning the head it advanced to. opts carry the constraints the contribution opens under.

func Found added in v0.29.0

func Found(ctx context.Context, seq ranke.Sequencer, label string) (ranke.Contributor, error)

Found brings seq's archive into being under the key label names, which every operation but Found itself now requires. It returns the first contributor, resolved with its own private key so a test may contribute as it.

func FoundedKey added in v0.29.0

func FoundedKey(label string) ed25519.PrivateKey

FoundedKey is the deterministic key a label names, so a fixture's first contributor is the same identity on every run and across backends. Ed25519 keys come from a seed, so a fixed label is a fixed key.

Types

This section is empty.

Jump to

Keyboard shortcuts

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