-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Bmoric/controller utest #21882
Bmoric/controller utest #21882
Conversation
|
||
@Test | ||
void testHealth() throws IOException { | ||
Mockito.when(healthCheckHandler.health()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lack of this mocking is the reason why we were runnign in a NotFound error. It was not because the route was not register but because the response was null which lead micronaut to return a notFound error.
Airbyte Code Coverage
|
* Add attempt and connection test * Add more test * Add more test * pmd
defaultValue = StringUtils.TRUE, | ||
value = StringUtils.TRUE) | ||
@SuppressWarnings("PMD.AbstractClassWithoutAbstractMethod") | ||
abstract class BaseControllerTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be useful to add some comments about the intent of the tests (testing the error wrapping of the controllers mostly?). It feels very redundant to add that to every single test class, the base class might be a good place for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Tagged as ready to ship since it is only UTests |
/create-platform-pr |
/create-platform-pr |
/create-platform-pr |
This reverts commit da17885.
* Tmp * Tmp * Tmp * tmp * Make test to work * PMD and update test * Bmoric/add more controller tests (#22113) * Add attempt and connection test * Add more test * Add more test * pmd * Rm unused import * Add comment * More test and address comments * PR comments
* Tmp * Tmp * Tmp * tmp * Make test to work * PMD and update test * Bmoric/add more controller tests (airbytehq#22113) * Add attempt and connection test * Add more test * Add more test * pmd * Rm unused import * Add comment * More test and address comments * PR comments
This reverts commit da17885.
What
Add a UTest to check the return code of our API endpoints.
How
Create a UTEST (actually, it is more an integration test) that checks that the endpoint we're call returns the expected code. This PR only contains the HealthCheck. Other PR(s) will add the other endpoints.