This commit is contained in:
Mitchell Hashimoto 2014-10-10 14:50:35 -07:00
parent b43cfa3bb0
commit 36f225dea0
13 changed files with 68 additions and 69 deletions

View File

@ -92,7 +92,7 @@ func resource_aws_subnet_destroy(
_, err := ec2conn.DeleteSubnet(s.ID)
return err
}
if err := resource.Retry(10 * time.Second, f); err != nil {
if err := resource.Retry(10*time.Second, f); err != nil {
ec2err, ok := err.(*ec2.Error)
if ok && ec2err.Code == "InvalidSubnetID.NotFound" {
return nil

View File

@ -243,7 +243,7 @@ func TestConfigValidate_varModuleInvalid(t *testing.T) {
}
func TestNameRegexp(t *testing.T) {
cases := []struct{
cases := []struct {
Input string
Match bool
}{

View File

@ -19,7 +19,7 @@ func TestRetry(t *testing.T) {
return fmt.Errorf("error")
}
err := Retry(2 * time.Second, f)
err := Retry(2*time.Second, f)
if err != nil {
t.Fatalf("err: %s", err)
}
@ -32,7 +32,7 @@ func TestRetry_timeout(t *testing.T) {
return fmt.Errorf("always")
}
err := Retry(1 * time.Second, f)
err := Retry(1*time.Second, f)
if err == nil {
t.Fatal("should error")
}

View File

@ -921,4 +921,3 @@ STATE:
<no state>
`

View File

@ -9,7 +9,7 @@ type MockUIOutput struct {
func (o *MockUIOutput) Output(v string) {
o.OutputCalled = true
o.OutputMessage= v
o.OutputMessage = v
if o.OutputFn != nil {
o.OutputFn(v)
}