Merge pull request #5439 from evandbrown/pubsub
provider/google: Fix Pubsub acceptance tests
This commit is contained in:
commit
8d31c93862
|
@ -34,8 +34,8 @@ func testAccCheckPubsubSubscriptionDestroy(s *terraform.State) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
config := testAccProvider.Meta().(*Config)
|
config := testAccProvider.Meta().(*Config)
|
||||||
_, err := config.clientPubsub.Projects.Subscriptions.Get(rs.Primary.ID).Do()
|
sub, _ := config.clientPubsub.Projects.Subscriptions.Get(rs.Primary.ID).Do()
|
||||||
if err != nil {
|
if sub != nil {
|
||||||
return fmt.Errorf("Subscription still present")
|
return fmt.Errorf("Subscription still present")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ func testAccPubsubSubscriptionExists(n string) resource.TestCheckFunc {
|
||||||
config := testAccProvider.Meta().(*Config)
|
config := testAccProvider.Meta().(*Config)
|
||||||
_, err := config.clientPubsub.Projects.Subscriptions.Get(rs.Primary.ID).Do()
|
_, err := config.clientPubsub.Projects.Subscriptions.Get(rs.Primary.ID).Do()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("Subscription still present")
|
return fmt.Errorf("Subscription does not exist")
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
|
@ -34,8 +34,8 @@ func testAccCheckPubsubTopicDestroy(s *terraform.State) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
config := testAccProvider.Meta().(*Config)
|
config := testAccProvider.Meta().(*Config)
|
||||||
_, err := config.clientPubsub.Projects.Topics.Get(rs.Primary.ID).Do()
|
topic, _ := config.clientPubsub.Projects.Topics.Get(rs.Primary.ID).Do()
|
||||||
if err != nil {
|
if topic != nil {
|
||||||
return fmt.Errorf("Topic still present")
|
return fmt.Errorf("Topic still present")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ func testAccPubsubTopicExists(n string) resource.TestCheckFunc {
|
||||||
config := testAccProvider.Meta().(*Config)
|
config := testAccProvider.Meta().(*Config)
|
||||||
_, err := config.clientPubsub.Projects.Topics.Get(rs.Primary.ID).Do()
|
_, err := config.clientPubsub.Projects.Topics.Get(rs.Primary.ID).Do()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("Topic still present")
|
return fmt.Errorf("Topic does not exist")
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue