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

Validate user store domain of the parent user invitation flow #402

Conversation

sadilchamishka
Copy link
Contributor

@sadilchamishka sadilchamishka commented Oct 17, 2024

Purpose

Add a validation logic to verify the provided invitation user store domain is valid or not https://github.com/wso2-extensions/identity-organization-management/pull/402/files#diff-ebba2067b3fa55047938aa6006a6864220dd3d4de3854fc2894d203714e0e926R737-R746

In this effort the following improvements are made.

  • Fix codecov plugin and report generation issue.
  • Remove powermock and replace tests with Mockito
  • Oraganize the invitation core test class.

Related Issues

Copy link

codecov bot commented Oct 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 25.76%. Comparing base (f389c4b) to head (a310b29).
Report is 9 commits behind head on main.

Additional details and impacted files
@@              Coverage Diff              @@
##               main     #402       +/-   ##
=============================================
- Coverage     41.53%   25.76%   -15.78%     
- Complexity      218      339      +121     
=============================================
  Files            30       50       +20     
  Lines          1678     4142     +2464     
  Branches        187      476      +289     
=============================================
+ Hits            697     1067      +370     
- Misses          938     2996     +2058     
- Partials         43       79       +36     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

Copy link

@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/11392719570

@sadilchamishka sadilchamishka force-pushed the validate-user-store-domain-invite-users branch from e653cc1 to 9b9a9d1 Compare October 23, 2024 02:16
@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

Copy link

@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/11473150644

},
{
true, "true", true, false
false, null, "false", true
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same test cases, order has changed for an experiment. Might revert back


// Mocking Role List
RoleBasicInfo role1 = new RoleBasicInfo("1", "Role1");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These methods have used private mocking and need to rewrite test cases.

public void testGetUserGroups() throws Exception {

// Mocking IdentityTenantUtil.getTenantId static method
when(IdentityTenantUtil.getTenantId(anyString())).thenReturn(1);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These methods have used private mocking and need to rewrite test cases.

@sadilchamishka sadilchamishka merged commit fbb6e2b into wso2-extensions:main Oct 24, 2024
3 of 4 checks 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.

3 participants