[PR #2648] [MERGED] cmd/hi: add integration test runner CLI tool #2780

Closed
opened 2025-12-29 04:18:57 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/2648
Author: @kradalby
Created: 6/17/2025
Status: Merged
Merged: 6/18/2025
Merged by: @kradalby

Base: mainHead: kradalby/hirun


📝 Commits (3)

  • da58865 cmd/hi: add integration test runner CLI tool
  • 5fc3db7 ci: update integration tests to use hi CLI tool
  • 3e00850 makefile: remove test integration

📊 Changes

10 files changed (+1166 additions, -77 deletions)

View changed files

📝 .github/workflows/test-integration.yaml (+6 -19)
📝 Makefile (+0 -11)
cmd/hi/cleanup.go (+144 -0)
cmd/hi/docker.go (+364 -0)
cmd/hi/doctor.go (+353 -0)
cmd/hi/main.go (+93 -0)
cmd/hi/run.go (+122 -0)
📝 flake.nix (+1 -1)
📝 go.mod (+25 -10)
📝 go.sum (+58 -36)

📄 Description

Add a new CLI tool 'hi' for running headscale integration tests
with Docker automation. The tool replaces manual Docker command
composition with an automated solution.

Features:

  • Run integration tests in golang:1.24 containers
  • Docker context detection (supports colima and other contexts)
  • Test isolation with unique run IDs and isolated control_logs
  • Automatic Docker image pulling and container management
  • Comprehensive cleanup operations for containers, networks, images
  • Docker volume caching for Go modules
  • Verbose logging and detailed test artifact reporting
  • Support for PostgreSQL/SQLite selection and various test flags

Usage: go run ./cmd/hi run TestPingAllByIP --verbose


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/juanfont/headscale/pull/2648 **Author:** [@kradalby](https://github.com/kradalby) **Created:** 6/17/2025 **Status:** ✅ Merged **Merged:** 6/18/2025 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `kradalby/hirun` --- ### 📝 Commits (3) - [`da58865`](https://github.com/juanfont/headscale/commit/da58865514438baca93ad11b7d6bba2658dbad74) cmd/hi: add integration test runner CLI tool - [`5fc3db7`](https://github.com/juanfont/headscale/commit/5fc3db7aa3ec94ec670367c198cdc6de354b9e99) ci: update integration tests to use hi CLI tool - [`3e00850`](https://github.com/juanfont/headscale/commit/3e00850c8d9fdb76a99f901b357e48014ac62527) makefile: remove test integration ### 📊 Changes **10 files changed** (+1166 additions, -77 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/test-integration.yaml` (+6 -19) 📝 `Makefile` (+0 -11) ➕ `cmd/hi/cleanup.go` (+144 -0) ➕ `cmd/hi/docker.go` (+364 -0) ➕ `cmd/hi/doctor.go` (+353 -0) ➕ `cmd/hi/main.go` (+93 -0) ➕ `cmd/hi/run.go` (+122 -0) 📝 `flake.nix` (+1 -1) 📝 `go.mod` (+25 -10) 📝 `go.sum` (+58 -36) </details> ### 📄 Description Add a new CLI tool 'hi' for running headscale integration tests with Docker automation. The tool replaces manual Docker command composition with an automated solution. Features: - Run integration tests in golang:1.24 containers - Docker context detection (supports colima and other contexts) - Test isolation with unique run IDs and isolated control_logs - Automatic Docker image pulling and container management - Comprehensive cleanup operations for containers, networks, images - Docker volume caching for Go modules - Verbose logging and detailed test artifact reporting - Support for PostgreSQL/SQLite selection and various test flags Usage: go run ./cmd/hi run TestPingAllByIP --verbose --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 04:18:57 +01:00
adam closed this issue 2025-12-29 04:18:57 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2780