azureblob and fstests - Modify integration tests to include new

optional setting to test SetTier on only few supported tiers.

Remove unused optional interface ListTiers and backend and internal tests
This commit is contained in:
sandeepkru 2018-09-18 05:25:20 -07:00 committed by Nick Craig-Wood
parent e0c5f7ff1b
commit b94d87ae2d
4 changed files with 16 additions and 33 deletions

View file

@ -191,19 +191,6 @@ func validateAccessTier(tier string) bool {
}
}
// validAccessTiers returns list of supported storage tiers on azureblob fs
func validAccessTiers() []string {
validTiers := [...]azblob.AccessTierType{azblob.AccessTierHot, azblob.AccessTierCool,
azblob.AccessTierArchive}
var tiers [len(validTiers)]string
for i, tier := range validTiers {
tiers[i] = string(tier)
}
return tiers[:]
}
// retryErrorCodes is a slice of error codes that we will retry
var retryErrorCodes = []int{
401, // Unauthorized (eg "Token has expired")
@ -321,7 +308,6 @@ func NewFs(name, root string, m configmap.Mapper) (fs.Fs, error) {
BucketBased: true,
SetTier: true,
GetTier: true,
ListTiers: true,
}).Fill(f)
if f.root != "" {
f.root += "/"
@ -1337,11 +1323,6 @@ func (o *Object) GetTier() string {
return string(o.accessTier)
}
// ListTiers returns list of storage tiers supported on this object
func (o *Object) ListTiers() []string {
return validAccessTiers()
}
// Check the interfaces are satisfied
var (
_ fs.Fs = &Fs{}