Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for directory creation in ADLS accounts #28

Merged

Conversation

stuartleeks
Copy link
Contributor

Initial implementation of Path API (for directory creation) to support hashicorp/terraform-provider-azurerm#7118

@stuartleeks
Copy link
Contributor Author

Added ACL support

Copy link
Owner

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@tombuildsstuff
Copy link
Owner

Unfortunately Travis is missing from this repository - something I'd been meaning to fix (opened #29 to track)

Running the tests for this locally it appears that a couple of the test files needed updating - so I've pushed a commit to fix this, I hope you don't mind - and these now pass:

$ envchain azurerm go test -v ./storage/2018-11-09/datalakestore/paths/ -timeout=90m
=== RUN   TestCreateDirectory
2020/07/07 12:37:26 Testing if Service Principal / Client Certificate is applicable for Authentication..
2020/07/07 12:37:26 Testing if Service Principal / Client Secret is applicable for Authentication..
2020/07/07 12:37:26 Using Service Principal / Client Secret for Authentication
    TestCreateDirectory: create_test.go:33: [DEBUG] Creating an empty File System..
    TestCreateDirectory: create_test.go:41: [DEBUG] Creating path..
    TestCreateDirectory: create_test.go:53: [DEBUG] Deleting File System..
--- PASS: TestCreateDirectory (74.04s)
=== RUN   TestLifecycle
2020/07/07 12:38:40 Testing if Service Principal / Client Certificate is applicable for Authentication..
2020/07/07 12:38:40 Testing if Service Principal / Client Secret is applicable for Authentication..
2020/07/07 12:38:40 Using Service Principal / Client Secret for Authentication
    TestLifecycle: lifecycle_test.go:37: [DEBUG] Creating an empty File System..
    TestLifecycle: lifecycle_test.go:43: [DEBUG] Creating folder 'test' ..
    TestLifecycle: lifecycle_test.go:51: [DEBUG] Getting properties for folder 'test' ..
    TestLifecycle: lifecycle_test.go:56: [DEBUG] Props.Owner: "3aa04c8c-5a75-4e5e-9117-1b7cf6f33e21"
    TestLifecycle: lifecycle_test.go:57: [DEBUG] Props.Group: "3aa04c8c-5a75-4e5e-9117-1b7cf6f33e21"
    TestLifecycle: lifecycle_test.go:58: [DEBUG] Props.ACL: "user::rwx,group::r-x,other::---"
    TestLifecycle: lifecycle_test.go:59: [DEBUG] Props.ETag: "\"0x8D82261F941D612\""
    TestLifecycle: lifecycle_test.go:60: [DEBUG] Props.LastModified: "2020-07-07 10:39:06 +0000 GMT"
    TestLifecycle: lifecycle_test.go:69: [DEBUG] Setting Access Control for folder 'test' ..
    TestLifecycle: lifecycle_test.go:74: [DEBUG] Getting properties for folder 'test' (2) ..
    TestLifecycle: lifecycle_test.go:83: [DEBUG] Deleting File System..
--- PASS: TestLifecycle (73.27s)
=== RUN   TestGetResourceID
    TestGetResourceID: resource_id_test.go:36: [DEBUG] Testing Path "test"
    TestGetResourceID: resource_id_test.go:36: [DEBUG] Testing Path "test/test2"
    TestGetResourceID: resource_id_test.go:36: [DEBUG] Testing Path ""
--- PASS: TestGetResourceID (0.00s)
=== RUN   TestParseResourceID
    TestParseResourceID: resource_id_test.go:72: [DEBUG] Testing Path "test"
    TestParseResourceID: resource_id_test.go:72: [DEBUG] Testing Path "test/test2"
    TestParseResourceID: resource_id_test.go:72: [DEBUG] Testing Path ""
--- PASS: TestParseResourceID (0.00s)
PASS
ok  	github.com/tombuildsstuff/giovanni/storage/2018-11-09/datalakestore/paths

@tombuildsstuff tombuildsstuff merged commit 4a3064f into tombuildsstuff:master Jul 7, 2020
@stuartleeks
Copy link
Contributor Author

Thanks @tombuildsstuff. Do you have any plans to make a new release? Would love to update the azurerm PR to pull from this repo rather than my local changes :-)

@tombuildsstuff
Copy link
Owner

@stuartleeks yes - just trying to get #27 in at the same time :)

@tombuildsstuff tombuildsstuff added this to the v0.11.0 milestone Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants