fix(e2e): read setup-token via exec; reclaim /data
test / test (push) Has been cancelled
release / prepare (push) Has been cancelled
release / build (amd64, ubuntu-latest) (push) Has been cancelled
release / build (arm64, ubuntu-24.04-arm) (push) Has been cancelled
release / merge (push) Has been cancelled

Container startup is green; CI failed because panel-owned setup-token (0600)
was unreadable on the host bind mount, and TempDir cleanup hit EACCES on
sqlite/opendkim files. Read the token with compose exec (as guide.md) and
chown /data before removing containers/stage.

Co-Authored-By: Composer <noreply@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
mixeme
2026-08-09 12:00:34 +03:00
parent 7226050278
commit 91aa69290b
7 changed files with 62 additions and 17 deletions
+8 -1
View File
@@ -88,7 +88,14 @@ func runEntrypointBackground(t *testing.T, hostnameEnv string) (output string, s
}
name := "selfpost-e2e-hostname-check"
_ = exec.Command("docker", "rm", "-f", name).Run()
defer exec.Command("docker", "rm", "-f", name).Run()
defer func() {
// Make bind-mounted /data deletable by Go's TempDir cleanup: the panel
// leaves setup-token/db/opendkim owned by container UIDs (CI failed the
// subtest on testing.go TempDir RemoveAll even when start succeeded).
_ = exec.Command("docker", "exec", name, "sh", "-c",
"chown -R root:root /data && chmod -R a+rwX /data").Run()
_ = exec.Command("docker", "rm", "-f", name).Run()
}()
// #region agent log
if fi, err := os.Stat(dataDir); err == nil {