hdfs/ ├── test_encryption.py ├── test_encryption02.py ├── test_encryption03.py ├── test_config.py #stores all constants and HDFS commands ├── conftest.py #sets up the environment ├── utils.py #utility methods
setup_environmentHandled in conftest.py file Before running the test cases, some environment configurations are needed:
core-site.xml file.get_error_logs:
Fetches logs from both KMS and HDFS containers. Helps in identifying issues when errors or exceptions occur during testing.
run_command:
Executes all necessary HDFS commands inside the containers.
test_encryption.pyHandles the full HDFS encryption cycle, including setup, positive and negative test scenarios, and cleanup.
test_encryption02.pyHandles the Check if after key roll over old files can be read or not Check if after key roll over new files can be written and read too Check read operation on file after key deletion
test_encryption03.pyHandles the Test case on cross Encryption zone operations
This test suite ensures that HDFS encryption and access control mechanisms function as expected, validating both authorized and unauthorized access scenarios.