update tests so go vet is happy

This commit is contained in:
Clint Shryock 2015-05-07 10:03:28 -05:00
parent 28875f49cd
commit fed42fe1b3
2 changed files with 8 additions and 5 deletions

View File

@ -213,7 +213,7 @@ func resourceAwsS3BucketWebsitePut(s3conn *s3.S3, d *schema.ResourceData, websit
WebsiteConfiguration: websiteConfiguration, WebsiteConfiguration: websiteConfiguration,
} }
log.Printf("[DEBUG] S3 put bucket website: %s", putInput) log.Printf("[DEBUG] S3 put bucket website: %#v", putInput)
_, err := s3conn.PutBucketWebsite(putInput) _, err := s3conn.PutBucketWebsite(putInput)
if err != nil { if err != nil {
@ -227,7 +227,7 @@ func resourceAwsS3BucketWebsiteDelete(s3conn *s3.S3, d *schema.ResourceData) err
bucket := d.Get("bucket").(string) bucket := d.Get("bucket").(string)
deleteInput := &s3.DeleteBucketWebsiteInput{Bucket: aws.String(bucket)} deleteInput := &s3.DeleteBucketWebsiteInput{Bucket: aws.String(bucket)}
log.Printf("[DEBUG] S3 delete bucket website: %s", deleteInput) log.Printf("[DEBUG] S3 delete bucket website: %#v", deleteInput)
_, err := s3conn.DeleteBucketWebsite(deleteInput) _, err := s3conn.DeleteBucketWebsite(deleteInput)
if err != nil { if err != nil {

View File

@ -131,16 +131,19 @@ func testAccCheckAWSS3BucketWebsite(n string, indexDoc string, errorDoc string)
} }
if *out.IndexDocument.Suffix != indexDoc { if *out.IndexDocument.Suffix != indexDoc {
return fmt.Errorf("bad: %s", out.IndexDocument) if out.IndexDocument.Suffix != nil {
return fmt.Errorf("bad index document suffix: %s", *out.IndexDocument.Suffix)
}
return fmt.Errorf("bad index document suffix, is nil")
} }
if v := out.ErrorDocument; v == nil { if v := out.ErrorDocument; v == nil {
if errorDoc != "" { if errorDoc != "" {
return fmt.Errorf("bad: %s", out.ErrorDocument) return fmt.Errorf("bad error doc, found nil, expected: %s", errorDoc)
} }
} else { } else {
if *v.Key != errorDoc { if *v.Key != errorDoc {
return fmt.Errorf("bad: %s", out.ErrorDocument) return fmt.Errorf("bad error doc, expected: %s, got %#v", errorDoc, out.ErrorDocument)
} }
} }