Open lentzi90 opened 4 months ago
/triage accepted /good-first-issue
@lentzi90: This request has been marked as suitable for new contributors.
Please ensure the request meets the requirements listed here.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-good-first-issue
command.
/reopen
@lentzi90: Reopened this issue.
/assign NeerajNagure
/reopen There are a few items in the list still
@lentzi90: Reopened this issue.
@lentzi90 : can i take it up for adding test cases for LoadAuth
Sure! Go ahead @babugeet ! :slightly_smiling_face:
/assign babugeet @lentzi90 : pls review the above PR
The provided test cases cover the following scenarios for the LoadAuth function:
No Authentication Directory Exists:
Test Case: NoAuthDirectory
Description: Tests the scenario where the ironic authentication directory does not exist. The function should return NoAuth as the authentication type without any errors.
Valid Authentication Credentials:
Test Case: ValidAuth
Description: Tests the scenario where the ironic directory exists with valid username and password files. The function should return HTTPBasicAuth with the correct username and password.
Empty Username File:
Test Case: EmptyUsername
Description: Tests the scenario where the username file is present but empty. The function should return an error indicating that the HTTP Basic Auth username is empty.
Empty Password File:
Test Case: EmptyPassword
Description: Tests the scenario where the password file is present but empty. The function should return an error indicating that the HTTP Basic Auth password is empty.
Improve the unit test coverage by writing new test cases or completely new tests. Check the current coverage with
make unit-cover
.Here are some suggestions on where to start. Note that some functions are harder to test than others because they may depend on access to network resources or a database. If you come across such function, skip them and aim for the low hanging fruits instead.