release: cut 1.0.0
Pin compose and local trial to ghcr.io/mixeme/selfpost:1.0.0, close the CHANGELOG cut, and retire implementation-plan / v1.x-closure-plan. Includes the post-cut startup fixes needed for a green release e2e gate: root-owned TLS copies for postfix check, maillog_file_prefixes for /data, hostname gate and traversable /data, panel /healthz before setup, and setup-token / TempDir reclaim via docker exec. Co-Authored-By: Composer <noreply@cursor.com> Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -16,6 +16,11 @@ import (
|
||||
func runEntrypoint(t *testing.T, hostnameEnv string) (output string, exitedZero bool) {
|
||||
t.Helper()
|
||||
dataDir := t.TempDir()
|
||||
// Entrypoint also chmod 755 /data; mirror that here so a pre-fix image
|
||||
// still gets a traversable bind mount under Go's 0700 TempDir.
|
||||
if err := os.Chmod(dataDir, 0o755); err != nil {
|
||||
t.Fatalf("chmod data dir: %v", err)
|
||||
}
|
||||
|
||||
args := []string{
|
||||
"run", "--rm",
|
||||
@@ -72,13 +77,22 @@ func TestHostnameGate(t *testing.T) {
|
||||
func runEntrypointBackground(t *testing.T, hostnameEnv string) (output string, started bool) {
|
||||
t.Helper()
|
||||
dataDir := t.TempDir()
|
||||
if err := os.Chmod(dataDir, 0o755); err != nil {
|
||||
t.Fatalf("chmod data dir: %v", err)
|
||||
}
|
||||
certDir := t.TempDir()
|
||||
if err := writeSelfSignedCert(certDir+"/fullchain.pem", certDir+"/privkey.pem"); err != nil {
|
||||
t.Fatalf("generate throwaway TLS cert: %v", err)
|
||||
}
|
||||
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.
|
||||
_ = 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()
|
||||
}()
|
||||
|
||||
up := exec.Command("docker", "run", "-d", "--name", name,
|
||||
"-e", "SELFPOST_HOSTNAME="+hostnameEnv,
|
||||
|
||||
Reference in New Issue
Block a user