HDDS-479. Add more ozone fs tests in the robot integration framework. Contributed by Nilotpal Nandi.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/153941b2 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/153941b2 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/153941b2 Branch: refs/heads/HDFS-12943 Commit: 153941b2365a3f4a2fc1285f93eeaf12419aca3a Parents: 2a07617 Author: Anu Engineer <aengin...@apache.org> Authored: Thu Oct 4 22:32:18 2018 -0700 Committer: Anu Engineer <aengin...@apache.org> Committed: Thu Oct 4 22:53:51 2018 -0700 ---------------------------------------------------------------------- .../src/main/smoketest/ozonefs/ozonefs.robot | 75 +++++++++++++++++++- 1 file changed, 74 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/153941b2/hadoop-ozone/dist/src/main/smoketest/ozonefs/ozonefs.robot ---------------------------------------------------------------------- diff --git a/hadoop-ozone/dist/src/main/smoketest/ozonefs/ozonefs.robot b/hadoop-ozone/dist/src/main/smoketest/ozonefs/ozonefs.robot index fb7b98c..236c5b2 100644 --- a/hadoop-ozone/dist/src/main/smoketest/ozonefs/ozonefs.robot +++ b/hadoop-ozone/dist/src/main/smoketest/ozonefs/ozonefs.robot @@ -24,12 +24,85 @@ Resource ../commonlib.robot *** Test Cases *** Create volume and bucket Execute ozone sh volume create http://ozoneManager/fstest --user bilbo --quota 100TB --root + Execute ozone sh volume create http://ozoneManager/fstest2 --user bilbo --quota 100TB --root Execute ozone sh bucket create http://ozoneManager/fstest/bucket1 + Execute ozone sh bucket create http://ozoneManager/fstest/bucket2 + Execute ozone sh bucket create http://ozoneManager/fstest2/bucket3 Check volume from ozonefs ${result} = Execute ozone fs -ls o3://bucket1.fstest/ -Create directory from ozonefs +Run ozoneFS tests Execute ozone fs -mkdir -p o3://bucket1.fstest/testdir/deep ${result} = Execute ozone sh key list o3://ozoneManager/fstest/bucket1 | grep -v WARN | jq -r '.[].keyName' Should contain ${result} testdir/deep + Execute ozone fs -copyFromLocal NOTICE.txt o3://bucket1.fstest/testdir/deep/ + ${result} = Execute ozone sh key list o3://ozoneManager/fstest/bucket1 | grep -v WARN | jq -r '.[].keyName' + Should contain ${result} NOTICE.txt + + Execute ozone fs -put NOTICE.txt o3://bucket1.fstest/testdir/deep/PUTFILE.txt + ${result} = Execute ozone sh key list o3://ozoneManager/fstest/bucket1 | grep -v WARN | jq -r '.[].keyName' + Should contain ${result} PUTFILE.txt + + ${result} = Execute ozone fs -ls o3://bucket1.fstest/testdir/deep/ + Should contain ${result} NOTICE.txt + Should contain ${result} PUTFILE.txt + + Execute ozone fs -mv o3://bucket1.fstest/testdir/deep/NOTICE.txt o3://bucket1.fstest/testdir/deep/MOVED.TXT + ${result} = Execute ozone sh key list o3://ozoneManager/fstest/bucket1 | grep -v WARN | jq -r '.[].keyName' + Should contain ${result} MOVED.TXT + Should not contain ${result} NOTICE.txt + + Execute ozone fs -mkdir -p o3://bucket1.fstest/testdir/deep/subdir1 + Execute ozone fs -cp o3://bucket1.fstest/testdir/deep/MOVED.TXT o3://bucket1.fstest/testdir/deep/subdir1/NOTICE.txt + ${result} = Execute ozone sh key list o3://ozoneManager/fstest/bucket1 | grep -v WARN | jq -r '.[].keyName' + Should contain ${result} subdir1/NOTICE.txt + + ${result} = Execute ozone fs -ls o3://bucket1.fstest/testdir/deep/subdir1/ + Should contain ${result} NOTICE.txt + + Execute ozone fs -cat o3://bucket1.fstest/testdir/deep/subdir1/NOTICE.txt + Should not contain ${result} Failed + + Execute ozone fs -rm o3://bucket1.fstest/testdir/deep/subdir1/NOTICE.txt + ${result} = Execute ozone sh key list o3://ozoneManager/fstest/bucket1 | grep -v WARN | jq -r '.[].keyName' + Should not contain ${result} NOTICE.txt + + ${result} = Execute ozone fs -rmdir o3://bucket1.fstest/testdir/deep/subdir1/ + ${result} = Execute ozone sh key list o3://ozoneManager/fstest/bucket1 | grep -v WARN | jq -r '.[].keyName' + Should not contain ${result} subdir1 + + Execute ozone fs -touch o3://bucket1.fstest/testdir/TOUCHFILE.txt + ${result} = Execute ozone sh key list o3://ozoneManager/fstest/bucket1 | grep -v WARN | jq -r '.[].keyName' + Should contain ${result} TOUCHFILE.txt + + Execute ozone fs -rm -r o3://bucket1.fstest/testdir/ + ${result} = Execute ozone sh key list o3://ozoneManager/fstest/bucket1 | grep -v WARN | jq -r '.[].keyName' + Should not contain ${result} testdir + + Execute mkdir localdir1 + Execute cp NOTICE.txt localdir1/LOCAL.txt + Execute ozone fs -mkdir -p o3://bucket1.fstest/testdir1 + Execute ozone fs -copyFromLocal localdir1 o3://bucket1.fstest/testdir1/ + Execute ozone fs -put NOTICE.txt o3://bucket1.fstest/testdir1/NOTICE.txt + + ${result} = Execute ozone fs -ls -R o3://bucket1.fstest/testdir1/ + Should contain ${result} localdir1/LOCAL.txt + Should contain ${result} testdir1/NOTICE.txt + + Execute ozone fs -mkdir -p o3://bucket2.fstest/testdir2 + Execute ozone fs -mkdir -p o3://bucket3.fstest2/testdir3 + + Execute ozone fs -cp o3://bucket1.fstest/testdir1/localdir1 o3://bucket2.fstest/testdir2/ + + Execute ozone fs -cp o3://bucket1.fstest/testdir1/localdir1 o3://bucket3.fstest1/testdir3/ + + Execute ozone sh key put o3://ozoneManager/fstest/bucket1/KEY.txt NOTICE.txt + ${result} = Execute ozone fs -ls o3://bucket1.fstest/KEY.txt + Should contain ${result} KEY.txt + ${result} = Execute ozone fs -copyFromLocal NOTICE.txt o3://bucket1.fstest/KEY.txt + Should contain ${result} 'File exists' + Execute ozone fs -get o3://bucket1.fstest/KEY.txt GET.txt + Execute ls -l GET.txt + ${result} = Execute ozone fs -ls o3://abcde.pqrs/ + Should contain ${result} VOLUME_NOT_FOUND --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org