evidence

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: MIT Imports: 11 Imported by: 0 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 evidence runs real notesd processes for the milestones' exit evidence (make m2-evidence, m3-evidence and m4-evidence; plans 0004, 0005 and 0006): each with its own data directory, private socket folder, vault folder and file secrets, a hub on loopback or behind lodge's development build, all stopped when the test ends.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(t testing.TB, pkg string) string

Build builds a command of this module, such as "github.com/frostyard/frostnotes/cmd/notesd", into a temporary folder and returns the binary's path.

func FreeAddr

func FreeAddr(t testing.TB) string

FreeAddr picks a free loopback address, for a hub.

Types

type Notesd

type Notesd struct {
	Name   string
	Cmd    *exec.Cmd
	Data   string // its data directory
	Dir    string // its vault's folder
	Socket string
	C      *api.Client
	Vault  int64 // its vault, once AddVault has added it
	// contains filtered or unexported fields
}

Notesd is one notesd process.

func Start

func Start(t testing.TB, bin, name string, args ...string) *Notesd

Start starts notesd from bin with args, waits until it says it started, and connects to it.

func StartEnv

func StartEnv(t testing.TB, bin, name string, env []string, args ...string) *Notesd

StartEnv starts notesd as Start does, with env added to its environment, such as lodge's LODGE_ROOT for notesd --lodge.

func (*Notesd) AddVault

func (p *Notesd) AddVault(ctx context.Context, t testing.TB) int64

AddVault adds the process's vault folder as its vault.

func (*Notesd) Join

func (p *Notesd) Join(ctx context.Context, t testing.TB, hub *Notesd, url string)

Join pairs p with the hub at url and joins its vault to the hub's one.

func (*Notesd) Restart

func (p *Notesd) Restart(t testing.TB)

Restart stops the process as an interrupt does and starts it again on the same data, vault, socket, arguments and environment.

func (*Notesd) WaitFor

func (p *Notesd) WaitFor(ctx context.Context, t testing.TB, path string)

WaitFor waits, by p's note.changed events, until sync has applied the file at path.

Jump to

Keyboard shortcuts

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