[PR #81] [MERGED] Add Integration tests #1246

Closed
opened 2025-12-29 02:29:26 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/81
Author: @kradalby
Created: 8/8/2021
Status: Merged
Merged: 8/12/2021
Merged by: @juanfont

Base: mainHead: integration-tests


📝 Commits (10+)

  • 149279f Add health endpoint
  • 642c782 Add trace log for machine failing to parce ip in toNode
  • 91ffd10 Remove "Keys: " from create auth key output
  • d861231 Add a dockerignore file to speed up builds and make cachine better
  • a43bb1b Improve Dockerfile
  • f973aef Add Dockerfile to build tailscale docker image for integration tests
  • 4e077b0 Initial work, add integration tests
  • c9e5048 Merge remote-tracking branch 'upstream/main' into integration-tests
  • 7141e2e Fix hostname passed to join command
  • 54da1a4 Commit the correct integration etc files

📊 Changes

14 files changed (+408 additions, -5 deletions)

View changed files

.dockerignore (+16 -0)
📝 .gitignore (+1 -0)
📝 Dockerfile (+11 -4)
Dockerfile.tailscale (+9 -0)
📝 Makefile (+3 -0)
📝 app.go (+1 -0)
📝 cmd/headscale/cli/preauthkeys.go (+1 -1)
📝 go.mod (+12 -0)
📝 go.sum (+89 -0)
integration_test.go (+246 -0)
integration_test/.gitignore (+3 -0)
integration_test/etc/config.json (+11 -0)
integration_test/etc/private.key (+1 -0)
📝 machine.go (+4 -0)

📄 Description

This PR builds the basis for integration testing the built headscale binary and against the official Tailscale client.

please review commit by commit, as each commit describe the given change.

These has been tested with Docker for mac, so would appreaciate someone testing with Linux:

Via make:

make test_integration

Or via go (with a lot more verbose output, which I prefer):

go test -tags integration

The tests are as the command above shows, flag guarded so they will not run without being explicitly invoked.


🔄 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/81 **Author:** [@kradalby](https://github.com/kradalby) **Created:** 8/8/2021 **Status:** ✅ Merged **Merged:** 8/12/2021 **Merged by:** [@juanfont](https://github.com/juanfont) **Base:** `main` ← **Head:** `integration-tests` --- ### 📝 Commits (10+) - [`149279f`](https://github.com/juanfont/headscale/commit/149279f3d5ae777dbe5adbfb238767d98ad398f0) Add health endpoint - [`642c782`](https://github.com/juanfont/headscale/commit/642c7824a787ef1d47627c36219cabb1312b3b63) Add trace log for machine failing to parce ip in toNode - [`91ffd10`](https://github.com/juanfont/headscale/commit/91ffd101922dbb495cd8700fbe299bd7da71a1c0) Remove "Keys: " from create auth key output - [`d861231`](https://github.com/juanfont/headscale/commit/d86123195c39667946033f9e3554dc41716847b7) Add a dockerignore file to speed up builds and make cachine better - [`a43bb1b`](https://github.com/juanfont/headscale/commit/a43bb1bb40d73974f1541416b0eabd8e05fcdd04) Improve Dockerfile - [`f973aef`](https://github.com/juanfont/headscale/commit/f973aef80c53aba07113a0f0592add4903b16fe7) Add Dockerfile to build tailscale docker image for integration tests - [`4e077b0`](https://github.com/juanfont/headscale/commit/4e077b053c11a530149b86b3b8543f6f34f00077) Initial work, add integration tests - [`c9e5048`](https://github.com/juanfont/headscale/commit/c9e5048015d2b952ad1ede4f250f0714b50efdb5) Merge remote-tracking branch 'upstream/main' into integration-tests - [`7141e2e`](https://github.com/juanfont/headscale/commit/7141e2ed70aaa8e2350a28007c18f0a2c51b266c) Fix hostname passed to join command - [`54da1a4`](https://github.com/juanfont/headscale/commit/54da1a4155d084de9392a57d349084ebaeba56d1) Commit the correct integration etc files ### 📊 Changes **14 files changed** (+408 additions, -5 deletions) <details> <summary>View changed files</summary> ➕ `.dockerignore` (+16 -0) 📝 `.gitignore` (+1 -0) 📝 `Dockerfile` (+11 -4) ➕ `Dockerfile.tailscale` (+9 -0) 📝 `Makefile` (+3 -0) 📝 `app.go` (+1 -0) 📝 `cmd/headscale/cli/preauthkeys.go` (+1 -1) 📝 `go.mod` (+12 -0) 📝 `go.sum` (+89 -0) ➕ `integration_test.go` (+246 -0) ➕ `integration_test/.gitignore` (+3 -0) ➕ `integration_test/etc/config.json` (+11 -0) ➕ `integration_test/etc/private.key` (+1 -0) 📝 `machine.go` (+4 -0) </details> ### 📄 Description This PR builds the basis for integration testing the built `headscale` binary and against the official Tailscale client. please review commit by commit, as each commit describe the given change. These has been tested with Docker for mac, so would appreaciate someone testing with Linux: Via `make`: ```bash make test_integration ``` Or via `go` (with a lot more verbose output, which I prefer): ```bash go test -tags integration ``` The tests are as the command above shows, flag guarded so they will not run without being explicitly invoked. --- <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 02:29:26 +01:00
adam closed this issue 2025-12-29 02:29:26 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1246