From 7ff2c6c48703110b7facfe29d44c059029bfb4f5 Mon Sep 17 00:00:00 2001 From: Jeremie Fraeys Date: Thu, 12 Mar 2026 16:37:42 -0400 Subject: [PATCH] refactor: reorganize integration tests Move integration-appropriate tests from tests/unit/ to tests/integration/: - tests/unit/simple_test.go -> tests/integration/simple_test.go - tests/unit/deployments/traefik_compose_test.go -> tests/integration/traefik_compose_test.go - tests/unit/worker_trust_test.go -> tests/integration/worker_trust_test.go Update test package declarations and imports to reflect new locations. These tests were misplaced in the unit tests directory but actually test integration between components or external systems (Traefik, worker trust). --- tests/{unit => integration}/simple_test.go | 2 +- .../{unit/deployments => integration}/traefik_compose_test.go | 4 ++-- tests/{unit => integration}/worker_trust_test.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename tests/{unit => integration}/simple_test.go (99%) rename tests/{unit/deployments => integration}/traefik_compose_test.go (98%) rename tests/{unit => integration}/worker_trust_test.go (99%) diff --git a/tests/unit/simple_test.go b/tests/integration/simple_test.go similarity index 99% rename from tests/unit/simple_test.go rename to tests/integration/simple_test.go index df8419c..ed17274 100644 --- a/tests/unit/simple_test.go +++ b/tests/integration/simple_test.go @@ -1,4 +1,4 @@ -package unit +package tests import ( "context" diff --git a/tests/unit/deployments/traefik_compose_test.go b/tests/integration/traefik_compose_test.go similarity index 98% rename from tests/unit/deployments/traefik_compose_test.go rename to tests/integration/traefik_compose_test.go index e526489..a8fb7be 100644 --- a/tests/unit/deployments/traefik_compose_test.go +++ b/tests/integration/traefik_compose_test.go @@ -1,4 +1,4 @@ -package deployments +package tests import ( "os" @@ -18,7 +18,7 @@ func repoRoot(t *testing.T) string { t.Fatalf("failed to resolve caller path") } - return filepath.Clean(filepath.Join(filepath.Dir(filename), "..", "..", "..")) + return filepath.Clean(filepath.Join(filepath.Dir(filename), "..", "..")) } func asMap(t *testing.T, v any) map[string]any { diff --git a/tests/unit/worker_trust_test.go b/tests/integration/worker_trust_test.go similarity index 99% rename from tests/unit/worker_trust_test.go rename to tests/integration/worker_trust_test.go index fee843b..c492c7a 100644 --- a/tests/unit/worker_trust_test.go +++ b/tests/integration/worker_trust_test.go @@ -1,4 +1,4 @@ -package unit +package tests import ( "os"