From 1318c6aec86c0aed5d3844e52c9e160019fd8833 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sat, 12 Jan 2019 20:41:47 +0000 Subject: [PATCH] s3: Add Alibaba OSS to integration tests and fix storage classes --- backend/s3/s3.go | 10 +++++++--- docs/content/s3.md | 14 ++++++++------ fstest/test_all/config.yaml | 4 ++++ 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/backend/s3/s3.go b/backend/s3/s3.go index 9d1c4f3c5..3093c3dbf 100644 --- a/backend/s3/s3.go +++ b/backend/s3/s3.go @@ -617,17 +617,21 @@ doesn't copy the ACL from the source but rather writes a fresh one.`, Help: "Glacier storage class", }}, }, { + // Mapping from here: https://www.alibabacloud.com/help/doc-detail/64919.htm Name: "storage_class", Help: "The storage class to use when storing new objects in OSS.", Provider: "Alibaba", Examples: []fs.OptionExample{{ - Value: "Standard", + Value: "", + Help: "Default", + }, { + Value: "STANDARD", Help: "Standard storage class", }, { - Value: "Archive", + Value: "GLACIER", Help: "Archive storage mode.", }, { - Value: "IA", + Value: "STANDARD_IA", Help: "Infrequent access storage mode.", }}, }, { diff --git a/docs/content/s3.md b/docs/content/s3.md index 9dd726ac4..26283d82b 100644 --- a/docs/content/s3.md +++ b/docs/content/s3.md @@ -1606,12 +1606,14 @@ acl> 1 The storage class to use when storing new objects in OSS. Enter a string value. Press Enter for the default (""). Choose a number from below, or type in your own value - 1 / Standard storage class - \ "Standard" - 2 / Archive storage mode. - \ "Archive" - 3 / Infrequent access storage mode. - \ "IA" + 1 / Default + \ "" + 2 / Standard storage class + \ "STANDARD" + 3 / Archive storage mode. + \ "GLACIER" + 4 / Infrequent access storage mode. + \ "STANDARD_IA" storage_class> 1 Edit advanced config? (y/n) y) Yes diff --git a/fstest/test_all/config.yaml b/fstest/test_all/config.yaml index 819151863..ff8d1537c 100644 --- a/fstest/test_all/config.yaml +++ b/fstest/test_all/config.yaml @@ -73,6 +73,10 @@ backends: fastlist: true ignore: - TestIntegration/FsMkdir/FsPutFiles/FsCopy + - backend: "s3" + remote: "TestS3Alibaba:" + subdir: true + fastlist: true - backend: "sftp" remote: "TestSftp:" subdir: false