What work was completed during the said period?
- Implemented unit tests for Internal server functionalities[1][2][3].
- Implement unit tests for internal service functionality[4][5][6].
- Refactored existing codebase to improve readability and maintainability.
Explanation of the unit tests:
-
test_lockFile(): Verifies that the lockFile function successfully creates a write lock on the specified file.
-
test_unlockFile(): Ensures that the unlockFile function can properly unlock a previously locked file.
-
test_getStatusId(): Checks that getStatusId returns a valid, non-null status ID for a given process ID.
-
test_getStatusFile(): Confirms that _getStatusFile correctly retrieves the content of the status file for a given process.
-
test_getStatus(): Validates that _getStatus returns non-null status information for a specified service ID.
-
test_unhandleStatus(): Ensures that unhandleStatus correctly deletes the status file for a service.
-
test_updateStatus(): Verifies that _updateStatus updates the service’s status successfully and returns an appropriate success code.
-
test_zoo_path_compare: Verifies the comparison of file paths, including handling of NULL and identical paths.
-
test_getVersionId: Checks if the version ID is correctly returned for given version strings.
-
test_get_uuid: Tests that the generated UUID is 36 characters long and formatted correctly with hyphens.
-
test_parseIdentifier: Validates that the identifier is correctly parsed and the output buffer is properly set.
-
test_from_hex: Confirms the conversion from hexadecimal characters to integer values.
-
test_to_hex: Checks the conversion of integer values to their corresponding hexadecimal characters.
-
test_url_encode: Ensures that spaces and special characters in strings are correctly URL-encoded.
-
test_url_decode: Verifies that URL-encoded strings are correctly decoded back to their original form.
-
test_isValidLang: Tests if the specified language is valid based on the configuration settings.
-
test_getEncoding: Checks if the encoding is retrieved correctly from the maps or defaults to “UTF-8”.
-
test_getVersion: Validates the retrieval of version information from the maps, with a default fallback.
-
test_readGeneratedFile: Ensures that the content of a file is read and stored in the maps correctly.
-
test_writeFile: Verifies that content is written to a file and matches the expected output.
-
test_dumpMapsValuesToFiles: Tests the functionality of dumping map values to files and checks if the files are created.
What do I plan to do the next week?
- Continue refining and expanding unit tests for service_internal.
- Implement unit tests for response print & request parser.
- Review and update documentation and tests to reflect any changes or new features.
Am I blocked on anything?
No, currently I am not blocked on anything.
Links:
[1]https://github.com/dhruvmehtaaa/ZOO-Project/blob/main/zoo-project/zoo-kernel/server_internal.c
[2]https://drive.google.com/file/d/1bZWerC27mNz1JGQpcDWaTgc1403jnRZq/view?usp=sharing
[3]https://github.com/dhruvmehtaaa/ZOO-Project/blob/Week-9/testing/unit_tests/service_json.c
[4]https://github.com/dhruvmehtaaa/ZOO-Project/blob/main/zoo-project/zoo-kernel/service_internal.c
[5]https://drive.google.com/file/d/1TcqewgGVJhSZo0RSERouUbsiwukmx0k5/view?usp=sharing
[6]https://github.com/dhruvmehtaaa/ZOO-Project/blob/Week-9/testing/unit_tests/service_internal.c