This commit is contained in:
Mitchell Hashimoto 2015-06-23 22:31:24 -07:00
parent 823a9fa878
commit cddd54c3de
13 changed files with 60 additions and 67 deletions

View File

@ -5,10 +5,10 @@ import (
"testing"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/service/sns"
"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/terraform"
"github.com/aws/aws-sdk-go/aws/awserr"
)
func TestAccAWSSNSTopicSubscription_basic(t *testing.T) {
@ -28,7 +28,6 @@ func TestAccAWSSNSTopicSubscription_basic(t *testing.T) {
})
}
func testAccCheckAWSSNSTopicSubscriptionDestroy(s *terraform.State) error {
conn := testAccProvider.Meta().(*AWSClient).snsconn
@ -42,7 +41,6 @@ func testAccCheckAWSSNSTopicSubscriptionDestroy(s *terraform.State) error {
SubscriptionARN: aws.String(rs.Primary.ID),
}
_, err := conn.GetSubscriptionAttributes(req)
if err == nil {
@ -59,7 +57,6 @@ func testAccCheckAWSSNSTopicSubscriptionDestroy(s *terraform.State) error {
return nil
}
func testAccCheckAWSSNSTopicSubscriptionExists(n string) resource.TestCheckFunc {
return func(s *terraform.State) error {
rs, ok := s.RootModule().Resources[n]

View File

@ -5,10 +5,10 @@ import (
"testing"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/service/sns"
"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/terraform"
"github.com/aws/aws-sdk-go/aws/awserr"
)
func TestAccAWSSNSTopic_basic(t *testing.T) {
@ -27,7 +27,6 @@ func TestAccAWSSNSTopic_basic(t *testing.T) {
})
}
func testAccCheckAWSSNSTopicDestroy(s *terraform.State) error {
conn := testAccProvider.Meta().(*AWSClient).snsconn
@ -55,7 +54,6 @@ func testAccCheckAWSSNSTopicDestroy(s *terraform.State) error {
return nil
}
func testAccCheckAWSSNSTopicExists(n string) resource.TestCheckFunc {
return func(s *terraform.State) error {
rs, ok := s.RootModule().Resources[n]

View File

@ -13,8 +13,8 @@ import (
"golang.org/x/oauth2"
"golang.org/x/oauth2/google"
"golang.org/x/oauth2/jwt"
"google.golang.org/api/compute/v1"
computeBeta "google.golang.org/api/compute/v0.beta"
"google.golang.org/api/compute/v1"
"google.golang.org/api/dns/v1"
"google.golang.org/api/storage/v1"
)

View File

@ -327,7 +327,7 @@ func resourceComputeInstanceCreate(d *schema.ResourceData, meta interface{}) err
disk.Source = diskData.SelfLink
} else {
// Create a new disk
disk.InitializeParams = &compute.AttachedDiskInitializeParams{ }
disk.InitializeParams = &compute.AttachedDiskInitializeParams{}
}
if v, ok := d.GetOk(prefix + ".scratch"); ok {

View File

@ -127,7 +127,6 @@ func migrateStateV1toV2(is *terraform.InstanceState) (*terraform.InstanceState,
delete(is.Attributes, k)
}
for service_acct_index, newScopes := range newScopesMap {
for _, newScope := range newScopes {
hash := hashcode.String(canonicalizeServiceScope(newScope))

View File

@ -61,8 +61,8 @@ func resourceDnsRecordSetCreate(d *schema.ResourceData, meta interface{}) error
// Build the change
chg := &dns.Change{
Additions: []*dns.ResourceRecordSet {
&dns.ResourceRecordSet {
Additions: []*dns.ResourceRecordSet{
&dns.ResourceRecordSet{
Name: d.Get("name").(string),
Type: d.Get("type").(string),
Ttl: int64(d.Get("ttl").(int)),
@ -71,7 +71,7 @@ func resourceDnsRecordSetCreate(d *schema.ResourceData, meta interface{}) error
},
}
for i := 0; i < rrdatasCount ; i++ {
for i := 0; i < rrdatasCount; i++ {
rrdata := fmt.Sprintf("rrdatas.%d", i)
chg.Additions[0].Rrdatas[i] = d.Get(rrdata).(string)
}
@ -126,7 +126,6 @@ func resourceDnsRecordSetRead(d *schema.ResourceData, meta interface{}) error {
return fmt.Errorf("Only expected 1 record set, got %d", len(resp.Rrsets))
}
d.Set("ttl", resp.Rrsets[0].Ttl)
d.Set("rrdatas", resp.Rrsets[0].Rrdatas)
@ -142,8 +141,8 @@ func resourceDnsRecordSetDelete(d *schema.ResourceData, meta interface{}) error
// Build the change
chg := &dns.Change{
Deletions: []*dns.ResourceRecordSet {
&dns.ResourceRecordSet {
Deletions: []*dns.ResourceRecordSet{
&dns.ResourceRecordSet{
Name: d.Get("name").(string),
Type: d.Get("type").(string),
Ttl: int64(d.Get("ttl").(int)),
@ -152,7 +151,7 @@ func resourceDnsRecordSetDelete(d *schema.ResourceData, meta interface{}) error
},
}
for i := 0; i < rrdatasCount ; i++ {
for i := 0; i < rrdatasCount; i++ {
rrdata := fmt.Sprintf("rrdatas.%d", i)
chg.Deletions[0].Rrdatas[i] = d.Get(rrdata).(string)
}

View File

@ -2,8 +2,8 @@ package remote
import (
"net/http"
"testing"
"os"
"testing"
)
func TestSwiftClient_impl(t *testing.T) {