diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2024-04-15 14:16:17 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2024-04-15 12:52:00 +0000 |
| commit | fdcfb1aa92efe1cbbc097e50b0f56b1ca3f7d741 (patch) | |
| tree | 3ce20a682ea0fb91c96e82d045552e4d1ecad8d0 /dashboard/app/getjson_test.go | |
| parent | b9af7e61fec27039b365f0ce8ec03fbccd2c6d6a (diff) | |
dashboard: include fix commits into terminal page JSONs
There's little sense to make users query that information in separate
queries when we already have it available.
Diffstat (limited to 'dashboard/app/getjson_test.go')
| -rw-r--r-- | dashboard/app/getjson_test.go | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/dashboard/app/getjson_test.go b/dashboard/app/getjson_test.go index 03ad24682..ebf943438 100644 --- a/dashboard/app/getjson_test.go +++ b/dashboard/app/getjson_test.go @@ -63,7 +63,24 @@ func TestJSONAPIIntegration(t *testing.T) { sampleFixedBugGroupDescr := []byte(`{ "version": 1, - "Bugs": null + "Bugs": [ + { + "title": "title2", + "link": "/bug?extid=0267d1c87b9ed4eb5def", + "fix-commits": [ + { + "title": "foo: fix1", + "repo": "git://syzkaller.org", + "branch": "branch10" + }, + { + "title": "foo: fix2", + "repo": "git://syzkaller.org", + "branch": "branch10" + } + ] + } + ] }`) c := NewCtx(t) @@ -85,6 +102,13 @@ func TestJSONAPIIntegration(t *testing.T) { checkBugPageJSONIs(c, bugReport2.ID, sampleCrashWithReproDescr) checkBugGroupPageJSONIs(c, "/test1?json=1", sampleOpenBugGroupDescr) + + c.client.ReportingUpdate(&dashapi.BugUpdate{ + ID: bugReport2.ID, + Status: dashapi.BugStatusOpen, + FixCommits: []string{"foo: fix1", "foo: fix2"}, + }) + checkBugGroupPageJSONIs(c, "/test1/fixed?json=1", sampleFixedBugGroupDescr) } |
