Fix test?

Signed-off-by: Carlisia <carlisiac@vmware.com>
This commit is contained in:
Carlisia
2019-04-22 15:22:35 -07:00
parent c7bb288d87
commit c59d03dfb1
2 changed files with 4 additions and 2 deletions

View File

@@ -54,8 +54,8 @@ type s3Interface interface {
type ObjectStore struct {
log logrus.FieldLogger
s3 *s3.S3
preSignS3 *s3.S3
s3 s3Interface
preSignS3 s3Interface
s3Uploader *s3manager.Uploader
kmsKeyID string
signatureVersion string
@@ -203,6 +203,7 @@ func (o *ObjectStore) PutObject(bucket, key string, body io.Reader) error {
const notFoundCode = "NotFound"
// ObjectExists checks if there is an object with the given key in the object storage bucket.
func (o *ObjectStore) ObjectExists(bucket, key string) (bool, error) {
log := o.log.WithFields(
logrus.Fields{

View File

@@ -82,6 +82,7 @@ func TestObjectExists(t *testing.T) {
name: "doesn't exist",
errorResponse: awserr.New(s3.ErrCodeNoSuchKey, "no such key", nil),
expectedExists: false,
expectedError: "NoSuchKey: no such key",
},
{
name: "error checking for existence",