From 1bff705acfe0f0e17a088d4da6060f84db9b99b7 Mon Sep 17 00:00:00 2001 From: DanielZhangQD Date: Fri, 13 Dec 2019 13:55:51 +0800 Subject: [PATCH] address comments --- pkg/storage/s3_test.go | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/pkg/storage/s3_test.go b/pkg/storage/s3_test.go index 15e8a52e0..c84c62031 100644 --- a/pkg/storage/s3_test.go +++ b/pkg/storage/s3_test.go @@ -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{ { @@ -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