[PR #1230] [MERGED] Add "configtest" CLI command. #1974

Closed
opened 2025-12-29 03:19:06 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/1230
Author: @linsomniac
Created: 2/26/2023
Status: Merged
Merged: 3/3/2023
Merged by: @kradalby

Base: mainHead: configtest


📝 Commits (2)

  • 8855812 Add "configtest" CLI command.
  • 9b4b1e0 Merge branch 'main' into configtest

📊 Changes

2 files changed (+24 additions, -0 deletions)

View changed files

📝 CHANGELOG.md (+2 -0)
cmd/headscale/cli/configtest.go (+22 -0)

📄 Description

This adds a "configtest" command-line argument that sets up an instance of Headscale and exits, causing the configuration file and ACLs to be processed.

This solves a problem I've been having where the only way I know to test the ACLs syntax is to restart headscale, and if it fails to start I need to login via another system and correct the problem, then restart headscale.

This is the first time I've touched go, so if you ask too much of me in review I'm likely to be out of my element quickly. :-)

Fixes #1229

  • read the CONTRIBUTING guidelines
  • raised a GitHub issue or discussed it on the projects chat beforehand
  • added unit tests
  • added integration tests
  • updated documentation if needed
  • updated CHANGELOG.md

🔄 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/1230 **Author:** [@linsomniac](https://github.com/linsomniac) **Created:** 2/26/2023 **Status:** ✅ Merged **Merged:** 3/3/2023 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `configtest` --- ### 📝 Commits (2) - [`8855812`](https://github.com/juanfont/headscale/commit/88558124322171d7c53e9a00cba1ad5e3faf02f7) Add "configtest" CLI command. - [`9b4b1e0`](https://github.com/juanfont/headscale/commit/9b4b1e061158713278c75ca0651ca0b0707403cc) Merge branch 'main' into configtest ### 📊 Changes **2 files changed** (+24 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -0) ➕ `cmd/headscale/cli/configtest.go` (+22 -0) </details> ### 📄 Description This adds a "configtest" command-line argument that sets up an instance of Headscale and exits, causing the configuration file and ACLs to be processed. This solves a problem I've been having where the only way I know to test the ACLs syntax is to restart headscale, and if it fails to start I need to login via another system and correct the problem, then restart headscale. This is the first time I've touched go, so if you ask too much of me in review I'm likely to be out of my element quickly. :-) Fixes #1229 <!-- Please tick if the following things apply. You… --> - [X] read the [CONTRIBUTING guidelines](README.md#contributing) - [X] raised a GitHub issue or discussed it on the projects chat beforehand - [ ] added unit tests - [ ] added integration tests - [ ] updated documentation if needed - [X] updated CHANGELOG.md <!-- If applicable, please reference the issue using `Fixes #XXX` and add tests to cover your new code. --> --- <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 03:19:06 +01:00
adam closed this issue 2025-12-29 03:19:06 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1974