smoke_runner

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2026 License: MIT Imports: 6 Imported by: 0

README

Smoke Runner (pkg/core/tools/smoke_runner)

The Smoke Runner performs fast, critical health checks on your API.

Key Tool: run_smoke

This tool quickly verifies that key endpoints are reachable and returning expected status codes.

Features
  • Auto-Discovery: Automatically finds health check endpoints (e.g., /health, /status) in the Knowledge Graph.
  • Speed: Designed for speed, failing fast if the API is down.
  • Diagnostics: Provides detailed latency and error messages for failed checks.

Usage

Run this after a deployment to ensure the API is up and running before starting more extensive tests.

Example Prompts

Trigger this tool by asking:

  • "Run a quick smoke test to verify the API is up."
  • "Analyze the health of the production environment."
  • "Check if the critical endpoints are reachable."

Documentation

Overview

Package smoke_runner provides lightweight deployment health checks for ZAP.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HealthCheck

type HealthCheck struct {
	Name     string `json:"name"`
	Endpoint string `json:"endpoint"`
	Status   string `json:"status"` // ok, error
	Latency  string `json:"latency"`
	Message  string `json:"message,omitempty"`
}

HealthCheck represents a single health or reachability check.

type SmokeParams

type SmokeParams struct {
	BaseURL   string   `json:"base_url"`             // Base URL of the API
	Endpoints []string `json:"endpoints,omitempty"`  // Specific critical endpoints to check
	Timeout   int      `json:"timeout_ms,omitempty"` // Timeout per request
	Detailed  bool     `json:"detailed,omitempty"`   // Whether to provide detailed health diagnostics
}

SmokeParams defines parameters for smoke testing.

type SmokeResult

type SmokeResult struct {
	Status   string        `json:"status"` // pass, fail, partial
	Duration string        `json:"duration"`
	Checks   []HealthCheck `json:"checks"`
	Summary  string        `json:"summary"`
}

SmokeResult represents the outcome of a smoke test.

type SmokeRunnerTool

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

SmokeRunnerTool performs fast health checks and core functionality verification.

func NewSmokeRunnerTool

func NewSmokeRunnerTool(falconDir string, httpTool *shared.HTTPTool) *SmokeRunnerTool

NewSmokeRunnerTool creates a new smoke runner tool.

func (*SmokeRunnerTool) Description

func (t *SmokeRunnerTool) Description() string

func (*SmokeRunnerTool) Execute

func (t *SmokeRunnerTool) Execute(args string) (string, error)

func (*SmokeRunnerTool) Name

func (t *SmokeRunnerTool) Name() string

func (*SmokeRunnerTool) Parameters

func (t *SmokeRunnerTool) Parameters() string

Jump to

Keyboard shortcuts

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