Details
-
Improvement
-
Status: Resolved
-
Blocker
-
Resolution: Fixed
-
3.4.0
-
Centos 7, Centos 8, Debian 10, Ubuntu Focal
-
Reviewed
-
Important
Description
Currently, the test cases written in hdfs-tool-test.h isn't easy to reuse. Primarily because the expectations are different for each HDFS tool. I realized this while I was creating the PR for HDFS-16260. For instance, passing more than one argument is erroneous to hdfs_allowSnapshot while it's the only valid scenario for hdfs_deleteSnapshot.
Thus, it won't be possible to reuse the test cases without decoupling the expectations from the test case definitions. The solution here is to move the expectations to the corresponding mock classes and invoke the call to set them up in the test cases after the creation of mock instances.
Attachments
Issue Links
- blocks
-
HDFS-16260 Make hdfs_deleteSnapshot tool cross platform
-
- Resolved
-
- links to