Preserve native diagnostic evidence
This commit is contained in:
@@ -260,7 +260,22 @@ func TestLaterRepairArtifactsUseOrderedProposalIndices(t *testing.T) {
|
||||
}
|
||||
var request structuredoutput.PreparedSnapshot
|
||||
readInteraction(t, attempt.Artifacts.RequestPayloadPath, &request)
|
||||
if !reflect.DeepEqual(&request, captured[i]) {
|
||||
want, err := json.Marshal(captured[i])
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
got, err := json.Marshal(&request)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
var gotValue, wantValue any
|
||||
if err := json.Unmarshal(got, &gotValue); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err := json.Unmarshal(want, &wantValue); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if !reflect.DeepEqual(gotValue, wantValue) {
|
||||
t.Fatalf("request %d did not preserve prepared evidence", i+1)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user