kms/ ├── test_keys.py ├── test_keys_02.py ├── test_keyDetails.py ├── test_keyOps.py ├── test_keyOps_policy.py ├── test_blacklisting.py ├── conftest.py ├── utils.py
Parametrization: For running multiple test cases handling the same functionality in a single method.
fetch_logs: Fetches errors or exceptions from logs when something goes wrong.
cleanup: Cleans up all resources used while testing, ensuring re-runs of test cases.
conftest.pySpecial file used to define fixtures and shared configurations that pytest can automatically discover and use across tests.
Pytest automatically loads this file, aiding code reusability.
utils.pyConsists of helper functions or classes used in tests.
You need to import it wherever required.
test_keys.pyHandles key creation operations.
test_create_key:
Used to create a key with the necessary payload, checks for errors, and cleans up the created key.
test_key_name_validation:
Validates creation of a key with different valid and invalid name formats.
test_duplicate_key_creation:
Checks for creation of duplicate EZ key and checks if it's failing or not.
Similarly, other validations can be implemented on keys.
test_keys_02.pyHandles Bulk key opeartions and other extra cases.
test_keyDetails.pyHandles retrieval of key-related data.
test_get_key_names:
Fetches all created keys and checks the presence of a specific key.
test_get_key_metadata:
Checks metadata of existing and non-existing keys and validates the response.
test_get_key_versions:
Checks key versions for existing and non-existing keys.
test_keyOps.pyHandles operations on keys.
test_temp_key:
Creates a temporary key used for further roll-over functionality.
test_roll_over_key:
Handles proper roll-over of the key.
test_roll_over_new_material:
Checks whether the rolled-over key has new material.
test_generate_data_key_and_decrypt:
test_keyOps_policy.pyHandles operations on keys based on policy enforcement.
Checks Key operation by giving incremental access to each opeartion one by one i.e create, rollover, getKeyVersion, getMetadata, generateeek, decrypteek, delete
test_blacklisting.pyHandles operations on keys before and after blacklisting a user.
Checks Key operation by blacklisting a specific user and checks again after unblacklisting i.e create, rollover,delete key operation