Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielZhangQD committed Dec 13, 2019
1 parent bf30a76 commit 296c6cf
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions pkg/storage/s3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ func (r *testStorageSuite) TestApplyUpdate(c *C) {
u, err := ParseBackend("s3://bucket/prefix/", &BackendOptions{S3: test.options})
s3 := u.GetS3()
c.Assert(err, IsNil)
c.Assert(true, Equals, equalS3(s3, test.s3))
c.Assert(s3, DeepEquals, test.s3)

}
tests := []testcase{
{
Expand Down Expand Up @@ -221,19 +222,6 @@ func (r *testStorageSuite) TestApplyUpdate(c *C) {
}
}

func equalS3(s1, s2 *backup.S3) bool {
return s1.Endpoint == s2.Endpoint &&
s1.Region == s2.Region &&
s1.Bucket == s2.Bucket &&
s1.Prefix == s2.Prefix &&
s1.StorageClass == s2.StorageClass &&
s1.Sse == s2.Sse &&
s1.Acl == s2.Acl &&
s1.AccessKey == s2.AccessKey &&
s1.SecretAccessKey == s2.SecretAccessKey &&
s1.ForcePathStyle == s2.ForcePathStyle
}

func (r *testStorageSuite) TestS3Storage(c *C) {
type testcase struct {
name string
Expand Down

0 comments on commit 296c6cf

Please sign in to comment.