test: improve RoadmapRevision verification to use dynamic after value
Change RoadmapRevision check from hardcoded string to comparing against the HTTP payload's `after` variable directly, proving the full chain: HTTP payload `after` → scanner → bridge → job.RoadmapRevision.
This commit is contained in:
parent
d0d4c810ae
commit
83036e366b
1 changed files with 3 additions and 2 deletions
|
|
@ -232,8 +232,9 @@ func TestGitoHTTPWebhookDeliveryEnqueuesCreationSyncOnce(t *testing.T) {
|
||||||
job := enq.jobs[0]
|
job := enq.jobs[0]
|
||||||
|
|
||||||
// 10. Verify job content.
|
// 10. Verify job content.
|
||||||
if job.RoadmapRevision != "abc123def456" {
|
// RoadmapRevision should match the HTTP payload's `after` value (passed through scanner).
|
||||||
t.Fatalf("RoadmapRevision: got %q, want %q", job.RoadmapRevision, "abc123def456")
|
if job.RoadmapRevision != after {
|
||||||
|
t.Fatalf("RoadmapRevision: got %q, want %q (HTTP payload `after`)", job.RoadmapRevision, after)
|
||||||
}
|
}
|
||||||
if job.Expected.WorkItemID != "wi-123" {
|
if job.Expected.WorkItemID != "wi-123" {
|
||||||
t.Fatalf("Expected.WorkItemID: got %q, want %q", job.Expected.WorkItemID, "wi-123")
|
t.Fatalf("Expected.WorkItemID: got %q, want %q", job.Expected.WorkItemID, "wi-123")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue