Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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.
Click to show internal directories.
Click to hide internal directories.