diff --git a/storage/2018-11-09/datalakestore/paths/delete.go b/storage/2018-11-09/datalakestore/paths/delete.go index e5e2d57..078be57 100644 --- a/storage/2018-11-09/datalakestore/paths/delete.go +++ b/storage/2018-11-09/datalakestore/paths/delete.go @@ -73,7 +73,7 @@ func (client Client) DeleteResponder(resp *http.Response) (result autorest.Respo err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusAccepted), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result = autorest.Response{Response: resp} diff --git a/storage/2018-11-09/datalakestore/paths/lifecycle_test.go b/storage/2018-11-09/datalakestore/paths/lifecycle_test.go index 2d6c448..18f9a66 100644 --- a/storage/2018-11-09/datalakestore/paths/lifecycle_test.go +++ b/storage/2018-11-09/datalakestore/paths/lifecycle_test.go @@ -80,8 +80,19 @@ func TestLifecycle(t *testing.T) { t.Fatal(fmt.Errorf("Expected new ACL %q, got %q", newACL, props.ACL)) } + t.Logf("[DEBUG] Deleting path 'test' ..") + if _, err = pathsClient.Delete(ctx, accountName, fileSystemName, path); err != nil { + t.Fatal(fmt.Errorf("Error deleting path: %s", err)) + } + + t.Logf("[DEBUG] Getting properties for folder 'test' (3) ..") + props, err = pathsClient.GetProperties(ctx, accountName, fileSystemName, path, GetPropertiesActionGetAccessControl) + if err == nil { + t.Fatal(fmt.Errorf("Didn't get error getting properties after deleting path (3)")) + } + t.Logf("[DEBUG] Deleting File System..") if _, err := fileSystemsClient.Delete(ctx, accountName, fileSystemName); err != nil { - t.Fatalf("Error deleting: %s", err) + t.Fatalf("Error deleting filesystem: %s", err) } } diff --git a/storage/2018-11-09/datalakestore/paths/properties_get.go b/storage/2018-11-09/datalakestore/paths/properties_get.go index 9120d72..263dc53 100644 --- a/storage/2018-11-09/datalakestore/paths/properties_get.go +++ b/storage/2018-11-09/datalakestore/paths/properties_get.go @@ -130,5 +130,5 @@ func (client Client) GetPropertiesResponder(resp *http.Response) (result GetProp autorest.ByClosing()) result.Response = autorest.Response{Response: resp} - return result, nil + return result, err }