Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SeedDirectory ¶ added in v1.20.0
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. |