Bump to sdk aws go v2 at release v0.26.0...

Bump dependancies
Refactor / Fix aws to work with sdk-aws-go-v2 at release v0.26.0...
This commit is contained in:
Nicolas JUHEL
2020-09-30 13:04:47 +02:00
parent 47dc7f34ae
commit 94f90d7e22
38 changed files with 706 additions and 749 deletions

View File

@@ -9,28 +9,26 @@ import (
var _ = Describe("Object", func() {
Context("List objects", func() {
It("Must fail with invalid token", func() {
It("Must fail with invalid token -1 ", func() {
_, _, _, err := cli.Object().List("token")
Expect(err).To(HaveOccurred())
})
})
Context("Put object", func() {
It("Must fail as the bucket doesn't exists", func() {
It("Must fail as the bucket doesn't exists - 2", func() {
err := cli.Object().Put("object", bytes.NewReader([]byte("")))
Expect(err).To(HaveOccurred())
})
})
Context("Get object", func() {
It("Must fail as the bucket doesn't exists", func() {
_, c, err := cli.Object().Get("object")
It("Must fail as the bucket doesn't exists - 3", func() {
o, err := cli.Object().Get("object")
defer func() {
for _, s := range c {
if s != nil {
_ = s.Close()
}
if o != nil && o.Body != nil {
_ = o.Body.Close()
}
}()
@@ -39,21 +37,21 @@ var _ = Describe("Object", func() {
})
Context("Delete object", func() {
It("Must fail as the object doesn't exists", func() {
It("Must fail as the object doesn't exists - 4", func() {
err := cli.Object().Delete("object")
Expect(err).To(HaveOccurred())
})
})
Context("Multipart Put object", func() {
It("Must fail as the bucket doesn't exists", func() {
err := cli.Object().MultipartPut("object", bytes.NewReader([]byte("")))
It("Must fail as the bucket doesn't exists - 5", func() {
err := cli.Object().MultipartPut("object", randContent(4*1024))
Expect(err).To(HaveOccurred())
})
})
Context("Delete object", func() {
It("Must fail as the object doesn't exists", func() {
It("Must fail as the object doesn't exists - 6", func() {
err := cli.Object().Delete("object")
Expect(err).To(HaveOccurred())
})