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

feature/user_signup_6 #9

Open
wants to merge 26 commits into
base: main
Choose a base branch
from

Conversation

lohit97
Copy link

@lohit97 lohit97 commented Nov 1, 2023

No description provided.

@lohit97 lohit97 changed the title Feature/user signup feature/user_signup Nov 1, 2023
@lohit97 lohit97 changed the title feature/user_signup feature/user_signup_6 Nov 1, 2023
src/controllers/users.go Outdated Show resolved Hide resolved
src/controllers/users.go Outdated Show resolved Hide resolved
src/main.go Outdated Show resolved Hide resolved
Copy link
Owner

@championswimmer championswimmer left a comment

Choose a reason for hiding this comment

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

1 more change requested, apart from that, can we also add a test for the code that was added?

should test

  • adding users
  • adding 2 users with same email and the error that happens
  • sending unparseable json in the request body

there is an example test in the test folder, can just expand on that.

src/server/server.go Outdated Show resolved Hide resolved
@lohit97
Copy link
Author

lohit97 commented Nov 10, 2023

@championswimmer Locally also I replicated the timeout error from tests. I increased the timeout duration to 1.5 seconds and the tests passed with duration of 1.1 seconds. Is there something wrong with the way DB ops are being done or is it just that test file DB (in-memory) I/O is causing some issue?

@lohit97
Copy link
Author

lohit97 commented Nov 10, 2023

0903309

The tests seem to be passing on GH Actions (on the forked repo) also now within the timeout duration. Not sure. Too tight timeout duration?
https://github.com/lohit97/onepixel_backend/actions/runs/6829950274

@championswimmer
Copy link
Owner

0903309

The tests seem to be passing on GH Actions (on the forked repo) also now within the timeout duration. Not sure. Too tight timeout duration? lohit97/onepixel_backend/actions/runs/6829950274

We can increase the timeout a bit if we want to, sure.

Copy link

codecov bot commented Nov 11, 2023

Welcome to Codecov 🎉

Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment.

Thanks for integrating Codecov - We've got you covered ☂️

@lohit97
Copy link
Author

lohit97 commented Nov 11, 2023

Added a couple of tests to increase coverage. A few more tests can be added to increase but that will require mocking the DB. @championswimmer Do we need that? Although, I think coverage criteria should pass without that.

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