You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by rv...@apache.org on 2017/03/22 06:02:55 UTC
[1/5] bigtop git commit: Fixed hcfs tests so it can work in both
casers where fs.trash.interval is disabled or enabled.
Repository: bigtop
Updated Branches:
refs/heads/master 5c0dc2a29 -> 0aeea9710
Fixed hcfs tests so it can work in both casers where fs.trash.interval is disabled or enabled.
Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/42dc2de3
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/42dc2de3
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/42dc2de3
Branch: refs/heads/master
Commit: 42dc2de3e4805a02af2ffd0f76e307a21a14948d
Parents: fbfb840
Author: Raj Desai <rd...@us.ibm.com>
Authored: Fri Mar 10 16:01:22 2017 -0800
Committer: Roman Shaposhnik <rv...@apache.org>
Committed: Tue Mar 21 23:01:18 2017 -0700
----------------------------------------------------------------------
.../resources/clitest_data/testHCFSConf.xml | 120 +++++++++----------
1 file changed, 60 insertions(+), 60 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/bigtop/blob/42dc2de3/bigtop-tests/test-artifacts/hadoop/src/main/resources/clitest_data/testHCFSConf.xml
----------------------------------------------------------------------
diff --git a/bigtop-tests/test-artifacts/hadoop/src/main/resources/clitest_data/testHCFSConf.xml b/bigtop-tests/test-artifacts/hadoop/src/main/resources/clitest_data/testHCFSConf.xml
index 37e24e7..5413809 100644
--- a/bigtop-tests/test-artifacts/hadoop/src/main/resources/clitest_data/testHCFSConf.xml
+++ b/bigtop-tests/test-artifacts/hadoop/src/main/resources/clitest_data/testHCFSConf.xml
@@ -3147,7 +3147,7 @@
<comparators>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted TEST_DIR_ABSOLUTE/dir0/file0</expected-output>
+ <expected-output>^(Deleted TEST_DIR_ABSOLUTE/dir0/file0|Moved:.*TEST_DIR_ABSOLUTE/dir0/file0.*)</expected-output>
</comparator>
</comparators>
</test>
@@ -3165,7 +3165,7 @@
<comparators>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted file0</expected-output>
+ <expected-output>^(Deleted file0|Moved:.*file0.*)</expected-output>
</comparator>
</comparators>
</test>
@@ -3186,19 +3186,19 @@
<comparators>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted TEST_DIR_ABSOLUTE/dir0/file0</expected-output>
+ <expected-output>^(Deleted TEST_DIR_ABSOLUTE/dir0/file0|Moved:.*TEST_DIR_ABSOLUTE/dir0/file0.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted TEST_DIR_ABSOLUTE/dir0/file1</expected-output>
+ <expected-output>^(Deleted TEST_DIR_ABSOLUTE/dir0/file1|Moved:.*TEST_DIR_ABSOLUTE/dir0/file1.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted TEST_DIR_ABSOLUTE/dir0/file2</expected-output>
+ <expected-output>^(Deleted TEST_DIR_ABSOLUTE/dir0/file2|Moved:.*TEST_DIR_ABSOLUTE/dir0/file2.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted TEST_DIR_ABSOLUTE/dir0/file3</expected-output>
+ <expected-output>^(Deleted TEST_DIR_ABSOLUTE/dir0/file3|Moved:.*TEST_DIR_ABSOLUTE/dir0/file3.*)</expected-output>
</comparator>
</comparators>
</test>
@@ -3219,19 +3219,19 @@
<comparators>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted file0</expected-output>
+ <expected-output>^(Deleted file0|Moved:.*file0.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted file1</expected-output>
+ <expected-output>^(Deleted file1|Moved:.*file1.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted file2</expected-output>
+ <expected-output>^(Deleted file2|Moved:.*file2.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted file3</expected-output>
+ <expected-output>^(Deleted file3|Moved:.*file3.*)</expected-output>
</comparator>
</comparators>
</test>
@@ -3314,7 +3314,7 @@
<comparators>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/file0</expected-output>
+ <expected-output>^(Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/file0|Moved:.*HCFS_SCHEME.*TEST_DIR_ABSOLUTE/file0.*)</expected-output>
</comparator>
</comparators>
</test>
@@ -3334,19 +3334,19 @@
<comparators>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/file0</expected-output>
+ <expected-output>^(Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/file0|Moved:.*HCFS_SCHEME.*TEST_DIR_ABSOLUTE/file0.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/file1</expected-output>
+ <expected-output>^(Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/file1|Moved:.*HCFS_SCHEME.*TEST_DIR_ABSOLUTE/file1.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/file2</expected-output>
+ <expected-output>^(Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/file2|Moved:.*HCFS_SCHEME.*TEST_DIR_ABSOLUTE/file2.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/file3</expected-output>
+ <expected-output>^(Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/file3|Moved:.*HCFS_SCHEME.*TEST_DIR_ABSOLUTE/file3.*)</expected-output>
</comparator>
</comparators>
</test>
@@ -3400,19 +3400,19 @@
<comparators>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/file0</expected-output>
+ <expected-output>^(Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/file0|Moved:.*HCFS_SCHEME.*TEST_DIR_ABSOLUTE/file0.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/file1</expected-output>
+ <expected-output>^(Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/file1|Moved:.*HCFS_SCHEME.*TEST_DIR_ABSOLUTE/file1.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/file2</expected-output>
+ <expected-output>^(Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/file2|Moved:.*HCFS_SCHEME.*TEST_DIR_ABSOLUTE/file2.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/file3</expected-output>
+ <expected-output>^(Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/file3|Moved:.*HCFS_SCHEME.*TEST_DIR_ABSOLUTE/file3.*)</expected-output>
</comparator>
</comparators>
</test>
@@ -3429,7 +3429,7 @@
<comparators>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted NAMENODETEST_DIR_ABSOLUTE/file0</expected-output>
+ <expected-output>^(Deleted NAMENODETEST_DIR_ABSOLUTE/file0|Moved:.*NAMENODETEST_DIR_ABSOLUTE/file0.*)</expected-output>
</comparator>
</comparators>
</test>
@@ -3449,19 +3449,19 @@
<comparators>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted NAMENODETEST_DIR_ABSOLUTE/file0</expected-output>
+ <expected-output>^(Deleted NAMENODETEST_DIR_ABSOLUTE/file0|Moved:.*NAMENODETEST_DIR_ABSOLUTE/file0.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted NAMENODETEST_DIR_ABSOLUTE/file1</expected-output>
+ <expected-output>^(Deleted NAMENODETEST_DIR_ABSOLUTE/file1|Moved:.*NAMENODETEST_DIR_ABSOLUTE/file1.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted NAMENODETEST_DIR_ABSOLUTE/file2</expected-output>
+ <expected-output>^(Deleted NAMENODETEST_DIR_ABSOLUTE/file2|Moved:.*NAMENODETEST_DIR_ABSOLUTE/file2.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted NAMENODETEST_DIR_ABSOLUTE/file3</expected-output>
+ <expected-output>^(Deleted NAMENODETEST_DIR_ABSOLUTE/file3|Moved:.*NAMENODETEST_DIR_ABSOLUTE/file3.*)</expected-output>
</comparator>
</comparators>
</test>
@@ -3515,19 +3515,19 @@
<comparators>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted NAMENODETEST_DIR_ABSOLUTE/file0</expected-output>
+ <expected-output>^(Deleted NAMENODETEST_DIR_ABSOLUTE/file0|Moved:.*NAMENODETEST_DIR_ABSOLUTE/file0.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted NAMENODETEST_DIR_ABSOLUTE/file1</expected-output>
+ <expected-output>^(Deleted NAMENODETEST_DIR_ABSOLUTE/file1|Moved:.*NAMENODETEST_DIR_ABSOLUTE/file1.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted NAMENODETEST_DIR_ABSOLUTE/file2</expected-output>
+ <expected-output>^(Deleted NAMENODETEST_DIR_ABSOLUTE/file2|Moved:.*NAMENODETEST_DIR_ABSOLUTE/file2.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted NAMENODETEST_DIR_ABSOLUTE/file3</expected-output>
+ <expected-output>^(Deleted NAMENODETEST_DIR_ABSOLUTE/file3|Moved:.*NAMENODETEST_DIR_ABSOLUTE/file3.*)</expected-output>
</comparator>
</comparators>
</test>
@@ -3546,7 +3546,7 @@
<comparators>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted TEST_DIR_ABSOLUTE/dir0/file0</expected-output>
+ <expected-output>^(Deleted TEST_DIR_ABSOLUTE/dir0/file0|Moved:.*TEST_DIR_ABSOLUTE/dir0/file0.*)</expected-output>
</comparator>
</comparators>
</test>
@@ -3564,7 +3564,7 @@
<comparators>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted file0</expected-output>
+ <expected-output>^(Deleted file0|Moved:.*file0.*)</expected-output>
</comparator>
</comparators>
</test>
@@ -3581,7 +3581,7 @@
<comparators>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted TEST_DIR_ABSOLUTE/dir0</expected-output>
+ <expected-output>^(Deleted TEST_DIR_ABSOLUTE/dir0|Moved:.*TEST_DIR_ABSOLUTE/dir0.*)</expected-output>
</comparator>
</comparators>
</test>
@@ -3598,7 +3598,7 @@
<comparators>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted dir0</expected-output>
+ <expected-output>^(Deleted dir0|Moved:.*dir0.*)</expected-output>
</comparator>
</comparators>
</test>
@@ -3618,19 +3618,19 @@
<comparators>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted TEST_DIR_ABSOLUTE/dir0</expected-output>
+ <expected-output>^(Deleted TEST_DIR_ABSOLUTE/dir0|Moved:.*TEST_DIR_ABSOLUTE/dir0.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted TEST_DIR_ABSOLUTE/dir1</expected-output>
+ <expected-output>^(Deleted TEST_DIR_ABSOLUTE/dir1|Moved:.*TEST_DIR_ABSOLUTE/dir1.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted TEST_DIR_ABSOLUTE/dir2</expected-output>
+ <expected-output>^(Deleted TEST_DIR_ABSOLUTE/dir2|Moved:.*TEST_DIR_ABSOLUTE/dir2.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted TEST_DIR_ABSOLUTE/dir3</expected-output>
+ <expected-output>^(Deleted TEST_DIR_ABSOLUTE/dir3|Moved:.*TEST_DIR_ABSOLUTE/dir3.*)</expected-output>
</comparator>
</comparators>
</test>
@@ -3650,19 +3650,19 @@
<comparators>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted dir0</expected-output>
+ <expected-output>^(Deleted dir0|Moved:.*dir0.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted dir1</expected-output>
+ <expected-output>^(Deleted dir1|Moved:.*dir1.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted dir2</expected-output>
+ <expected-output>^(Deleted dir2|Moved:.*dir2.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted dir3</expected-output>
+ <expected-output>^(Deleted dir3|Moved:.*dir3.*)</expected-output>
</comparator>
</comparators>
</test>
@@ -3711,7 +3711,7 @@
<comparators>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/file0</expected-output>
+ <expected-output>^(Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/file0|Moved:.*HCFS_SCHEME.*TEST_DIR_ABSOLUTE/file0.*)</expected-output>
</comparator>
</comparators>
</test>
@@ -3728,7 +3728,7 @@
<comparators>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0</expected-output>
+ <expected-output>^(Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0|Moved:.*HCFS_SCHEME.*TEST_DIR_ABSOLUTE/dir0.*)</expected-output>
</comparator>
</comparators>
</test>
@@ -3748,19 +3748,19 @@
<comparators>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0</expected-output>
+ <expected-output>^(Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0|Moved:.*HCFS_SCHEME.*TEST_DIR_ABSOLUTE/dir0.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir1</expected-output>
+ <expected-output>^(Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir1|Moved:.*HCFS_SCHEME.*TEST_DIR_ABSOLUTE/dir1.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir2</expected-output>
+ <expected-output>^(Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir2|Moved:.*HCFS_SCHEME.*TEST_DIR_ABSOLUTE/dir2.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir3</expected-output>
+ <expected-output>^(Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir3|Moved:.*HCFS_SCHEME.*TEST_DIR_ABSOLUTE/dir3.*)</expected-output>
</comparator>
</comparators>
</test>
@@ -3796,19 +3796,19 @@
<comparators>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0</expected-output>
+ <expected-output>^(Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir0|Moved:.*HCFS_SCHEME.*TEST_DIR_ABSOLUTE/dir0.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir1</expected-output>
+ <expected-output>^(Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir1|Moved:.*HCFS_SCHEME.*TEST_DIR_ABSOLUTE/dir1.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir2</expected-output>
+ <expected-output>^(Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir2|Moved:.*HCFS_SCHEME.*TEST_DIR_ABSOLUTE/dir2.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir3</expected-output>
+ <expected-output>^(Deleted HCFS_SCHEME//TEST_DIR_ABSOLUTE/dir3|Moved:.*HCFS_SCHEME.*TEST_DIR_ABSOLUTE/dir3.*)</expected-output>
</comparator>
</comparators>
</test>
@@ -3825,7 +3825,7 @@
<comparators>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted NAMENODETEST_DIR_ABSOLUTE/file0</expected-output>
+ <expected-output>^(Deleted NAMENODETEST_DIR_ABSOLUTE/file0|Moved:.*NAMENODETEST_DIR_ABSOLUTE/file0.*)</expected-output>
</comparator>
</comparators>
</test>
@@ -3842,7 +3842,7 @@
<comparators>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted NAMENODETEST_DIR_ABSOLUTE/dir0</expected-output>
+ <expected-output>^(Deleted NAMENODETEST_DIR_ABSOLUTE/dir0|Moved:.*NAMENODETEST_DIR_ABSOLUTE/dir0.*)</expected-output>
</comparator>
</comparators>
</test>
@@ -3862,19 +3862,19 @@
<comparators>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted NAMENODETEST_DIR_ABSOLUTE/dir0</expected-output>
+ <expected-output>^(Deleted NAMENODETEST_DIR_ABSOLUTE/dir0|Moved:.*NAMENODETEST_DIR_ABSOLUTE/dir0.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted NAMENODETEST_DIR_ABSOLUTE/dir1</expected-output>
+ <expected-output>^(Deleted NAMENODETEST_DIR_ABSOLUTE/dir1|Moved:.*NAMENODETEST_DIR_ABSOLUTE/dir1.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted NAMENODETEST_DIR_ABSOLUTE/dir2</expected-output>
+ <expected-output>^(Deleted NAMENODETEST_DIR_ABSOLUTE/dir2|Moved:.*NAMENODETEST_DIR_ABSOLUTE/dir2.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted NAMENODETEST_DIR_ABSOLUTE/dir3</expected-output>
+ <expected-output>^(Deleted NAMENODETEST_DIR_ABSOLUTE/dir3|Moved:.*NAMENODETEST_DIR_ABSOLUTE/dir3.*)</expected-output>
</comparator>
</comparators>
</test>
@@ -3910,19 +3910,19 @@
<comparators>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted NAMENODETEST_DIR_ABSOLUTE/dir0</expected-output>
+ <expected-output>^(Deleted NAMENODETEST_DIR_ABSOLUTE/dir0|Moved:.*NAMENODETEST_DIR_ABSOLUTE/dir0.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted NAMENODETEST_DIR_ABSOLUTE/dir1</expected-output>
+ <expected-output>^(Deleted NAMENODETEST_DIR_ABSOLUTE/dir1|Moved:.*NAMENODETEST_DIR_ABSOLUTE/dir1.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted NAMENODETEST_DIR_ABSOLUTE/dir2</expected-output>
+ <expected-output>^(Deleted NAMENODETEST_DIR_ABSOLUTE/dir2|Moved:.*NAMENODETEST_DIR_ABSOLUTE/dir2.*)</expected-output>
</comparator>
<comparator>
<type>RegexpComparator</type>
- <expected-output>^Deleted NAMENODETEST_DIR_ABSOLUTE/dir3</expected-output>
+ <expected-output>^(Deleted NAMENODETEST_DIR_ABSOLUTE/dir3|Moved:.*NAMENODETEST_DIR_ABSOLUTE/dir3.*)</expected-output>
</comparator>
</comparators>
</test>
[2/5] bigtop git commit: ODPI-196. Adding tests to test the doas
feature of httpfs.
Posted by rv...@apache.org.
ODPI-196. Adding tests to test the doas feature of httpfs.
Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/fbfb8405
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/fbfb8405
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/fbfb8405
Branch: refs/heads/master
Commit: fbfb8405ac02475da189e66a9201599eb1800757
Parents: fc407ec
Author: Clint Edwards <cl...@sas.com>
Authored: Fri Oct 21 15:05:58 2016 -0400
Committer: Roman Shaposhnik <rv...@apache.org>
Committed: Tue Mar 21 23:01:18 2017 -0700
----------------------------------------------------------------------
.../bigtop/itest/httpfs/TestHttpFs.groovy | 118 ++++++++++++++-----
1 file changed, 87 insertions(+), 31 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/bigtop/blob/fbfb8405/bigtop-tests/test-artifacts/httpfs/src/main/groovy/org/apache/bigtop/itest/httpfs/TestHttpFs.groovy
----------------------------------------------------------------------
diff --git a/bigtop-tests/test-artifacts/httpfs/src/main/groovy/org/apache/bigtop/itest/httpfs/TestHttpFs.groovy b/bigtop-tests/test-artifacts/httpfs/src/main/groovy/org/apache/bigtop/itest/httpfs/TestHttpFs.groovy
index bcec657..a4134a2 100644
--- a/bigtop-tests/test-artifacts/httpfs/src/main/groovy/org/apache/bigtop/itest/httpfs/TestHttpFs.groovy
+++ b/bigtop-tests/test-artifacts/httpfs/src/main/groovy/org/apache/bigtop/itest/httpfs/TestHttpFs.groovy
@@ -32,6 +32,7 @@ public class TestHttpFs {
private static Log LOG = LogFactory.getLog(TestHttpFs.class)
private static final String USERNAME = System.getProperty("user.name");
+ private static final String DOASUSER = 'hdfs';
private static final String HTTPFS_PROXY = System.getenv('HTTPFS_PROXY');
static {
assertNotNull("HTTPFS_PROXY has to be set to run this test",
@@ -96,56 +97,59 @@ public class TestHttpFs {
assertTrue(expected + " NOT found!", exists == true);
}
- private void createDir(String dirname) {
- sh.exec("curl -i -X PUT '$HTTPFS_PREFIX$dirname?user.name=$USERNAME&op=MKDIRS'");
- }
-
- @Test
- public void testCreateDir() {
- createDir(testHttpFsFolder)
+ private void createDir(String dirname, String doasUser='') {
+ def doasStr = ''
+ if(doasUser.length()) {
+ doasStr = "doas=$doasUser&"
+ }
+ sh.exec("curl -i -X PUT '$HTTPFS_PREFIX$dirname?user.name=$USERNAME&${doasStr}op=MKDIRS'");
assertTrue("curl command to create a dir failed", sh.getRet() == 0);
assertValueExists(sh.getOut(), HTTPFS_SUCCESS);
}
- @Test
- public void testRenameDir() {
- createDir(testHttpFsFolder);
- assertTrue("curl command to create a dir failed", sh.getRet() == 0);
- assertValueExists(sh.getOut(), HTTPFS_SUCCESS);
- sh.exec("curl -i -X PUT '$HTTPFS_PREFIX$testHttpFsFolder?user.name=$USERNAME&op=RENAME&destination=$testHttpFsFolderRenamed'");
+ private void renameDir(String dirname, String doasUser='') {
+ createDir(dirname, doasUser);
+ def doasStr = ''
+ if(doasUser.length()) {
+ doasStr = "doas=$doasUser&"
+ }
+ sh.exec("curl -i -X PUT '$HTTPFS_PREFIX$testHttpFsFolder?user.name=$USERNAME&${doasStr}op=RENAME&destination=$testHttpFsFolderRenamed'");
assertTrue("curl command to rename a dir failed", sh.getRet() == 0);
assertValueExists(sh.getOut(), HTTPFS_SUCCESS);
}
- @Test
- public void testDeleteDir() {
- createDir(testHttpFsFolder);
- assertTrue("curl command to create a dir failed", sh.getRet() == 0);
- assertValueExists(sh.getOut(), HTTPFS_SUCCESS);
- sh.exec("curl -i -X DELETE '$HTTPFS_PREFIX$testHttpFsFolder?user.name=$USERNAME&op=DELETE'");
+ private void deleteDir(String dirname, String doasUser='') {
+ createDir(dirname, doasUser);
+ def doasStr = ''
+ if(doasUser.length()) {
+ doasStr = "doas=$doasUser&"
+ }
+ sh.exec("curl -i -X DELETE '$HTTPFS_PREFIX$testHttpFsFolder?user.name=$USERNAME&${doasStr}op=DELETE'");
assertTrue("curl command to delete a dir failed", sh.getRet() == 0);
assertValueExists(sh.getOut(), HTTPFS_SUCCESS);
}
- @Test
- public void testStatusDir() {
- createDir(testHttpFsFolder);
- assertTrue("curl command to create a dir failed", sh.getRet() == 0);
- assertValueExists(sh.getOut(), HTTPFS_SUCCESS);
- sh.exec("curl -i '$HTTPFS_PREFIX$testHttpFsFolder?user.name=$USERNAME&op=GETFILESTATUS'");
+ private void statusDir(String dirname, String doasUser='') {
+ createDir(dirname, doasUser);
+ def doasStr = ''
+ if(doasUser.length()) {
+ doasStr = "doas=$doasUser&"
+ }
+ sh.exec("curl -i '$HTTPFS_PREFIX$testHttpFsFolder?user.name=$USERNAME&${doasStr}op=GETFILESTATUS'");
assertTrue("curl command to create a dir failed", sh.getRet() == 0);
assertValueContains(sh.getOut(), "DIRECTORY");
assertValueExists(sh.getOut(), HTTP_OK);
}
- @Test
- public void testCreateFile() {
- String filename = "helloworld.txt";
+ private void createFile(String filename, String doasUser='') {
String filenameContent = 'Hello World!';
+ def doasStr = ''
+ if(doasUser.length()) {
+ doasStr = "doas=$doasUser&"
+ }
- createDir(testHttpFsFolder);
- assertTrue("curl command to create a dir failed", sh.getRet() == 0);
- sh.exec("curl -i -X PUT '$HTTPFS_PREFIX$testHttpFsFolder/$filename?user.name=$USERNAME&op=CREATE'");
+ createDir(testHttpFsFolder, doasUser);
+ sh.exec("curl -i -X PUT '$HTTPFS_PREFIX$testHttpFsFolder/$filename?user.name=$USERNAME&${doasStr}op=CREATE'");
assertTrue("curl command to create a file failed", sh.getRet() == 0);
String datanodeLocation = null;
sh.getOut().each {
@@ -165,5 +169,57 @@ public class TestHttpFs {
assertValueExists(sh.getOut(), HTTP_OK);
assertValueExists(sh.getOut(), filenameContent);
}
+
+ @Test
+ public void testCreateDir() {
+ createDir(testHttpFsFolder)
+ }
+
+ @Test
+ public void testCreateDirAsUser() {
+ createDir(testHttpFsFolder, DOASUSER)
+ }
+
+ @Test
+ public void testRenameDir() {
+ renameDir(testHttpFsFolder);
+ }
+
+ @Test
+ public void testRenameDirAsUser() {
+ renameDir(testHttpFsFolder, DOASUSER);
+ }
+
+ @Test
+ public void testDeleteDir() {
+ deleteDir(testHttpFsFolder);
+ }
+
+ @Test
+ public void testDeleteDirAsUser() {
+ deleteDir(testHttpFsFolder, DOASUSER);
+ }
+
+ @Test
+ public void testStatusDir() {
+ statusDir(testHttpFsFolder);
+ }
+
+ @Test
+ public void testStatusDirAsUser() {
+ statusDir(testHttpFsFolder, DOASUSER);
+ }
+
+ @Test
+ public void testCreateFile() {
+ String filename = "helloworld.txt";
+ createFile(filename)
+ }
+
+ @Test
+ public void testCreateFileAsUser() {
+ String filename = "helloworld.txt";
+ createFile(filename, DOASUSER)
+ }
}
[5/5] bigtop git commit: BIGTOP-2701. Update hcfs tests so it can
work in both casers where fs.trash.interval is disabled or enabled.
Posted by rv...@apache.org.
BIGTOP-2701. Update hcfs tests so it can work in both casers where fs.trash.interval is disabled or enabled.
Update TestCLI.java
Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/0aeea971
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/0aeea971
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/0aeea971
Branch: refs/heads/master
Commit: 0aeea9710d9dba1127f6fb0700ae632cd9957813
Parents: 42dc2de
Author: Raj Desai <rd...@us.ibm.com>
Authored: Tue Mar 14 11:34:50 2017 -0700
Committer: Roman Shaposhnik <rv...@apache.org>
Committed: Tue Mar 21 23:01:54 2017 -0700
----------------------------------------------------------------------
.../groovy/org/apache/bigtop/itest/hadoop/hcfs/TestCLI.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/bigtop/blob/0aeea971/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hcfs/TestCLI.java
----------------------------------------------------------------------
diff --git a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hcfs/TestCLI.java b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hcfs/TestCLI.java
index be673de..4221182 100644
--- a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hcfs/TestCLI.java
+++ b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hcfs/TestCLI.java
@@ -35,6 +35,8 @@ import org.junit.Test;
import org.junit.Assert;
import org.apache.commons.lang.StringUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
/**
* Tests for the Command Line Interface (CLI)
@@ -48,6 +50,7 @@ public class TestCLI extends CLITestHelper {
private String supergroup;
private String namenode;
private static Shell shHDFS = new Shell("/bin/bash");
+ private static Log LOG = LogFactory.getLog(Shell.class);
@Before
@Override
@@ -80,8 +83,9 @@ public class TestCLI extends CLITestHelper {
0, shHDFS.getRet());
// We can't just use conf.setInt(fs.trash.interval",0) because if trash is
// enabled on the server, client configuration value is ignored.
- Assert.assertEquals("HDFS trash should be disabled via fs.trash.interval",
- 0, conf.getInt("fs.trash.interval", 0));
+ /*Assert.assertEquals("HDFS trash should be disabled via fs.trash.interval",
+ 0, conf.getInt("fs.trash.interval", 0));*/
+ LOG.info("HDFS fs.trash.interval is set to: "+conf.getInt("fs.trash.interval", 0));
Assert.assertEquals("This test needs to be run under root user of hcfs",
System.getProperty("hcfs.root.username", "hdfs"),
System.getProperty("user.name"));
[3/5] bigtop git commit: ODPI-140 - Fix warnings due to string cast
to object (#67)
Posted by rv...@apache.org.
ODPI-140 - Fix warnings due to string cast to object (#67)
Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/515c6074
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/515c6074
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/515c6074
Branch: refs/heads/master
Commit: 515c607425ad0606621d60165eba44baece61e85
Parents: 5c0dc2a
Author: John Mertic <jm...@gmail.com>
Authored: Fri Jun 3 19:06:39 2016 -0400
Committer: Roman Shaposhnik <rv...@apache.org>
Committed: Tue Mar 21 23:01:18 2017 -0700
----------------------------------------------------------------------
.../main/groovy/org/apache/bigtop/itest/hadoop/hcfs/TestCLI.java | 2 +-
.../groovy/org/apache/bigtop/itest/hadoop/hdfs/TestDFSCLI.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/bigtop/blob/515c6074/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hcfs/TestCLI.java
----------------------------------------------------------------------
diff --git a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hcfs/TestCLI.java b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hcfs/TestCLI.java
index 8de9b30..be673de 100644
--- a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hcfs/TestCLI.java
+++ b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hcfs/TestCLI.java
@@ -71,7 +71,7 @@ public class TestCLI extends CLITestHelper {
"hadoop fs -mkdir -p " + TEST_DIR_ABSOLUTE,
"hadoop fs -chmod 777 " + TEST_DIR_ABSOLUTE
};
- shHDFS.exec(createTestcliDirCmds);
+ shHDFS.exec((Object[])createTestcliDirCmds);
// Check assumptions which would make some cases fail if not met
Assert.assertEquals("Creation of testcli dir should succeed and return 0"
http://git-wip-us.apache.org/repos/asf/bigtop/blob/515c6074/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestDFSCLI.java
----------------------------------------------------------------------
diff --git a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestDFSCLI.java b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestDFSCLI.java
index 63d4232..9959f70 100644
--- a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestDFSCLI.java
+++ b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestDFSCLI.java
@@ -58,7 +58,7 @@ public class TestDFSCLI extends TestHDFSCLI {
"hadoop fs -mkdir -p " + TEST_DIR_ABSOLUTE,
"hadoop fs -chmod 777 " + TEST_DIR_ABSOLUTE
};
- shHDFS.exec(createTestcliDirCmds);
+ shHDFS.exec((Object[])createTestcliDirCmds);
// Check assumptions which would make some cases fail if not met
Assert.assertEquals("Creation of testcli dir should succeed and return 0"
[4/5] bigtop git commit: ODPI-195 The asssertValueExists method is
making a call to String::startsWith using an empty string which results in a
passing test when it should not be passing.
Posted by rv...@apache.org.
ODPI-195 The asssertValueExists method is making a call to
String::startsWith using an empty string which results in a passing test
when it should not be passing.
Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/fc407ecc
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/fc407ecc
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/fc407ecc
Branch: refs/heads/master
Commit: fc407ecc0f6fcb1235b6041527db717e704609d7
Parents: 515c607
Author: Clint Edwards <cl...@sas.com>
Authored: Thu Oct 20 14:36:28 2016 -0400
Committer: Roman Shaposhnik <rv...@apache.org>
Committed: Tue Mar 21 23:01:18 2017 -0700
----------------------------------------------------------------------
.../bigtop/itest/httpfs/TestHttpFs.groovy | 30 +++++++++++++++-----
1 file changed, 23 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/bigtop/blob/fc407ecc/bigtop-tests/test-artifacts/httpfs/src/main/groovy/org/apache/bigtop/itest/httpfs/TestHttpFs.groovy
----------------------------------------------------------------------
diff --git a/bigtop-tests/test-artifacts/httpfs/src/main/groovy/org/apache/bigtop/itest/httpfs/TestHttpFs.groovy b/bigtop-tests/test-artifacts/httpfs/src/main/groovy/org/apache/bigtop/itest/httpfs/TestHttpFs.groovy
index 78d7a7a..bcec657 100644
--- a/bigtop-tests/test-artifacts/httpfs/src/main/groovy/org/apache/bigtop/itest/httpfs/TestHttpFs.groovy
+++ b/bigtop-tests/test-artifacts/httpfs/src/main/groovy/org/apache/bigtop/itest/httpfs/TestHttpFs.groovy
@@ -40,8 +40,13 @@ public class TestHttpFs {
private static final String HTTPFS_PREFIX = "http://$HTTPFS_PROXY/webhdfs/v1";
private static final String HTTPFS_SUCCESS = "{\"boolean\":true}";
+ private static final String HTTP_OK = "HTTP/1.1 200 OK";
+ private static final String HTTP_CREATE = "HTTP/1.1 201 Created";
+ private static final String HTTP_TMP_REDIR = "HTTP/1.1 307 TEMPORARY_REDIRECT";
- private static final String DATA_DIR = System.getProperty("data.dir", "text-files");
+ public static final String HTTPFS_SOURCE = "bigtop-tests/test-artifacts/httpfs/src/main/resources/"
+ def httpfs_source = System.getenv("BIGTOP_HOME") + "/" + HTTPFS_SOURCE;
+ def DATA_DIR = httpfs_source + "/" + "text-files";
private static String testHttpFsFolder = "/tmp/httpfssmoke-" + (new Date().getTime());
private static String testHttpFsFolderRenamed = "$testHttpFsFolder-renamed";
@@ -74,7 +79,17 @@ public class TestHttpFs {
public void assertValueExists(List<String> values, String expected) {
boolean exists = false;
for (String value : values) {
- if (expected.startsWith(value)) {
+ if (value.length() && expected.startsWith(value)) {
+ exists = true;
+ }
+ }
+ assertTrue(expected + " NOT found!", exists == true);
+ }
+
+ public void assertValueContains(List<String> values, String expected) {
+ boolean exists = false;
+ for (String value : values) {
+ if (value.length() && value.contains(expected)) {
exists = true;
}
}
@@ -119,8 +134,8 @@ public class TestHttpFs {
assertValueExists(sh.getOut(), HTTPFS_SUCCESS);
sh.exec("curl -i '$HTTPFS_PREFIX$testHttpFsFolder?user.name=$USERNAME&op=GETFILESTATUS'");
assertTrue("curl command to create a dir failed", sh.getRet() == 0);
- assertValueExists(sh.getOut(), HTTPFS_SUCCESS);
- assertValueExists(sh.getOut(), "DIRECTORY");
+ assertValueContains(sh.getOut(), "DIRECTORY");
+ assertValueExists(sh.getOut(), HTTP_OK);
}
@Test
@@ -140,13 +155,14 @@ public class TestHttpFs {
}
}
LOG.debug("Datanode location: $datanodeLocation");
- assertValueExists(sh.getOut(), HTTPFS_SUCCESS);
+ assertValueExists(sh.getOut(), HTTP_TMP_REDIR);
+ assertNotNull("Datanode location not in response", datanodeLocation);
sh.exec("curl -i -T $DATA_DIR/$filename '$datanodeLocation' --header 'Content-Type:application/octet-stream'");
assertTrue("curl command to create a file failed", sh.getRet() == 0);
- assertValueExists(sh.getOut(), HTTPFS_SUCCESS);
+ assertValueExists(sh.getOut(), HTTP_CREATE);
sh.exec("curl -i -L '$HTTPFS_PREFIX$testHttpFsFolder/$filename?user.name=$USERNAME&op=OPEN'");
assertTrue("curl command to create a file failed", sh.getRet() == 0);
- assertValueExists(sh.getOut(), HTTPFS_SUCCESS);
+ assertValueExists(sh.getOut(), HTTP_OK);
assertValueExists(sh.getOut(), filenameContent);
}
}