Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoreni committed Sep 28, 2018
1 parent 1ea7cda commit ea1e963
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions aws/resource_aws_pinpoint_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,10 +369,10 @@ func flattenPinpointQuietTime(qt *pinpoint.QuietTime) []interface{} {
m := map[string]interface{}{}

if qt.End != nil {
m["end"] = qt.End
m["end"] = *qt.End
}
if qt.Start != nil {
m["start"] = qt.Start
m["start"] = *qt.Start
}

if len(m) <= 0 {
Expand Down
9 changes: 5 additions & 4 deletions aws/resource_aws_pinpoint_app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package aws

import (
"fmt"
"github.com/aws/aws-sdk-go/service/pinpoint"
"testing"

"github.com/aws/aws-sdk-go/service/pinpoint"

"github.com/aws/aws-sdk-go/aws"
"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/terraform"
Expand Down Expand Up @@ -45,7 +46,7 @@ func TestAccAWSPinpointApp_CampaignHookLambda(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testAccCheckAWSPinpointAppExists(resourceName, attributes),
resource.TestCheckResourceAttr(resourceName, "campaign_hook.#", "1"),
resource.TestCheckResourceAttr(resourceName, "campaign_hook.4129384237.mode", "DELIVERY"),
resource.TestCheckResourceAttr(resourceName, "campaign_hook.0.mode", "DELIVERY"),
resource.TestCheckResourceAttr(resourceName, "limits.#", "0"),
resource.TestCheckResourceAttr(resourceName, "quiet_time.#", "0"),
),
Expand All @@ -69,7 +70,7 @@ func TestAccAWSPinpointApp_Limits(t *testing.T) {
testAccCheckAWSPinpointAppExists(resourceName, attributes),
resource.TestCheckResourceAttr(resourceName, "campaign_hook.#", "0"),
resource.TestCheckResourceAttr(resourceName, "limits.#", "1"),
resource.TestCheckResourceAttr(resourceName, "limits.1765820463.total", "500"),
resource.TestCheckResourceAttr(resourceName, "limits.0.total", "500"),
resource.TestCheckResourceAttr(resourceName, "quiet_time.#", "0"),
),
},
Expand All @@ -93,7 +94,7 @@ func TestAccAWSPinpointApp_QuietTime(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "campaign_hook.#", "0"),
resource.TestCheckResourceAttr(resourceName, "limits.#", "0"),
resource.TestCheckResourceAttr(resourceName, "quiet_time.#", "1"),
resource.TestCheckResourceAttr(resourceName, "quiet_time.537668748.start", "00:00"),
resource.TestCheckResourceAttr(resourceName, "quiet_time.0.start", "00:00"),
),
},
},
Expand Down

0 comments on commit ea1e963

Please sign in to comment.