fmt
This commit is contained in:
parent
823a9fa878
commit
cddd54c3de
|
@ -5,10 +5,10 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"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/aws/aws-sdk-go/service/sns"
|
||||||
"github.com/hashicorp/terraform/helper/resource"
|
"github.com/hashicorp/terraform/helper/resource"
|
||||||
"github.com/hashicorp/terraform/terraform"
|
"github.com/hashicorp/terraform/terraform"
|
||||||
"github.com/aws/aws-sdk-go/aws/awserr"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAccAWSSNSTopicSubscription_basic(t *testing.T) {
|
func TestAccAWSSNSTopicSubscription_basic(t *testing.T) {
|
||||||
|
@ -28,7 +28,6 @@ func TestAccAWSSNSTopicSubscription_basic(t *testing.T) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func testAccCheckAWSSNSTopicSubscriptionDestroy(s *terraform.State) error {
|
func testAccCheckAWSSNSTopicSubscriptionDestroy(s *terraform.State) error {
|
||||||
conn := testAccProvider.Meta().(*AWSClient).snsconn
|
conn := testAccProvider.Meta().(*AWSClient).snsconn
|
||||||
|
|
||||||
|
@ -42,7 +41,6 @@ func testAccCheckAWSSNSTopicSubscriptionDestroy(s *terraform.State) error {
|
||||||
SubscriptionARN: aws.String(rs.Primary.ID),
|
SubscriptionARN: aws.String(rs.Primary.ID),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
_, err := conn.GetSubscriptionAttributes(req)
|
_, err := conn.GetSubscriptionAttributes(req)
|
||||||
|
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
@ -59,7 +57,6 @@ func testAccCheckAWSSNSTopicSubscriptionDestroy(s *terraform.State) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func testAccCheckAWSSNSTopicSubscriptionExists(n string) resource.TestCheckFunc {
|
func testAccCheckAWSSNSTopicSubscriptionExists(n string) resource.TestCheckFunc {
|
||||||
return func(s *terraform.State) error {
|
return func(s *terraform.State) error {
|
||||||
rs, ok := s.RootModule().Resources[n]
|
rs, ok := s.RootModule().Resources[n]
|
||||||
|
|
|
@ -5,10 +5,10 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"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/aws/aws-sdk-go/service/sns"
|
||||||
"github.com/hashicorp/terraform/helper/resource"
|
"github.com/hashicorp/terraform/helper/resource"
|
||||||
"github.com/hashicorp/terraform/terraform"
|
"github.com/hashicorp/terraform/terraform"
|
||||||
"github.com/aws/aws-sdk-go/aws/awserr"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAccAWSSNSTopic_basic(t *testing.T) {
|
func TestAccAWSSNSTopic_basic(t *testing.T) {
|
||||||
|
@ -27,7 +27,6 @@ func TestAccAWSSNSTopic_basic(t *testing.T) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func testAccCheckAWSSNSTopicDestroy(s *terraform.State) error {
|
func testAccCheckAWSSNSTopicDestroy(s *terraform.State) error {
|
||||||
conn := testAccProvider.Meta().(*AWSClient).snsconn
|
conn := testAccProvider.Meta().(*AWSClient).snsconn
|
||||||
|
|
||||||
|
@ -55,7 +54,6 @@ func testAccCheckAWSSNSTopicDestroy(s *terraform.State) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func testAccCheckAWSSNSTopicExists(n string) resource.TestCheckFunc {
|
func testAccCheckAWSSNSTopicExists(n string) resource.TestCheckFunc {
|
||||||
return func(s *terraform.State) error {
|
return func(s *terraform.State) error {
|
||||||
rs, ok := s.RootModule().Resources[n]
|
rs, ok := s.RootModule().Resources[n]
|
||||||
|
|
|
@ -13,8 +13,8 @@ import (
|
||||||
"golang.org/x/oauth2"
|
"golang.org/x/oauth2"
|
||||||
"golang.org/x/oauth2/google"
|
"golang.org/x/oauth2/google"
|
||||||
"golang.org/x/oauth2/jwt"
|
"golang.org/x/oauth2/jwt"
|
||||||
"google.golang.org/api/compute/v1"
|
|
||||||
computeBeta "google.golang.org/api/compute/v0.beta"
|
computeBeta "google.golang.org/api/compute/v0.beta"
|
||||||
|
"google.golang.org/api/compute/v1"
|
||||||
"google.golang.org/api/dns/v1"
|
"google.golang.org/api/dns/v1"
|
||||||
"google.golang.org/api/storage/v1"
|
"google.golang.org/api/storage/v1"
|
||||||
)
|
)
|
||||||
|
|
|
@ -327,7 +327,7 @@ func resourceComputeInstanceCreate(d *schema.ResourceData, meta interface{}) err
|
||||||
disk.Source = diskData.SelfLink
|
disk.Source = diskData.SelfLink
|
||||||
} else {
|
} else {
|
||||||
// Create a new disk
|
// Create a new disk
|
||||||
disk.InitializeParams = &compute.AttachedDiskInitializeParams{ }
|
disk.InitializeParams = &compute.AttachedDiskInitializeParams{}
|
||||||
}
|
}
|
||||||
|
|
||||||
if v, ok := d.GetOk(prefix + ".scratch"); ok {
|
if v, ok := d.GetOk(prefix + ".scratch"); ok {
|
||||||
|
|
|
@ -127,7 +127,6 @@ func migrateStateV1toV2(is *terraform.InstanceState) (*terraform.InstanceState,
|
||||||
delete(is.Attributes, k)
|
delete(is.Attributes, k)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for service_acct_index, newScopes := range newScopesMap {
|
for service_acct_index, newScopes := range newScopesMap {
|
||||||
for _, newScope := range newScopes {
|
for _, newScope := range newScopes {
|
||||||
hash := hashcode.String(canonicalizeServiceScope(newScope))
|
hash := hashcode.String(canonicalizeServiceScope(newScope))
|
||||||
|
|
|
@ -61,8 +61,8 @@ func resourceDnsRecordSetCreate(d *schema.ResourceData, meta interface{}) error
|
||||||
|
|
||||||
// Build the change
|
// Build the change
|
||||||
chg := &dns.Change{
|
chg := &dns.Change{
|
||||||
Additions: []*dns.ResourceRecordSet {
|
Additions: []*dns.ResourceRecordSet{
|
||||||
&dns.ResourceRecordSet {
|
&dns.ResourceRecordSet{
|
||||||
Name: d.Get("name").(string),
|
Name: d.Get("name").(string),
|
||||||
Type: d.Get("type").(string),
|
Type: d.Get("type").(string),
|
||||||
Ttl: int64(d.Get("ttl").(int)),
|
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)
|
rrdata := fmt.Sprintf("rrdatas.%d", i)
|
||||||
chg.Additions[0].Rrdatas[i] = d.Get(rrdata).(string)
|
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))
|
return fmt.Errorf("Only expected 1 record set, got %d", len(resp.Rrsets))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
d.Set("ttl", resp.Rrsets[0].Ttl)
|
d.Set("ttl", resp.Rrsets[0].Ttl)
|
||||||
d.Set("rrdatas", resp.Rrsets[0].Rrdatas)
|
d.Set("rrdatas", resp.Rrsets[0].Rrdatas)
|
||||||
|
|
||||||
|
@ -142,8 +141,8 @@ func resourceDnsRecordSetDelete(d *schema.ResourceData, meta interface{}) error
|
||||||
|
|
||||||
// Build the change
|
// Build the change
|
||||||
chg := &dns.Change{
|
chg := &dns.Change{
|
||||||
Deletions: []*dns.ResourceRecordSet {
|
Deletions: []*dns.ResourceRecordSet{
|
||||||
&dns.ResourceRecordSet {
|
&dns.ResourceRecordSet{
|
||||||
Name: d.Get("name").(string),
|
Name: d.Get("name").(string),
|
||||||
Type: d.Get("type").(string),
|
Type: d.Get("type").(string),
|
||||||
Ttl: int64(d.Get("ttl").(int)),
|
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)
|
rrdata := fmt.Sprintf("rrdatas.%d", i)
|
||||||
chg.Deletions[0].Rrdatas[i] = d.Get(rrdata).(string)
|
chg.Deletions[0].Rrdatas[i] = d.Get(rrdata).(string)
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,8 +2,8 @@ package remote
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"testing"
|
|
||||||
"os"
|
"os"
|
||||||
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSwiftClient_impl(t *testing.T) {
|
func TestSwiftClient_impl(t *testing.T) {
|
||||||
|
|
Loading…
Reference in New Issue