完善Nginx本地激活身份校验并通过Linux重复验证

This commit is contained in:
xuans committed 2026-09-18 02:43:49 +08:00
1 parent cc94a6181b
commit 87589612cb
15 files changed
+741 -48

No files matched your search

@@ -50,9 +50,13 @@ func TestRotationReconcileUsesActualUpstream(t *testing.T) {
current := f.assertStatus(t, "staged")
current.Status = "pending"
root, err := os.OpenRoot(f.rotation.Directory)
if err != nil { t.Fatal(err) }
if err != nil {
t.Fatal(err)
}
defer root.Close()
if err := saveTransaction(root, current); err != nil { t.Fatal(err) }
if err := saveTransaction(root, current); err != nil {
t.Fatal(err)
}
case "unrelated":
other := f.authority.issue(t, testHostname, time.Now().Add(-time.Hour), time.Now().Add(72*time.Hour))
f.upstream.active.Store(&other.pair)
@@ -65,7 +69,9 @@ func TestRotationReconcileUsesActualUpstream(t *testing.T) {
}
state, err := f.rotation.Reconcile(ctx, id)
if scenario == "unrelated" || scenario == "unavailable" || scenario == "external-include" || scenario == "wrong-id" {
if err == nil { t.Fatal("无法确认的状态不应完成恢复") }
if err == nil {
t.Fatal("无法确认的状态不应完成恢复")
}
f.assertStatus(t, "staged")
return
}