aboutsummaryrefslogtreecommitdiffstats
path: root/syz-cluster/pkg/reporter
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2025-07-11 13:17:34 +0200
committerAleksandr Nogikh <nogikh@google.com>2025-07-14 11:30:46 +0000
commit76718eb73e3d1e2a43363d80ab15366706b6491f (patch)
tree4d8008f2b7fcfb674e7f8c9562c9cc3643aea50f /syz-cluster/pkg/reporter
parent0bfc1202cebeedf826d470296424f85dee4fe842 (diff)
syz-cluster: generate web dashboard URLs for reports
Take web dashboard URL from the config and use it to generate links for logs, reproducers, etc.
Diffstat (limited to 'syz-cluster/pkg/reporter')
-rw-r--r--syz-cluster/pkg/reporter/api_test.go15
1 files changed, 12 insertions, 3 deletions
diff --git a/syz-cluster/pkg/reporter/api_test.go b/syz-cluster/pkg/reporter/api_test.go
index b7170bc68..279055e5a 100644
--- a/syz-cluster/pkg/reporter/api_test.go
+++ b/syz-cluster/pkg/reporter/api_test.go
@@ -19,7 +19,7 @@ func TestAPIReportFlow(t *testing.T) {
// Create series/session/test/findings.
testSeries := controller.DummySeries()
- controller.FakeSeriesWithFindings(t, ctx, env, client, testSeries)
+ ids := controller.FakeSeriesWithFindings(t, ctx, env, client, testSeries)
generator := NewGenerator(env)
err := generator.Process(ctx, 1)
@@ -35,8 +35,19 @@ func TestAPIReportFlow(t *testing.T) {
// We don't know IDs in advance.
nextResp.Report.ID = ""
nextResp.Report.Series.ID = ""
+ // For URLs, just check if they are in place.
+ for _, finding := range nextResp.Report.Findings {
+ assert.NotEmpty(t, finding.LogURL, "%q's LogURL is empty", finding.Title)
+ finding.LogURL = ""
+ assert.NotEmpty(t, finding.LinkCRepro, "%q's LinkCRepro is empty", finding.Title)
+ finding.LinkCRepro = ""
+ assert.NotEmpty(t, finding.LinkSyzRepro, "%q's LinkSyzRepro is empty", finding.Title)
+ finding.LinkSyzRepro = ""
+ }
+
assert.Equal(t, &api.SessionReport{
Moderation: true,
+ Link: env.URLs.Series(ids.SeriesID),
Series: &api.Series{
ExtID: testSeries.ExtID,
Title: testSeries.Title,
@@ -54,7 +65,6 @@ func TestAPIReportFlow(t *testing.T) {
{
Title: "finding 0",
Report: "report 0",
- LogURL: "TODO", // TODO
Build: api.BuildInfo{
Repo: "mainline",
BaseCommit: "abcd",
@@ -64,7 +74,6 @@ func TestAPIReportFlow(t *testing.T) {
{
Title: "finding 1",
Report: "report 1",
- LogURL: "TODO", // TODO
Build: api.BuildInfo{
Repo: "mainline",
BaseCommit: "abcd",