demo

package
v1.53.1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SeedDirectory added in v1.20.0

func SeedDirectory(dir string, count int) error

SeedDirectory seeds count mock sessions into dir without requiring a running server or a testing.T. Used by the e2e-video CI pipeline.

Types

type DemoServer

type DemoServer struct {
	// contains filtered or unexported fields
}

DemoServer manages a stapler-squad server instance for demo recording.

func StartDemoServer

func StartDemoServer(t *testing.T) *DemoServer

StartDemoServer seeds a fresh SQLite database with mock sessions and starts the server binary in test mode. It does NOT wait for the server to be healthy – call WaitForHealth after calling this.

func (*DemoServer) SeedMockSessions

func (s *DemoServer) SeedMockSessions(count int) error

SeedMockSessions writes realistic demo sessions directly into the SQLite database before the server starts, so no tmux processes are required.

func (*DemoServer) Stop

func (s *DemoServer) Stop()

Stop terminates the server process and removes the temp data directory.

func (*DemoServer) URL

func (s *DemoServer) URL() string

URL returns the base URL of the demo server.

func (*DemoServer) WaitForHealth

func (s *DemoServer) WaitForHealth(timeout time.Duration) error

WaitForHealth polls /health until the server is ready or the timeout expires.

Directories

Path Synopsis
seed seeds mock demo sessions into a data directory so the stapler-squad server can be started with pre-populated data for E2E video recording.
seed seeds mock demo sessions into a data directory so the stapler-squad server can be started with pre-populated data for E2E video recording.

Jump to

Keyboard shortcuts

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