forked from TrueCloudLab/distribution
Don't check returned storage class if we use NONE
If we haven't set a storage class there's no point in checking the storage class applied to the object - s3 will choose one. Signed-off-by: James Hewitt <james.hewitt@uk.ibm.com>
This commit is contained in:
parent
2d316a12d3
commit
6ceb904c3e
1 changed files with 3 additions and 1 deletions
|
@ -229,7 +229,9 @@ func TestStorageClass(t *testing.T) {
|
||||||
}
|
}
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
// Amazon only populates this header value for non-standard storage classes
|
// Amazon only populates this header value for non-standard storage classes
|
||||||
if storageClass == s3.StorageClassStandard && resp.StorageClass != nil {
|
if storageClass == noStorageClass {
|
||||||
|
// We haven't specified a storage class so we can't confirm what it is
|
||||||
|
} else if storageClass == s3.StorageClassStandard && resp.StorageClass != nil {
|
||||||
t.Fatalf(
|
t.Fatalf(
|
||||||
"unexpected response storage class for file with storage class %v: %v",
|
"unexpected response storage class for file with storage class %v: %v",
|
||||||
storageClass,
|
storageClass,
|
||||||
|
|
Loading…
Reference in a new issue