rc: implement operations/publiclink the equivalent of rclone link

Fixes #3042
This commit is contained in:
Nick Craig-Wood
2019-03-11 16:59:27 +00:00
parent 1318be3b0a
commit 2b05bd9a08
3 changed files with 65 additions and 2 deletions

View File

@ -356,3 +356,16 @@ func TestRcSize(t *testing.T) {
"bytes": int64(120),
}, out)
}
// operations/publiclink: Create or retrieve a public link to the given file or folder.
func TestRcPublicLink(t *testing.T) {
r, call := rcNewRun(t, "operations/publiclink")
defer r.Finalise()
in := rc.Params{
"fs": r.FremoteName,
"remote": "",
}
_, err := call.Fn(in)
require.Error(t, err)
assert.Contains(t, err.Error(), "doesn't support public links")
}