@@ -51,14 +51,15 @@ Describe "dataplane test" {
51
51
# $dir11 = New-AzDataLakeGen2Item -Context $ctx -FileSystem $filesystemName -Path $dirname11 -Directory
52
52
53
53
# Create File, and show properties/matadata in console (Note, Permission/Umask is not supported)
54
- $sas = New-AzStorageContainerSASToken - Name $filesystemName - Permission rwdl - Context $ctx
54
+ $sas = New-AzStorageContainerSASToken - Name $filesystemName - Permission rwdl - Context $ctx
55
55
$sasctx = New-AzStorageContext - StorageAccountName $ctx.StorageAccountName - SasToken $sas
56
- $file1 = New-AzDataLakeGen2Item - Context $sasctx - FileSystem $filesystemName - Path $filepath11 - Source $localSrcFile - Permission rwxrwxrwx - Umask --- rwx--- - Property @ {" ContentEncoding" = " UDF8" ; " CacheControl" = " READ" } - Metadata @ {" tag1" = " value1" ; " tag2" = " value2" }
56
+ $file1 = New-AzDataLakeGen2Item - Context $sasctx - FileSystem $filesystemName - Path $filepath11 - Source $localSrcFile - Permission rwxrwxrwx - Umask --- rwx--- - Property @ {" ContentEncoding" = " UDF8" ; " CacheControl" = " READ" } - Metadata @ {" tag1" = " value1" ; " tag2" = " value2" } - EncryptionContext encryptioncontext
57
57
$file1.IsDirectory | should - Be $false
58
58
$file1.Permissions.ToSymbolicPermissions () | should - be " rwx---rwx"
59
59
$file1.Properties.Metadata.Count | should - Be 2
60
60
$file1.Properties.ContentEncoding | should - Be " UDF8"
61
61
$file1.Properties.ContentLength | should - Be (Get-Item $localSrcFile ).Length
62
+ $file1.Properties.EncryptionContext | Should - Be " encryptioncontext"
62
63
# # create a file with task
63
64
$task = New-AzDataLakeGen2Item - Context $ctx - FileSystem $filesystemName - Path $filepath12 - Source $localSrcFile - Force - asjob
64
65
$task | Wait-Job
@@ -70,6 +71,7 @@ Describe "dataplane test" {
70
71
$file2 = New-AzDataLakeGen2Item - Context $ctx - FileSystem $filesystemName - Path $destPath - Source $localSrcFile - Force
71
72
$file2.IsDirectory | should - Be $false
72
73
$file2.Path | should - Be $destPath
74
+ $file2.Properties.EncryptionContext | Should - Be $null
73
75
74
76
# download content of a file (add -Force to avoid prompt)
75
77
Get-AzDataLakeGen2ItemContent - Context $ctx - FileSystem $filesystemName - Path $filepath11 - Destination $localDestFile - Force
0 commit comments