Skip to content

Testing Overview

Test strategy, coverage, and results.


Test Levels

Level Scope Run Command
Unit Individual functions go test ./pkg/...
Integration Component interactions go test -run Integration
E2E Full cluster make test-e2e

Coverage

Package Coverage Status
pkg/config ~85% ✅
pkg/executor ~70% ✅
pkg/network ~75% ✅
pkg/jailer ~65% ✅
pkg/storage ~80% ✅
pkg/snapshot ~60% ⚠️ Needs more tests
pkg/swarmkit ~50% ⚠️ Needs more tests

Test Summary

Passing Tests

Package Tests Status
pkg/jailer 24 ✅ All passing
pkg/swarmkit 10 ✅ Passing (2 skipped)
pkg/network 15 ✅ All passing
pkg/storage 18 ✅ All passing

Known Gaps

  • Jailer integration tests skipped in CI (needs root)
  • Swarmkit tests skip jailer-dependent tests
  • E2E tests require live VM cluster

Running Tests

Unit Tests

make test

# Or directly
go test ./pkg/...

Integration Tests

go test -run Integration ./pkg/executor/...
go test -run Integration ./pkg/network/...

E2E Tests

# Runs the Go E2E suite via test/e2e/run.sh
make test-e2e

Test Infrastructure

Test Fixtures

Located in test/e2e/fixtures/:

  • Task builders used by the E2E suite
  • Test configurations

Mock Components

  • Mock executor for unit tests
  • Mock network for integration tests
  • Test sockets for SwarmKit

Topic Document
Contributing Contributing Guide
Architecture Architecture Overview

See Also: Contributing | User Architecture