storj: implement public link

This commit is contained in:
Kaloyan Raev
2023-01-10 17:40:04 +00:00
committed by GitHub
parent 98fa93f6d1
commit 1cafc12e8c
3 changed files with 75 additions and 9 deletions
+4 -2
View File
@@ -1734,8 +1734,10 @@ func Run(t *testing.T, opt *Opt) {
// ensure sub remote isn't empty
buf := bytes.NewBufferString("somecontent")
obji := object.NewStaticObjectInfo("somefile", time.Now(), int64(buf.Len()), true, nil, nil)
_, err = subRemote.Put(ctx, buf, obji)
require.NoError(t, err)
retry(t, "Put", func() error {
_, err := subRemote.Put(ctx, buf, obji)
return err
})
link4, err := wrapPublicLinkFunc(subRemote.Features().PublicLink)(ctx, "", expiry, false)
require.NoError(t, err, "Sharing root in a sub-remote should work")