e2e: the panel can read the queue
A subtest that opens Outbound > Queue right after sign-in and expects postqueue's own line for an empty queue, not the page's "Could not read the mail queue". Seen on the test server after the 2.0 deployment: the Queue card said "Could not be read", and the panel's log had "postqueue: fatal: Connect to the Postfix showq service: Permission denied" on every poll. The fix follows in the next commit; this one is expected to fail on its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -160,6 +160,25 @@ func TestE2E(t *testing.T) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// The panel runs postqueue as its own user. That works only while the queue's
|
||||||
|
// public/ directory belongs to Postfix's setgid group, which the entrypoint
|
||||||
|
// has to restore after its recursive chown of the queue tree.
|
||||||
|
run("queue_readable_by_the_panel", func(t *testing.T) {
|
||||||
|
resp, body, err := sc.panel.get("/outbound/queue")
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
if resp.StatusCode != 200 {
|
||||||
|
t.Fatalf("GET /outbound/queue = %d", resp.StatusCode)
|
||||||
|
}
|
||||||
|
if strings.Contains(body, "Could not read the mail queue") {
|
||||||
|
t.Fatal("the panel could not run postqueue -p (queue directory permissions)")
|
||||||
|
}
|
||||||
|
if !strings.Contains(body, "Mail queue is empty") {
|
||||||
|
t.Fatalf("the queue page does not show postqueue's listing of an empty queue:\n%s", body)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
run("add_domain_and_publish_dkim", func(t *testing.T) {
|
run("add_domain_and_publish_dkim", func(t *testing.T) {
|
||||||
id, err := sc.panel.addDomain(senderDomain)
|
id, err := sc.panel.addDomain(senderDomain)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user