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 integration tests for Organizations Meta Attributes GET API #21054

Conversation

BimsaraBodaragama
Copy link
Member

Description

This PR introduces integration tests for the Organizations Meta Attributes pagination functionality. It includes tests for validating the correct behavior of pagination, handling edge cases, and proper error handling when invalid inputs are provided.

Purpose

The purpose of this PR is to enhance test coverage for the meta attributes pagination feature in the Organizations API by implementing comprehensive tests that verify correct pagination behavior and error responses for edge cases.

Goals

  • Validate the correct functionality of pagination for meta attributes, including forward and backward navigation.
  • Ensure appropriate error responses for invalid inputs, such as invalid pagination limits and cursor values.
  • Improve the overall stability and reliability of the API by covering both standard and edge cases related to meta attributes.

Approach

  1. Success Tests:
  • Added tests for creating meta attributes and validating pagination with different limits (1, 2, 3, 5, 10, 13) and edge case limits.
  • Implemented forward and backward pagination tests for meta attributes, ensuring proper handling of next and previous links.
  • Included validation of attributes' order across pages, based on various limit values, ensuring consistency with the expected order (Unicode Character order).
  1. Failure Tests:
  • Tested invalid pagination limits (e.g., -1) and verified that the API returns a 400 Bad Request response.
  • Added tests for invalid after and before cursor values to ensure proper error handling with 400 responses.

@BimsaraBodaragama BimsaraBodaragama changed the title Add integration tests for Organizations Meta Attributes Pagination Add integration tests for Organizations Meta Attributes GET API Sep 4, 2024
@jenkins-is-staging
Copy link
Contributor

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/10714348123

@jenkins-is-staging
Copy link
Contributor

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/10714348123
Status: success

Copy link
Contributor

@jenkins-is-staging jenkins-is-staging left a comment

Choose a reason for hiding this comment

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

Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/10714348123

@BimsaraBodaragama
Copy link
Member Author

All the tests passed locally:
image
Source: target/surefire-reports/emailable-report.html

…zation discovery GET in the organization meta attributes GET
@jenkins-is-staging
Copy link
Contributor

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/10734757983

@jenkins-is-staging
Copy link
Contributor

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/10734757983
Status: cancelled

@jenkins-is-staging
Copy link
Contributor

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/10734772136

@jenkins-is-staging
Copy link
Contributor

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/10734772136
Status: success

Copy link
Contributor

@jenkins-is-staging jenkins-is-staging left a comment

Choose a reason for hiding this comment

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

Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/10734772136

@BimsaraBodaragama
Copy link
Member Author

All the tests passed locally:
image
Source: target/surefire-reports/emailable-report.html

@SujanSanjula96 SujanSanjula96 merged commit 0ad488d into wso2:master Sep 7, 2024
1 check passed
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