feat(profile): persist candidate edits and enforce company access
This commit is contained in:
1 parent
3ab6bd91a3
commit
73c7caa225
67 files changed
+5286
-229
No files matched your search
@@ -1149,6 +1149,23 @@ func TestServiceMailSending(t *testing.T) {
|
||||
if err := pool.QueryRow(ctx, "SELECT count(*) FROM delivery_retry_decisions WHERE delivery_id = $1", deliveryID).Scan(&decisions); err != nil || decisions != 1 {
|
||||
t.Fatalf("audited decisions = %d, %v; want exactly one", decisions, err)
|
||||
}
|
||||
scheduled := harness.delivery(ctx, t, deliveryID)
|
||||
if scheduled.Status() != domain.DeliveryStatusUnknown || scheduled.NextAttemptAt().IsZero() {
|
||||
t.Fatalf("authorized delivery is %s due %s; want scheduled unknown work", scheduled.Status(), scheduled.NextAttemptAt())
|
||||
}
|
||||
dueAfterAuthorization := scheduled.NextAttemptAt().Add(time.Second)
|
||||
var databaseNow time.Time
|
||||
if err := pool.QueryRow(ctx, "SELECT clock_timestamp()").Scan(&databaseNow); err != nil {
|
||||
t.Fatalf("read database clock after manual retry: %v", err)
|
||||
}
|
||||
databaseDueAt := databaseNow.Add(time.Second)
|
||||
if databaseDueAt.After(dueAfterAuthorization) {
|
||||
dueAfterAuthorization = databaseDueAt
|
||||
}
|
||||
// The CLI uses the real clock; the worker uses the test clock. Align the
|
||||
// worker with the persisted due time before scripting the next provider
|
||||
// response, or this subtest leaves that response queued for the next one.
|
||||
harness.clock.Set(dueAfterAuthorization)
|
||||
|
||||
fixture.Script(resendfixture.Reply{Status: http.StatusTooManyRequests, Name: "rate_limit_exceeded", RetryAfter: "300"})
|
||||
if result := harness.pass(ctx, t, sender); result.Outcome != inbound.MailPassRetry {
|
||||
|
||||
Reference in new issue
Block a user