ruleshttp-test

command
v0.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Command ruleshttp-test evaluates ruleshttp rules against a test file.

Usage:

ruleshttp-test <rules.yaml>

The test file is derived from the rules path by inserting "_test" before the ".yaml" extension, e.g. "rules.yaml" → "rules_test.yaml".

Test file format:

requests:
  - name: "plain English description"
    want: allow        # or deny
    request:
      method: GET      # optional, defaults to GET
      path: /foo/bar

responses:
  - name: "plain English description"
    want: allow        # or deny
    response:
      status_code: 200

A ruleshttp evaluation error counts as a failure. The process exits 1 if any test fails, 0 otherwise.

Jump to

Keyboard shortcuts

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