Skip to content

Commit 843638c

Browse files
committed
dashboard/app: test api CreateUploadURL
1 parent ca9871a commit 843638c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

dashboard/app/api_test.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"context"
88
"slices"
99
"sort"
10+
"strings"
1011
"testing"
1112
"time"
1213

@@ -302,3 +303,18 @@ func TestUpdateReportingPriority(t *testing.T) {
302303
// "0-3", "4-5" have the same priority (repro revoked as no repro).
303304
assert.Equal(t, len(slices.Compact(prios)), len(prios)-4)
304305
}
306+
307+
func TestCreateUploadURL(t *testing.T) {
308+
c := NewCtx(t)
309+
defer c.Close()
310+
311+
c.transformContext = func(c context.Context) context.Context {
312+
newConfig := *getConfig(c)
313+
newConfig.UploadBucket = "blobstorage"
314+
return contextWithConfig(c, &newConfig)
315+
}
316+
317+
url, err := c.client.CreateUploadURL()
318+
assert.Nil(t, err)
319+
assert.True(t, strings.HasPrefix(url, "blobstorage"))
320+
}

0 commit comments

Comments
 (0)