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 more v2, v3, and v4 task metadata tests #3722

Merged
merged 3 commits into from
May 31, 2023

Conversation

amogh09
Copy link
Contributor

@amogh09 amogh09 commented May 26, 2023

Summary

  • Add more tests for v2, v3, and v4 task metadata endpoints. Currently there are some error cases that are not covered by existing tests. This change fills that gap in coverage.
  • General improvements to the test file.
    • Replace some global variables for expected responses with getter functions so that tests are free to mutate the expected responses if needed without affecting other tests.
    • Consolidate all cases for v2, v3, and v4 task metadata endpoints into one test each to promote code reuse and improve readability and maintainability.

Implementation details

  • Add TestV2TaskMetadata, TestV3TaskMetadata, and TestV4TaskMetadata functions for testing v2, v3, and v4 task metadata endpoints, respectively. These test functions include all happy and error cases. Remove existing tests for these endpoints as they are covered in the new test functions.
  • Replace some global variables with getter functions for better test isolation (tests are free to mutate the values returned by the getter functions without affecting other tests).

Testing

New tests cover the changes: yes

Description for the changelog

Add more v2, v3, and v4 task metadata tests

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@amogh09 amogh09 changed the base branch from master to dev May 26, 2023 19:59
@amogh09 amogh09 marked this pull request as ready for review May 26, 2023 20:12
@amogh09 amogh09 requested a review from a team as a code owner May 26, 2023 20:12
@amogh09 amogh09 changed the title Add more v4 task metadata tests Add more v2, v3, and v4 task metadata tests May 26, 2023
mythri-garaga
mythri-garaga previously approved these changes May 30, 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.

4 participants