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

Add Mock Test: Uptime #219

Merged
merged 5 commits into from
Oct 3, 2023
Merged

Add Mock Test: Uptime #219

merged 5 commits into from
Oct 3, 2023

Conversation

Sanket-0510
Copy link
Contributor

@Sanket-0510 Sanket-0510 commented Oct 1, 2023

refers issue #213
Add Mocked Tests: Uptime
add tests for uptime.lists_check , uptime.create_check

In API resources the method name is given by the name checks_list(), but the actual method name is list_checks(), thats a point to be noted and hence I have used the method list_check() while writing the tests, correct me if I am wrong.

@Sanket-0510
Copy link
Contributor Author

Sanket-0510 commented Oct 1, 2023

@danaelhe am I on the right path?
Right now have added test's for two methods, need a green flag from your side to add the remaining tests for the uptime, thank you.

@Sanket-0510 Sanket-0510 changed the title added tests for CheckLists and CreateNewCheck methods Add Mock Test: Uptime Oct 1, 2023
…ks, uptime.update_alert, uptime.update_check
@danaelhe
Copy link
Member

danaelhe commented Oct 2, 2023

Looks great!! Apologies, I should've included in the instructions but we lint our tests with the python package black. Currently, the "lint" test is failing for this PR but it's a super easy fix. If you run:poetry run black testswhile in the pydo directory, it will automatically reformat the files and the "lint" test will pass. So just run that command and push up the changes and the lint tests will pass 👍

Also, running make lint-tests will show you all the lint issues that needs to be resolved.

Copy link
Member

@danaelhe danaelhe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks SO GOOD! Just need to push up a commit that fixes the lint tests 👍

@Sanket-0510
Copy link
Contributor Author

Fixed the lint errors but when I run the command poetry run black tests and formatted the code. Running make lint-tests I am getting an error or a warning maybe, am not clear: "line too long" like please look into this and suggest the further changes if any required.

@Sanket-0510 Sanket-0510 requested a review from danaelhe October 3, 2023 07:04
Copy link
Member

@danaelhe danaelhe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AWESOME job!! This is good to merge and ship 🚀

Thank you so much for your contribution!

@danaelhe danaelhe merged commit ad1dfb1 into digitalocean:main Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants