fix(e2e): read setup-token via exec; reclaim /data
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user