Skip to content

Commit

Permalink
fix: Fix "post-test destroy" error
Browse files Browse the repository at this point in the history
  • Loading branch information
vaerh committed Mar 4, 2023
1 parent 6cd7d9f commit 38e79a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion routeros/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,9 @@ func testCheckResourceDestroy(resourcePath, resourceType string) resource.TestCh
return fmt.Errorf("resource %v %s has been found", resourceType, id)
}
case TransportREST:
// Escaping spaces!
req, err := http.NewRequest("GET",
fmt.Sprintf("%s/rest%s?%s=%s", cRest.HostURL, resourcePath, idName, id), nil)
fmt.Sprintf("%s/rest%s?%s=%s", cRest.HostURL, resourcePath, idName, strings.Replace(id, " ", "%20", -1)), nil)
if err != nil {
return err
}
Expand Down

0 comments on commit 38e79a4

Please sign in to comment.