1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

fs: add --metadata-set flag to specify metadata for uploads

This commit is contained in:
Nick Craig-Wood
2022-05-24 15:46:07 +01:00
parent 0652ec95db
commit c4451bc43a
8 changed files with 173 additions and 1 deletions

View File

@@ -132,6 +132,16 @@ func TestNullOption(t *testing.T) {
assert.Equal(t, false, opt.Mandatory())
}
func TestMetadataOption(t *testing.T) {
opt := MetadataOption{"onion": "ice cream"}
var _ OpenOption = opt // check interface
assert.Equal(t, "MetadataOption(map[onion:ice cream])", opt.String())
key, value := opt.Header()
assert.Equal(t, "", key)
assert.Equal(t, "", value)
assert.Equal(t, false, opt.Mandatory())
}
func TestFixRangeOptions(t *testing.T) {
for _, test := range []struct {
name string