test
Test basic usage
SubstringComparator
Usage: bin/hdfs crypto [COMMAND]
Test create ez, dir doesn't exist
-fs NAMENODE -ls /test-
-createZone -path /test
SubstringComparator
cannot find /test
Test failure of create ez on an existing ez
-fs NAMENODE -mkdir /foo
-fs NAMENODE -ls /-
-createZone -path /foo
-createZone -path /foo
-deleteZone -path /foo
-fs NAMENODE -rmdir /foo
SubstringComparator
Directory /foo is already in an encryption zone
Test success of create ez in which a key is created
-fs NAMENODE -mkdir /foo
-fs NAMENODE -ls /-
-createZone -path /foo
-deleteZone -path /foo
-fs NAMENODE -rmdir /foo
SubstringComparator
Added encryption zone /foo
Test failure of Create EZ operation in an existing EZ.
-fs NAMENODE -mkdir /foo
-fs NAMENODE -ls /-
-createZone -path /foo
-fs NAMENODE -mkdir /foo/bar
-createZone -path /foo/bar
-fs NAMENODE -rmdir /foo/bar
-deleteZone -path /foo
-fs NAMENODE -rmdir /foo
SubstringComparator
Directory /foo/bar is already in an encryption zone. (/foo)
Test failure of creating an EZ using a non-empty directory.
-fs NAMENODE -mkdir /foo
-fs NAMENODE -touchz /foo/bar
-fs NAMENODE -ls /-
-createZone -path /foo
-fs NAMENODE -rm /foo/bar
-fs NAMENODE -rmdir /foo
SubstringComparator
Attempt to create an encryption zone for a non-empty directory.
Test failure of creating an EZ passing a key that doesn't exist.
-fs NAMENODE -mkdir /foo
-fs NAMENODE -ls /-
-createZone -path /foo -keyId doesntexist
-fs NAMENODE -rmdir /foo
SubstringComparator
Key doesntexist doesn't exist.
Test success of creating an EZ when the key exists.
-fs NAMENODE -mkdir /foo
-fs NAMENODE -ls /-
-createZone -path /foo -keyId mykey
-deleteZone -path /foo
-fs NAMENODE -rmdir /foo
SubstringComparator
Added encryption zone /foo
Test failure of deleting an EZ passing a directory that doesn't exist.
-fs NAMENODE -ls /-
-deleteZone -path /foo
SubstringComparator
Directory /foo is not the root of an encryption zone.
Test failure of deleting an EZ which is not empty.
-fs NAMENODE -mkdir /foo
-fs NAMENODE -ls /-
-createZone -path /foo
-fs NAMENODE -touchz /foo/bar
-deleteZone -path /foo
-fs NAMENODE -rm /foo/bar
-deleteZone -path /foo
-fs NAMENODE -rmdir /foo
SubstringComparator
Attempt to delete an encryption zone for a non-empty directory.
Test failure of deleting an EZ on a subdir that is not the root of an EZ.
-fs NAMENODE -mkdir /foo
-fs NAMENODE -ls /-
-createZone -path /foo
-fs NAMENODE -mkdir /foo/bar
-deleteZone -path /foo/bar
-fs NAMENODE -rmdir /foo/bar
-deleteZone -path /foo
-fs NAMENODE -rmdir /foo
SubstringComparator
Directory /foo/bar is not the root of an encryption zone.
Test success of creating and deleting an encryption zone a few levels down.
-fs NAMENODE -mkdir /foo
-fs NAMENODE -mkdir /foo/bar
-fs NAMENODE -mkdir /foo/bar/baz
-fs NAMENODE -ls /-
-createZone -path /foo/bar/baz
-deleteZone -path /foo/bar/baz
-fs NAMENODE -rmdir /foo/bar/baz
-fs NAMENODE -rmdir /foo/bar
-fs NAMENODE -rmdir /foo/
SubstringComparator
Deleted encryption zone /foo/bar/baz
Test failure of renaming file cross EZ's
-fs NAMENODE -mkdir /src
-fs NAMENODE -mkdir /dst
-fs NAMENODE -ls /-
-createZone -path /src
-createZone -path /dst
-fs NAMENODE -mkdir /src/subdir
-fs NAMENODE -mv /src/subdir /dst-
-fs NAMENODE -rmdir /src/subdir
-deleteZone -path /src
-deleteZone -path /dst
-fs NAMENODE -rmdir /src
-fs NAMENODE -rmdir /dst
SubstringComparator
/src/subdir can't be moved from encryption zone /src to encryption zone /dst.
Test failure of renaming a non-EZ file into an EZ
-fs NAMENODE -mkdir /src
-fs NAMENODE -mkdir /dst
-fs NAMENODE -ls /-
-createZone -path /dst
-fs NAMENODE -mv /src /dst-
-deleteZone -path /dst
-fs NAMENODE -rmdir /src
-fs NAMENODE -rmdir /dst
SubstringComparator
/src can't be moved into an encryption zone
Test failure of renaming a non-EZ file from an EZ
-fs NAMENODE -mkdir /src
-fs NAMENODE -mkdir /dst
-fs NAMENODE -ls /-
-createZone -path /src
-fs NAMENODE -mv /src /dst-
-deleteZone -path /src
-fs NAMENODE -rmdir /src
-fs NAMENODE -rmdir /dst
SubstringComparator
/src can't be moved from an encryption zone
Test success of renaming file intra-EZ
-fs NAMENODE -mkdir /src
-createZone -path /src
-fs NAMENODE -mkdir /src/subdir1
-fs NAMENODE -mkdir /src/subdir2
-fs NAMENODE -mv /src/subdir1 /src/subdir2-
-fs NAMENODE -rmdir /src/subdir2/subdir1
-fs NAMENODE -rmdir /src/subdir2
-deleteZone -path /src
-fs NAMENODE -rmdir /src
SubstringComparator