fix: reconcile shared-channel receipts and protocol logs

This commit is contained in:
hectorzhao
2026-07-24 12:52:06 +08:00
parent 3997349c21
commit ca12f14b00
14 changed files with 1110 additions and 43 deletions
+10
View File
@@ -139,6 +139,8 @@ func TestInboundServerAuthenticatesAndSubmits(t *testing.T) {
}
acknowledgements <- event
w.WriteHeader(http.StatusOK)
case "/api/gateway/events/protocol-log":
_ = json.NewEncoder(w).Encode(map[string]bool{"accepted": true})
default:
t.Fatalf("unexpected api path: %s", r.URL.Path)
}
@@ -316,6 +318,8 @@ func TestInboundServerForwardsLongMessageFragmentsWithoutUDHAndAcknowledgesEachS
_ = json.NewEncoder(w).Encode([]pendingDelivery{})
case "/api/gateway/events/inbound/connection":
w.WriteHeader(http.StatusOK)
case "/api/gateway/events/protocol-log":
_ = json.NewEncoder(w).Encode(map[string]bool{"accepted": true})
default:
t.Fatalf("unexpected api path: %s", r.URL.Path)
}
@@ -410,6 +414,8 @@ func TestSubmitResponsePrecedesQueuedFailureReceipt(t *testing.T) {
}})
case "/api/gateway/events/inbound/connection", "/api/gateway/events/downstream/sent":
w.WriteHeader(http.StatusOK)
case "/api/gateway/events/protocol-log":
_ = json.NewEncoder(w).Encode(map[string]bool{"accepted": true})
default:
t.Fatalf("unexpected api path: %s", r.URL.Path)
}
@@ -467,6 +473,8 @@ func TestDailyLimitRejectsSubmitSynchronouslyWithoutPendingReceipt(t *testing.T)
_ = json.NewEncoder(w).Encode([]pendingDelivery{})
case "/api/gateway/events/inbound/connection":
w.WriteHeader(http.StatusOK)
case "/api/gateway/events/protocol-log":
_ = json.NewEncoder(w).Encode(map[string]bool{"accepted": true})
default:
t.Fatalf("unexpected api path: %s", r.URL.Path)
}
@@ -562,6 +570,8 @@ func TestInboundServerNegotiatesCMPP2AndUsesAuthenticatedAccountForSubmit(t *tes
_ = json.NewEncoder(w).Encode([]pendingDelivery{})
case "/api/gateway/events/inbound/connection":
w.WriteHeader(http.StatusOK)
case "/api/gateway/events/protocol-log":
_ = json.NewEncoder(w).Encode(map[string]bool{"accepted": true})
default:
t.Fatalf("unexpected api path: %s", r.URL.Path)
}