Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Build end-to-end test framework #54

@dorser

Description

@dorser

Summary

The tests/ directory exists but is completely empty. No integration or end-to-end tests exist.

What's Needed

Design and implement a test framework that can:

Test Types

  1. Smoke tests: Deploy micromize, verify it starts and loads gadgets
  2. Gadget behavior tests: Verify each gadget correctly blocks/audits:
    • fs-restrict: Execute a binary from a restricted path, verify it's blocked
    • cap-restrict: Attempt a restricted capability operation, verify it's blocked
    • ptrace-restrict: Attempt ptrace, verify it's blocked
  3. Audit mode tests: Same operations in audit mode, verify events are logged but not blocked
  4. Exclusion tests: Verify excluded containers are not affected

Infrastructure Options

  • Kind cluster for Kubernetes-based testing
  • Docker-based for standalone testing
  • Use Go test framework with testing.T
  • Consider BPF test tools or BPF_PROG_TEST_RUN

CI Integration

  • These tests require privileged access and specific kernel versions
  • Consider a separate CI workflow with self-hosted runners or VM-based runners

Files

  • tests/ (currently empty)
  • gadgets/*/program.bpf.c

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttestingTest coverage and test infrastructure

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions