Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit test coverage improvement in BMO #1574

Closed
7 tasks done
lentzi90 opened this issue Mar 1, 2024 · 14 comments · Fixed by #1579, #1606 or #2013
Closed
7 tasks done

Unit test coverage improvement in BMO #1574

lentzi90 opened this issue Mar 1, 2024 · 14 comments · Fixed by #1579, #1606 or #2013
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. triage/accepted Indicates an issue is ready to be actively worked on.

Comments

@lentzi90
Copy link
Member

lentzi90 commented Mar 1, 2024

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.

@metal3-io-bot metal3-io-bot added the needs-triage Indicates an issue lacks a `triage/foo` label and requires one. label Mar 1, 2024
@lentzi90
Copy link
Member Author

lentzi90 commented Mar 1, 2024

/triage accepted
/good-first-issue

@metal3-io-bot
Copy link
Contributor

@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.

In response to this:

/triage accepted
/good-first-issue

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@metal3-io-bot metal3-io-bot added triage/accepted Indicates an issue is ready to be actively worked on. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. and removed needs-triage Indicates an issue lacks a `triage/foo` label and requires one. labels Mar 1, 2024
@lentzi90
Copy link
Member Author

lentzi90 commented Mar 6, 2024

/reopen

@metal3-io-bot metal3-io-bot reopened this Mar 6, 2024
@metal3-io-bot
Copy link
Contributor

@lentzi90: Reopened this issue.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@NeerajNagure
Copy link
Contributor

/assign NeerajNagure

@lentzi90
Copy link
Member Author

/reopen
There are a few items in the list still

@metal3-io-bot metal3-io-bot reopened this May 24, 2024
@metal3-io-bot
Copy link
Contributor

@lentzi90: Reopened this issue.

In response to this:

/reopen
There are a few items in the list still

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@babugeet
Copy link
Contributor

babugeet commented Jun 5, 2024

@lentzi90 : can i take it up for adding test cases for LoadAuth

@lentzi90
Copy link
Member Author

lentzi90 commented Jun 5, 2024

Sure! Go ahead @babugeet ! 🙂

@babugeet
Copy link
Contributor

babugeet commented Jun 5, 2024

/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.

@metal3-io-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues will close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@metal3-io-bot metal3-io-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 4, 2024
@Rozzii
Copy link
Member

Rozzii commented Sep 11, 2024

/remove-lifecycle stale

@metal3-io-bot metal3-io-bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 11, 2024
@Rozzii
Copy link
Member

Rozzii commented Oct 24, 2024

@lentzi90 this is still open, can we close this ? If not I would like to move this to the general roadmap.

@lentzi90
Copy link
Member Author

Yes let's keep it open until we finish the last few points on the list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. triage/accepted Indicates an issue is ready to be actively worked on.
Projects
Status: Done / Closed
5 participants