Skip to content

Commit

Permalink
Missed some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tombuildsstuff committed Oct 3, 2017
1 parent 79334bc commit 531ef1e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion azurerm/resource_arm_servicebus_namespace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func testSweepServiceBusNamespace(region string) error {
client := (*armClient).serviceBusNamespacesClient

log.Printf("Retrieving the Servicebus Namespaces..")
results, err := client.ListBySubscription()
results, err := client.List()
if err != nil {
return fmt.Errorf("Error Listing on Servicebus Namespaces: %+v", err)
}
Expand Down
13 changes: 7 additions & 6 deletions azurerm/resource_arm_sql_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ func testSweepSQLServer(region string) error {
name := resourceId.Path["servers"]

log.Printf("Deleting SQL Server '%s' in Resource Group '%s'", name, resourceGroup)
_, err = client.Delete(resourceGroup, name)
_, deleteErr := client.Delete(resourceGroup, name, make(chan struct{}))
err = <-deleteErr
if err != nil {
return err
}
Expand Down Expand Up @@ -194,13 +195,13 @@ func testCheckAzureRMSqlServerDisappears(name string) resource.TestCheckFunc {

client := testAccProvider.Meta().(*ArmClient).sqlServersClient

resp, err := client.Delete(resourceGroup, serverName)
deleteResp, deleteErr := client.Delete(resourceGroup, serverName, make(chan struct{}))
resp := <-deleteResp
err := <-deleteErr
if err != nil {
if utils.ResponseWasNotFound(resp) {
return nil
if !utils.ResponseWasNotFound(resp) {
return fmt.Errorf("Bad: Delete on sqlServersClient: %+v", err)
}

return fmt.Errorf("Bad: Delete on sqlServersClient: %+v", err)
}

return nil
Expand Down

0 comments on commit 531ef1e

Please sign in to comment.