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

init web tests #372

Merged
merged 2 commits into from
Jan 29, 2020
Merged

init web tests #372

merged 2 commits into from
Jan 29, 2020

Conversation

ransomw1c
Copy link
Contributor

start smoke tests on pkg/web.

specifically, the goal here is to land a demo of how to test the chi router used to implement the web front.

notice in particular that pkg/web's import of pkg/core is mocked out in test in order to test the web server implementation.

Copy link
Contributor

@fredbi fredbi left a comment

Choose a reason for hiding this comment

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

overall heading in the right direction. Thank you for your thoroughness in doing this.
Looking forward to seeing it in its final shape

@ransomw1c ransomw1c force-pushed the j1599-webtest--wip branch 5 times, most recently from 925241b to 56727e0 Compare January 28, 2020 22:57
@ransomw1c ransomw1c changed the title [wip] init web tests init web tests Jan 28, 2020
@ransomw1c ransomw1c marked this pull request as ready for review January 29, 2020 00:24
@ransomw1c
Copy link
Contributor Author

the mocks setup here isn't particularly fleshed out.. in the interest of time, in the ignorance of apis.

would be happy to add a little more here for the sake of learning how to use mocks (incl. generated mocks) better.

i suppose this is alright towards the goals of the issue/description?

Copy link
Contributor

@fredbi fredbi left a comment

Choose a reason for hiding this comment

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

@ransomw1c just out of curiosity, how does this fare regarding the coverage metrics?

go.sum Show resolved Hide resolved
pkg/web/routes.go Show resolved Hide resolved
pkg/web/routes_test.go Outdated Show resolved Hide resolved
pkg/web/routes_test.go Outdated Show resolved Hide resolved
@ransomw1c ransomw1c mentioned this pull request Jan 29, 2020
Signed-off-by: Ransom Williams <[email protected]>
@ransomw1c
Copy link
Contributor Author

ransomw1c commented Jan 29, 2020

coverage metrics

they're ok, i guess?

https://4394-138348481-gh.circle-artifacts.com/0/coverage-report/coverage_non_cafs.html#file82

the main omission is tests error-handling, as mentioned in the comments. #377 can include such tests?

Signed-off-by: Ransom Williams <[email protected]>
@ransomw1c ransomw1c merged commit 667ef69 into master Jan 29, 2020
@ransomw1c ransomw1c deleted the j1599-webtest--wip branch January 29, 2020 18:51
@ransomw1c ransomw1c mentioned this pull request Jan 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants