Commit 4ca98772 authored by NSarda's avatar NSarda
Browse files

Fixes for WKS by changing ID changes in payload

parent 85c15576
Pipeline #26226 passed with stages
in 12 minutes and 56 seconds
......@@ -750,10 +750,10 @@ public class IntegrationTestStepDefs implements En {
String idPrefix = authority.concat(AutomationConstants.COLON_SEPARATOR)
.concat(entityType)
.concat(AutomationConstants.COLON_SEPARATOR)
.concat(source);
.concat(AutomationConstants.COLON_SEPARATOR);
String rawRecordId = idPrefix + "-integrationTestData" + RandomStringUtils.randomAlphabetic(15);
String rawRecordId = idPrefix + "integrationTestData" + RandomStringUtils.randomAlphabetic(15);
LOGGER.log(Level.INFO, "Current Record : " + rawRecordId);
return rawRecordId;
}
......
......@@ -9,7 +9,7 @@ Feature: Covers all positive and negative test cases around WKS transformation s
When I hit Storage service put end point with <payload> which is already a WKS record
Then No corresponding transformed record should be created for this wks record in storage
Examples:
Examples:
| payload |
| "/input_payloads/payload_for_wks_record.json" |
......@@ -18,7 +18,7 @@ Feature: Covers all positive and negative test cases around WKS transformation s
When I hit Storage service put end point with <payload> which is already a WKE record
Then No corresponding transformed record should be created for this wke record in storage
Examples:
Examples:
| payload |
| "/input_payloads/payload_for_wke_record.json" |
......@@ -27,7 +27,7 @@ Feature: Covers all positive and negative test cases around WKS transformation s
When I hit Storage service put end point with <payload> which has invalid source so that mapping service does not return any mapping
Then No corresponding transformed record should be created for this record in storage
Examples:
Examples:
| payload |
| "/input_payloads/payload_with_invalid_source.json" |
......@@ -39,7 +39,7 @@ Feature: Covers all positive and negative test cases around WKS transformation s
When I hit Storage service put end point to update raw record with <updatePayload>
Then Existing WKS record in storage should get updated
Examples:
Examples:
| payload | updatePayload |
| "/input_payloads/payload_for_create_operation.json" | "/input_payloads/payload_for_update_operation.json" |
......@@ -55,6 +55,7 @@ Feature: Covers all positive and negative test cases around WKS transformation s
Examples:
| payload | updatePayload |
| "/input_payloads/payload_for_create_operation_multiple_wks.json" | "/input_payloads/payload_for_update_operation_multiple_wks.json" |
@WksService
Scenario Outline: Metablock should get updated as per mapping file and ancestry should be correctly updated.
When I hit Storage service put end point with <payload>
......@@ -64,7 +65,7 @@ Feature: Covers all positive and negative test cases around WKS transformation s
And Ancestry block should be updated correctly
#And Metablock references in the transformed record should be updated as defined in <expectedWksRecord> as per <MappingFile>
Examples:
Examples:
| payload | expectedWksRecord | MappingFile |
| "/input_payloads/payload_for_meta_and_ancestry.json" | "/input_payloads/expected_transformed_record_draft.json" | "/input_payloads/mappingFile.json" |
......@@ -74,7 +75,7 @@ Feature: Covers all positive and negative test cases around WKS transformation s
Then Transformation of Wks records should be skipped
And All other valid records should get transformed
Examples:
Examples:
| payload |
| "/input_payloads/payload_for_bulk_records.json" |
......@@ -85,7 +86,7 @@ Feature: Covers all positive and negative test cases around WKS transformation s
When I hit Storage service put end point with <parentPayload> whose raw record contains relationship to record raw1
Then Transformed record should contain relationship to wks of raw1 <relatedEntityPayload> as per <expectedRelationshipBlock>
Examples:
Examples:
| relatedEntityPayload | parentPayload | expectedRelationshipBlock |
| "/input_payloads/relationship/raw_having_wks_created.json" | "/input_payloads/relationship/recordRelatedToEntityHavingWksCreated.json" | "/input_payloads/relationship/expectedRelationship_for_rawHavingWksCreated.json" |
......@@ -96,7 +97,7 @@ Feature: Covers all positive and negative test cases around WKS transformation s
When I hit wks service with <parentPayload> whose raw record contains relationship to above records
Then Transformed record should contain relationship to wks records of raw1 and raw2 <relatedEntityPayload> as per <expectedRelationshipBlock>
Examples:
Examples:
| relatedEntityPayload | parentPayload | expectedRelationshipBlock |
| "/input_payloads/relationship/multiple_raw_having_wks_created.json" | "/input_payloads/relationship/recordRelatedToMultipleEntitiesHavingWKSCreated.json" | "/input_payloads/relationship/expectedRelationship_for_multipleRelatedRawWithWksCreated.json" |
......@@ -132,7 +133,7 @@ Feature: Covers all positive and negative test cases around WKS transformation s
| "/input_payloads/relationship/raw_having_wks_created_log_entity.json" | "/input_payloads/relationship/recordRelatedToEntityHavingWksCreatedLogEntity.json" | "/input_payloads/relationship/expectedRelationship_for_rawHavingWksCreated.json" |
@Not_yet_implemented_for_gitlab_gcp
@RelationshipValidation
Scenario Outline: WKS record relationships block should show relation to wks record created by wks service, with mapping definition targeted to schema of same authority and having higher major version
Given I hit Storage service put end point with <relatedEntityPayload> to persist a record say raw1
And I verify that three wks records are created for this raw record raw1
......@@ -140,7 +141,7 @@ Feature: Covers all positive and negative test cases around WKS transformation s
When I hit Storage service put end point with <parentPayload> whose raw record contains relationship to record raw1
Then Transformed record should contain relationship to wks with same authority of raw1 <relatedEntityPayload> and with higher major version as per <expectedRelationshipBlock>
Examples:
Examples:
| relatedEntityPayload | relatedEntityPayload2 | parentPayload | expectedRelationshipBlock |
| "/input_payloads/relationship/raw_having_wks_created_well_entity.json" | "/input_payloads/relationship/recordRelatedToAnotherRawButNotCreatedByWKSService.json" | "/input_payloads/relationship/recordRelatedToEntityHavingWksCreatedWellEntity.json" | "/input_payloads/relationship/expectedRelationship_for_rawHavingWksCreated.json" |
......
......@@ -4,7 +4,7 @@
"Spud date": "atspud",
"UWI": "rawHavingWksCreated"
},
"id": "<tenant_name>:wellbore:at-record1ForMultipleRelatedEntityCheck",
"id": "<tenant_name>:wellbore:record1ForMultipleRelatedEntityCheck",
"kind": "<tenant_name>:at:wellbore:1.0.0",
"acl": {
"viewers": [
......@@ -30,7 +30,7 @@
"Spud date": "atspud",
"UWI": "rawHavingWksCreated"
},
"id": "<tenant_name>:wellbore:at-record2ForMultipleRelatedEntityCheck",
"id": "<tenant_name>:wellbore:record2ForMultipleRelatedEntityCheck",
"kind": "<tenant_name>:at:wellbore:1.0.0",
"acl": {
"viewers": [
......
......@@ -4,7 +4,7 @@
"Spud date": "atspud",
"UWI": "rawHavingWksCreated"
},
"id": "<tenant_name>:wellbore:at-rawHavingWksCreated",
"id": "<tenant_name>:wellbore:rawHavingWksCreated",
"kind": "<tenant_name>:at:wellbore:1.0.0",
"acl": {
"viewers": [
......
......@@ -4,7 +4,7 @@
"Spud date": "atspud",
"UWI": "rawHavingWksCreated"
},
"id": "<tenant_name>:log:ihs-rawHavingWksCreated",
"id": "<tenant_name>:log:rawHavingWksCreated",
"kind": "<tenant_name>:ihs:log:1.0.0",
"acl": {
"viewers": [
......
......@@ -4,7 +4,7 @@
"Spud date": "atspud",
"UWI": "rawHavingWksCreated"
},
"id": "<tenant_name>:well-oga-rawHavingWksCreated",
"id": "<tenant_name>:well:rawHavingWksCreated",
"kind": "<tenant_name>:oga:well:1.0.0",
"acl": {
"viewers": [
......
......@@ -5,7 +5,7 @@
"id": "<CreateUniqueID>",
"ancestry": {
"parents": [
"<tenant_name>:well:oga-rawHavingWksCreated"
"<tenant_name>:well:rawHavingWksCreated"
]
},
"kind": "<tenant_name>:no:wksMapping:1.0.0",
......
......@@ -3,7 +3,7 @@
"data": {
"relationships": {
"wellbore": {
"id": "<tenant_name>:wellbore:at-rawHavingWksCreated"
"id": "<tenant_name>:wellbore:rawHavingWksCreated"
}
}
},
......
......@@ -3,7 +3,7 @@
"data": {
"relationships": {
"wellbore": {
"id": "<tenant_name>:log:ihs-rawHavingWksCreated"
"id": "<tenant_name>:log:rawHavingWksCreated"
}
}
},
......
......@@ -3,7 +3,7 @@
"data": {
"relationships": {
"wellbore": {
"id": "<tenant_name>:well:oga-rawHavingWksCreated"
"id": "<tenant_name>:well:rawHavingWksCreated"
}
}
},
......
......@@ -4,8 +4,8 @@
"relationships": {
"wellbores": {
"ids": [
"<tenant_name>:wellbore:at-record1ForMultipleRelatedEntityCheck",
"<tenant_name>:wellbore:at-record2ForMultipleRelatedEntityCheck"
"<tenant_name>:wellbore:record1ForMultipleRelatedEntityCheck",
"<tenant_name>:wellbore:record2ForMultipleRelatedEntityCheck"
],
"names": [
"record1ForMultipleRelatedEntityCheck",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment