-
Notifications
You must be signed in to change notification settings - Fork 426
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
Clean up sink_test.go #394
Comments
/kind cleanup |
/area testing |
/assign |
This commit refactors sink_test: 1. Common setup/comparison extracted to helper methods 2. Removes some redundant params from the test resources 3. Remove the test that checks that we respond in 1s or less. Since we are using fake clients in these examples, this test is not as useful as it being in an e2e test. Part of tektoncd#394
This commit refactors sink_test: 1. Common setup/comparison extracted to helper methods 2. Removes some redundant params from the test resources 3. Remove the test that checks that we respond in 1s or less. Since we are using fake clients in these examples, this test is not as useful as it being in an e2e test. Part of tektoncd#394 Signed-off-by: Dibyo Mukherjee <dibyo@google.com>
This commit refactors sink_test: 1. Common setup/comparison extracted to helper methods 2. Removes some redundant params from the test resources 3. Remove the test that checks that we respond in 1s or less. Since we are using fake clients in these examples, this test is not as useful as it being in an e2e test. Part of tektoncd#394 Signed-off-by: Dibyo Mukherjee <dibyo@google.com>
This commit refactors sink_test: 1. Common setup/comparison extracted to helper methods 2. Removes some redundant params from the test resources 3. Remove the test that checks that we respond in 1s or less. Since we are using fake clients in these examples, this test is not as useful as it being in an e2e test. Part of tektoncd#394 Signed-off-by: Dibyo Mukherjee <dibyo@google.com>
This commit refactors sink_test: 1. Common setup/comparison extracted to helper methods 2. Removes some redundant params from the test resources 3. Remove the test that checks that we respond in 1s or less. Since we are using fake clients in these examples, this test is not as useful as it being in an e2e test. Part of tektoncd#394 Signed-off-by: Dibyo Mukherjee <dibyo@google.com>
This commit refactors sink_test: 1. Common setup/comparison extracted to helper methods 2. Removes some redundant params from the test resources 3. Remove the test that checks that we respond in 1s or less. Since we are using fake clients in these examples, this test is not as useful as it being in an e2e test. Part of #394 Signed-off-by: Dibyo Mukherjee <dibyo@google.com>
#413 fixed most of this -- most setup is now abstracted out into helper functions. Table driven tests will be a bit harder here given the variety of things were are asserting. |
@dibyom: Closing this issue. In response to this:
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. |
The sink_test.go file has a lot of messy tests with repeated code (especially for the
HandleEvent()
function). It's difficult to write clean tests for this file, because it's pretty high-level. However, I think that we can clean up some of the code, and hopefully use some table driven tests to abstract away some of the testing logic.The text was updated successfully, but these errors were encountered: