Fix test?

Signed-off-by: Carlisia <carlisiac@vmware.com>
pull/1390/head
Carlisia 2019-04-22 15:22:35 -07:00
parent c7bb288d87
commit c59d03dfb1
No known key found for this signature in database
GPG Key ID: EE2E6F4D2C4B7117
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",