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