Skip to content

Commit 487cef5

Browse files
committed
.github: regenerate the integration test matrix
1 parent 55a2ad7 commit 487cef5

2 files changed

Lines changed: 48 additions & 0 deletions

File tree

.github/workflows/gh-action-integration-generator.go

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,27 @@ var testsToSplit = map[string][]string{
3939
},
4040
}
4141

42+
// testsExcludedFromMatrix are tests that must NOT be added to the shared
43+
// sqlite/postgres matrices because they have special runner requirements and
44+
// run in their own dedicated job. TestK8sOperator needs a runner that permits
45+
// privileged cgroup-v2 containers (it runs a real k3s cluster), which the
46+
// shared integration-test-template job is not guaranteed to provide.
47+
var testsExcludedFromMatrix = map[string]bool{
48+
"TestK8sOperator": true,
49+
}
50+
51+
// filterExcluded drops tests that run in their own dedicated job.
52+
func filterExcluded(tests []string) []string {
53+
var kept []string
54+
for _, test := range tests {
55+
if testsExcludedFromMatrix[test] {
56+
continue
57+
}
58+
kept = append(kept, test)
59+
}
60+
return kept
61+
}
62+
4263
// expandTests takes a list of test names and expands any that need splitting
4364
// into multiple subtest patterns.
4465
func expandTests(tests []string) []string {
@@ -117,6 +138,9 @@ func updateYAML(tests []string, jobName string, testPath string) {
117138
func main() {
118139
tests := findTests()
119140

141+
// Drop tests that run in their own dedicated job (special runner needs).
142+
tests = filterExcluded(tests)
143+
120144
// Expand tests that should be split into multiple jobs
121145
expandedTests := expandTests(tests)
122146

.github/workflows/test-integration.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@ jobs:
275275
- TestNodeTagCommand
276276
- TestNodeRouteCommands
277277
- TestNodeBackfillIPsCommand
278+
- TestOAuthClientCommand
279+
- TestOAuthClientCommandValidation
278280
- TestPolicyCheckCommand
279281
- TestSSHTestsRejectFailingPolicy
280282
- TestPolicyCommand
@@ -401,3 +403,25 @@ jobs:
401403
test: ${{ matrix.test }}
402404
postgres_flag: "--postgres=1"
403405
database_name: "postgres"
406+
# k8s-operator: TestK8sOperator stands up a real k3s cluster (rancher/k3s) as
407+
# a privileged sibling container and installs the Tailscale Kubernetes
408+
# operator via Helm against an in-test Headscale.
409+
#
410+
# PRIVILEGED-CI REQUIREMENT: this job MUST run on a runner that permits
411+
# privileged containers with a writable cgroup-v2 hierarchy (k3s runs
412+
# containerd, manages iptables/ipvs and mounts /sys/fs/cgroup). The standard
413+
# GitHub-hosted ubuntu-24.04-arm runner used by the shared template supports
414+
# this; self-hosted or hardened runners that disallow --privileged or remount
415+
# /sys/fs/cgroup read-only will fail this test. It is kept out of the
416+
# generator-managed sqlite/postgres matrices (see
417+
# .github/workflows/gh-action-integration-generator.go) precisely because of
418+
# this special requirement.
419+
k8s-operator:
420+
needs: [build, build-tailscale-released]
421+
if: needs.build.outputs.files-changed == 'true'
422+
uses: ./.github/workflows/integration-test-template.yml
423+
secrets: inherit
424+
with:
425+
test: "TestK8sOperator"
426+
postgres_flag: "--postgres=0"
427+
database_name: "sqlite"

0 commit comments

Comments
 (0)