[PR #856] [MERGED] Integration tests v2 #1688

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

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/856
Author: @kradalby
Created: 10/13/2022
Status: Merged
Merged: 10/21/2022
Merged by: @juanfont

Base: mainHead: integration-v2


📝 Commits (10+)

  • fa8b02a tsic: Tailscale in Container abstraction
  • 308b9e7 Defince control server interface
  • b331e3f hsic: ControlServer implementation of headscale in docker
  • f68ba75 Move some helper functions into dockertestutil package
  • a9c3b14 Define a "scenario", which is a controlserver with nodes
  • eda4321 Skip integration tests on short or lack of docker
  • f109b54 Join test suite container to network, allowing seperate networks
  • 25e39d9 Add get ips command to scenario
  • b0a4ee4 test login with one node
  • 13aa845 Add comment about scenario test

📊 Changes

17 files changed (+1391 additions, -129 deletions)

View changed files

📝 .github/workflows/test-integration-cli.yml (+1 -1)
📝 .github/workflows/test-integration-derp.yml (+1 -1)
📝 .github/workflows/test-integration-general.yml (+1 -1)
📝 .github/workflows/test-integration-oidc.yml (+1 -1)
.github/workflows/test-integration-v2-general.yml (+40 -0)
📝 Makefile (+10 -0)
📝 go.mod (+1 -1)
📝 go.sum (+2 -124)
integration/control.go (+13 -0)
integration/dockertestutil/config.go (+40 -0)
integration/dockertestutil/execute.go (+94 -0)
integration/dockertestutil/network.go (+62 -0)
integration/general_test.go (+78 -0)
integration/hsic/hsic.go (+223 -0)
integration/scenario.go (+347 -0)
integration/scenario_test.go (+182 -0)
integration/tsic/tsic.go (+295 -0)

📄 Description

This is the beginning of reworking the integration tests into reusable components:

Goals:

  • reusability
  • consistency
  • lower barrier for contributors
  • alternative control servers to verify that our tests are correct
  • no sleep, more deterministic
  • do not need to bind local ports

These should be consider an unstable API, as the content of this PR will not work for all our current tests, but serve as a starter.

This PR is the beginning and it ports the "Ping all nodes" test.

Signed-off-by: Kristoffer Dalby kristoffer@dalby.cc


🔄 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/856 **Author:** [@kradalby](https://github.com/kradalby) **Created:** 10/13/2022 **Status:** ✅ Merged **Merged:** 10/21/2022 **Merged by:** [@juanfont](https://github.com/juanfont) **Base:** `main` ← **Head:** `integration-v2` --- ### 📝 Commits (10+) - [`fa8b02a`](https://github.com/juanfont/headscale/commit/fa8b02a83f856a06858b5c1d160a6abbb7df9e17) tsic: Tailscale in Container abstraction - [`308b9e7`](https://github.com/juanfont/headscale/commit/308b9e78a1613e68ae8ee01f3b7da1e39de4a28e) Defince control server interface - [`b331e3f`](https://github.com/juanfont/headscale/commit/b331e3f7367ca7208be6541641421a9325a05a85) hsic: ControlServer implementation of headscale in docker - [`f68ba75`](https://github.com/juanfont/headscale/commit/f68ba7504f542bbe6fb6c1bbd6e3a86d6529ea86) Move some helper functions into dockertestutil package - [`a9c3b14`](https://github.com/juanfont/headscale/commit/a9c3b14f79e4dc733f2fe2a69931908d74e7ce12) Define a "scenario", which is a controlserver with nodes - [`eda4321`](https://github.com/juanfont/headscale/commit/eda432148687f467c4d425235aa8f75c5d8c83c8) Skip integration tests on short or lack of docker - [`f109b54`](https://github.com/juanfont/headscale/commit/f109b54e7953a37198ddcb8b9ea1ea297ba3265c) Join test suite container to network, allowing seperate networks - [`25e39d9`](https://github.com/juanfont/headscale/commit/25e39d9ff9b0da2b6a2d96633c234a067db16eb9) Add get ips command to scenario - [`b0a4ee4`](https://github.com/juanfont/headscale/commit/b0a4ee4dfeefa87a245b7a4fc95e60d2a67270ad) test login with one node - [`13aa845`](https://github.com/juanfont/headscale/commit/13aa845c69db8a8fff44f17df2bf5d7a81d3dab3) Add comment about scenario test ### 📊 Changes **17 files changed** (+1391 additions, -129 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/test-integration-cli.yml` (+1 -1) 📝 `.github/workflows/test-integration-derp.yml` (+1 -1) 📝 `.github/workflows/test-integration-general.yml` (+1 -1) 📝 `.github/workflows/test-integration-oidc.yml` (+1 -1) ➕ `.github/workflows/test-integration-v2-general.yml` (+40 -0) 📝 `Makefile` (+10 -0) 📝 `go.mod` (+1 -1) 📝 `go.sum` (+2 -124) ➕ `integration/control.go` (+13 -0) ➕ `integration/dockertestutil/config.go` (+40 -0) ➕ `integration/dockertestutil/execute.go` (+94 -0) ➕ `integration/dockertestutil/network.go` (+62 -0) ➕ `integration/general_test.go` (+78 -0) ➕ `integration/hsic/hsic.go` (+223 -0) ➕ `integration/scenario.go` (+347 -0) ➕ `integration/scenario_test.go` (+182 -0) ➕ `integration/tsic/tsic.go` (+295 -0) </details> ### 📄 Description This is the beginning of reworking the integration tests into reusable components: Goals: - reusability - consistency - lower barrier for contributors - alternative control servers to verify that our tests are correct - no sleep, more deterministic - do not need to bind local ports These should be consider an unstable API, as the content of this PR will not work for all our current tests, but serve as a starter. This PR is the beginning and it ports the "Ping all nodes" test. Signed-off-by: Kristoffer Dalby <kristoffer@dalby.cc> --- <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:31:13 +01:00
adam closed this issue 2025-12-29 02:31:13 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1688