@@ -415,7 +415,10 @@ function Test-DataLakeStoreFileSystem
415415 $movefolder = " /adlspstestmovefolder"
416416 $importFile = " $folderToCreate /importfile.txt"
417417 $content = " Test file content! @ Azure PsTest01?"
418-
418+ $summaryFolder = " /adlspstestsummaryfolder"
419+ $subFolderToCreate = " $summaryFolder /Folder0"
420+ $subSubFolderToCreate = " $summaryFolder /Folder0/SubFolder0"
421+ $subFileToCreate = " $summaryFolder /File0"
419422
420423 # Create and get Empty folder
421424 $result = New-AzureRMDataLakeStoreItem - Account $accountName - path $folderToCreate - Folder
@@ -525,7 +528,6 @@ function Test-DataLakeStoreFileSystem
525528 Export-AzureRMDataLakeStoreItem - Account $accountName - Path $concatFile - Destination $targetFile
526529 $downloadedFileInfo = Get-ChildItem $targetFile
527530 Assert-AreEqual $ ($content.length * 2 ) $downloadedFileInfo.length
528- Remove-Item - path $targetFile - force - confirm:$false
529531
530532 # move a file
531533 $result = Move-AzureRMDataLakeStoreItem - Account $accountName - Path $concatFile - Destination $moveFile
@@ -544,14 +546,37 @@ function Test-DataLakeStoreFileSystem
544546 Assert-AreEqual " Directory" $result.Type
545547 Assert-AreEqual 0 $result.Length
546548 Assert-Throws {Get-AzureRMDataLakeStoreItem - Account $accountName - path $folderToCreate }
547-
549+
550+ # getcontentsummary
551+ $result = New-AzureRMDataLakeStoreItem - Account $accountName - path $summaryFolder - Folder
552+ Assert-NotNull $result " No value was returned on folder creation"
553+ $result = New-AzureRMDataLakeStoreItem - Account $accountName - path $subFolderToCreate - Folder
554+ Assert-NotNull $result " No value was returned on folder creation"
555+ $result = New-AzureRMDataLakeStoreItem - Account $accountName - path $subSubFolderToCreate - Folder
556+ Assert-NotNull $result " No value was returned on folder creation"
557+ New-AzureRMDataLakeStoreItem - Account $accountName - Path $subFileToCreate - Force - Value $content
558+ $result = Get-AzureRmDataLakeStoreChildItemSummary - Account $accountName - Path $summaryFolder
559+ Assert-AreEqual $result.Length $content.Length
560+ # Files will be the test file and the above moved file
561+ Assert-AreEqual $result.FileCount 1
562+
563+ # Export DiskUsage
564+ $targetFile = " /DuOutputFile"
565+ Export-AdlStoreChildItemProperties - Account $accountName - Path $summaryFolder - OutputPath $targetFile - GetDiskUsage - IncludeFile - SaveToAdl
566+ $result = Get-AzureRMDataLakeStoreItem - Account $accountName - path $targetFile
567+ Assert-NotNull $result " No file was created on export properties"
568+
548569 # delete a file
549- Assert-True {Remove-AzureRMDataLakeStoreItem - Account $accountName - paths " $moveFolder /movefile.txt" - force - passthru } " Remove File Failed"
550- Assert-Throws {Get-AzureRMDataLakeStoreItem - Account $accountName - path $moveFile }
570+ Assert-True {Remove-AdlStoreItem - Account $accountName - paths " $moveFolder /movefile.txt" - force - passthru } " Remove File Failed"
571+ Assert-Throws {Get-AdlStoreItem - Account $accountName - path $moveFile }
572+ Assert-True {Remove-AdlStoreItem - Account $accountName - paths $targetFile - force - passthru } " Remove File Failed"
573+ Assert-Throws {Get-AdlStoreItem - Account $accountName - path $targetFile }
551574
552575 # delete a folder
553576 Assert-True {Remove-AzureRMDataLakeStoreItem - Account $accountName - paths $moveFolder - force - recurse - passthru} " Remove folder failed"
554577 Assert-Throws {Get-AzureRMDataLakeStoreItem - Account $accountName - path $moveFolder }
578+ Assert-True {Remove-AzureRMDataLakeStoreItem - Account $accountName - paths $summaryFolder - force - recurse - passthru} " Remove folder failed"
579+ Assert-Throws {Get-AzureRMDataLakeStoreItem - Account $accountName - path $summaryFolder }
555580
556581 # Delete Data Lake account
557582 Assert-True {Remove-AzureRMDataLakeStoreAccount - ResourceGroupName $resourceGroupName - Name $accountName - Force - PassThru} " Remove Account failed."
@@ -609,6 +634,9 @@ function Test-DataLakeStoreFileSystemPermissions
609634 Assert-False {$i -eq 60 } " Data Lake Store account is not in succeeded state even after 30 min."
610635 }
611636
637+ # define folder name to create for recursive Acl
638+ $folderToCreate = " /aclRecurseFolder"
639+
612640 # define the permissions to add/remove
613641 $aceUserId = " 027c28d5-c91d-49f0-98c5-d10134b169b3"
614642
@@ -675,6 +703,26 @@ function Test-DataLakeStoreFileSystemPermissions
675703 $result = Get-AzureRMDataLakeStoreItemAclEntry - Account $accountName - path " /"
676704 Assert-AreEqual $ ($currentCount ) $result.Count
677705
706+ # Create file/folder for recursive Acl
707+ $result = New-AzureRMDataLakeStoreItem - Account $accountName - path $folderToCreate - Folder
708+ Assert-NotNull $result " No value was returned on folder creation"
709+
710+ # Recursive Acl Modify
711+ Set-AzureRMDataLakeStoreItemAclEntry - Account $accountName - path " /" - AceType User - Permissions All - Id $aceUserId - Recurse
712+ $result = Get-AzureRMDataLakeStoreItemAclEntry - Account $accountName - path " /"
713+ Assert-AreEqual $ ($currentCount + 1 ) $result.Count
714+
715+ # Export Acl
716+ $targetFile = " /aclOutputFile"
717+ Export-AzureRmDataLakeStoreChildItemProperties - Account $accountName - Path " /" - OutputPath $targetFile - GetAcl - IncludeFile - SaveToAdl
718+ $result = Get-AzureRMDataLakeStoreItem - Account $accountName - path $targetFile
719+ Assert-NotNull $result " No file was created on export properties"
720+
721+ # Recursive Acl remove
722+ Remove-AzureRMDataLakeStoreItemAclEntry - Account $accountName - path " /" - AceType User - Id $aceUserId - Recurse
723+ $result = Get-AzureRMDataLakeStoreItemAclEntry - Account $accountName - path " /"
724+ Assert-AreEqual $ ($currentCount ) $result.Count
725+
678726 # Validate full ACL removal
679727 Remove-AzureRMDataLakeStoreItemAcl - Account $accountName - Path " /" - Force - Default
680728 $result = Get-AzureRMDataLakeStoreItemAclEntry - Account $accountName - path " /"
0 commit comments