{"record":{"id":"dc0846b4ab4a82dc","repo":"juanfont/headscale","slug":"test-failed","errorCode":null,"errorMessage":"test failed","messagePattern":"test failed","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/hi/docker.go","lineNumber":29,"sourceCode":"\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/cenkalti/backoff/v5\"\n\t\"github.com/docker/docker/api/types/container\"\n\t\"github.com/docker/docker/api/types/image\"\n\t\"github.com/docker/docker/api/types/mount\"\n\t\"github.com/docker/docker/client\"\n\t\"github.com/docker/docker/pkg/stdcopy\"\n\t\"github.com/juanfont/headscale/integration/dockertestutil\"\n)\n\nconst defaultDirPerm = 0o755\n\nvar (\n\tErrTestFailed              = errors.New(\"test failed\")\n\tErrUnexpectedContainerWait = errors.New(\"unexpected end of container wait\")\n\tErrNoDockerContext         = errors.New(\"no docker context found\")\n\tErrMemoryLimitViolations   = errors.New(\"container(s) exceeded memory limits\")\n)\n\n// runTestContainer executes integration tests in a Docker container.\n//\n//nolint:gocyclo // complex test orchestration function\nfunc runTestContainer(ctx context.Context, config *RunConfig) error {\n\tcli, err := createDockerClient(ctx)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"creating Docker client: %w\", err)\n\t}\n\tdefer cli.Close()\n\n\trunID := dockertestutil.GenerateRunID()\n\tcontainerName := \"headscale-test-suite-\" + runID\n\tlogsDir := filepath.Join(config.LogsDir, runID)","sourceCodeStart":11,"sourceCodeEnd":47,"githubUrl":"https://github.com/juanfont/headscale/blob/565fd254d06c4c7f9a8cad1714a43445c79ba420/cmd/hi/docker.go#L11-L47","documentation":"Terminal error from WaitForTailscaleUp when the requested user does not exist in s.users (errNoUserAvailable). The wait loop over user.Clients cannot run because the user lookup failed.","triggerScenarios":"Calling WaitForTailscaleUp(userStr, ...) with a user string never created via Scenario.CreateUser, or with a mismatched name/format.","commonSituations":"Typo'd or reformatted user names, scenario setup partially failed, or calling the wait before creating nodes in that user.","solutions":["Create the user (and its nodes) before waiting: CreateUser then CreateTailscaleInUser then WaitForTailscaleUp.","Match the user string exactly with prior calls.","Fix earlier setup errors that prevented user creation."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if _, ok := scenario.Users()[userStr]; !ok {\n    return fmt.Errorf(\"user %q missing; create it before WaitForTailscaleUp\", userStr)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Sequence scenario calls so every referenced user is created first.","Handle setup errors immediately so later lookups cannot fail."],"tags":["integration","api-misuse","user-management"],"backgroundTag":null,"analyzedSha":"565fd254d06c4c7f9a8cad1714a43445c79ba420","analyzedAt":"2026-08-15T13:12:30.133Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}