assert

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package assert implements the assert action handler. Assertions verify conditions without changing system state.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct{}

Handler implements the assert action handler.

func (*Handler) DryRun

func (h *Handler) DryRun(ctx actions.Context, step *config.Step) error

DryRun logs what the assertion would check.

func (*Handler) Execute

func (h *Handler) Execute(ctx actions.Context, step *config.Step) (actions.Result, error)

Execute executes the assert action.

func (*Handler) Metadata

func (h *Handler) Metadata() actions.ActionMetadata

Metadata returns the action metadata.

func (*Handler) Run

func (h *Handler) Run(ctx actions.Context, step *config.Step) (actions.Result, error)

Run is the Spec 16 entry point. Assertions don't mutate system state, so plan mode delegates straight to Execute: the assertion is evaluated, and any failure becomes a plan failure (which is the intent — you want plan to catch a broken assertion).

Reports Checkable=true and WouldChange=false when the assertion passes; a failure surfaces as a plan-time error.

func (*Handler) Validate

func (h *Handler) Validate(step *config.Step) error

Validate validates the assert action configuration.

Jump to

Keyboard shortcuts

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