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
View File
@@ -106,6 +106,14 @@ func (s *stack) down() {
_, _ = s.compose("down", "-v", "--remove-orphans")
}
// reclaimData chowns/chmods the /data bind mount from inside the still-running
// selfpost container so the host test user can delete it afterwards. Files
// written as panel/postfix (setup-token 0600, opendkim tree, sqlite) otherwise
// leave EACCES on TempDir/stage cleanup (CI hostname-gate + prepareStage).
func (s *stack) reclaimData() {
_, _ = s.execIn("selfpost", "sh", "-c", "chown -R root:root /data && chmod -R a+rwX /data")
}
// logs returns a service's combined stdout/stderr, for failure diagnostics.
func (s *stack) logs(service string) string {
out, _ := s.compose("logs", "--no-color", service)