Closed piraveena closed 2 years ago
Builder got failed with the below testcases https://jenkins-support-all.wso2.com/jenkins/job/DEV_PR_BUILDER/1608/
Test Result (2 failures / +2)org.wso2.identity.integration.test.rest.api.user.approval.v1.UserMeApprovalTest.testListTasksWhenEmptyorg.wso2.identity.integration.test.rest.api.user.approval.v1.UserMeApprovalTest.testListTasksWhenAvailable
--
(2 failures / +2)
[org.wso2.identity.integration.test.rest.api.user.approval.v1.UserMeApprovalTest.testListTasksWhenEmpty](https://jenkins-support-all.wso2.com/jenkins/job/DEV_PR_BUILDER/org.wso2.is$org.wso2.carbon.identity.integration.backend.test/1608/testReport/junit/org.wso2.identity.integration.test.rest.api.user.approval.v1/UserMeApprovalTest/testListTasksWhenEmpty/)
[org.wso2.identity.integration.test.rest.api.user.approval.v1.UserMeApprovalTest.testListTasksWhenAvailable](https://jenkins-support-all.wso2.com/jenkins/job/DEV_PR_BUILDER/org.wso2.is$org.wso2.carbon.identity.integration.backend.test/1608/testReport/junit/org.wso2.identity.integration.test.rest.api.user.approval.v1/UserMeApprovalTest/testListTasksWhenAvailable/)
These two are intermittent test failures. Hence merging this
Purpose
Resolves https://github.com/wso2/product-is/issues/9548
Analysis When remove the read-only sub-attributes https://github.com/wso2/charon/blob/v3.4.23/modules/charon-core/src/main/java/org/wso2/charon3/core/schema/AbstractValidator.java#L383, we remove them based on the attribute name. Because, internally we use attribute names to identify the attributes. When sub attributes have same name(Eg: value (
PendingEmails.value
andmanager.value
have the same attribute name), it remove the different attribute. It loops through and checks forPendingEmails.value
read_only attribute, it deletes themanager.value
.If we change the attribute names to unique, it will change the payload. So when we remove the reanoly- attributes, we compare the attribute URI and do the deletion since attribute URI is unique.
After the fix
Sample request
Sample response:
Goals
Approach
User stories
Release note
Documentation
Training
Certification
Marketing
Automation tests
Security checks
Samples
Related PRs
Migrations (if applicable)
Test environment
Learning