summaryrefslogtreecommitdiff
path: root/internal/namespace/namespace_test.go
blob: 5a3fe42b1fbd157025a6a36e50915ef4e8437f4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//go:build linux

package namespace

import (
	"testing"
)

// TestNamespacePackage is kept for backward compatibility.
func TestNamespacePackage(t *testing.T) {
	t.Skip("Namespace isolation tests moved to tests/e2e")
}

// TestBootstrapJoinInvalidPid verifies that BootstrapJoin fails when
// it attempts to exec a launcher that will eventually fail to join a PID.
func TestBootstrapJoinInvalidPid(t *testing.T) {
	// Since BootstrapJoin calls syscall.Exec, the test process is REPLACED.
	// We cannot test the return value of BootstrapJoin because it only returns
	// if Exec fails. If Exec succeeds, the launcher starts, and the launcher
	// is what fails to join the PID.

	// To test this, we must run the binary and check the exit code.
	t.Skip("BootstrapJoin uses syscall.Exec; must be tested via E2E binary execution")
}