Skip to content

Commit

Permalink
Merge pull request #1098 from eclipse-tractusx/fix/remove-uncategorie…
Browse files Browse the repository at this point in the history
…sed-identifier

fix(bpdm-cleaning): Removed assignment of uncategorized identifier while performing cleaning task process.
  • Loading branch information
SujitMBRDI authored Oct 30, 2024
2 parents c988c6a + ef2d171 commit e230e99
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ For changes to the BPDM Helm charts please consult the [changelog](charts/bpdm/C
- BPDM Gate: Fixed logic for identifiers to retrieve only generic type on output business partner
- BPDM Gate: Fixed construction logic for states and identifiers by enabling business partner type
- BPDM Pool: When processing golden record tasks the Pool now ignores isCatenaXMemberData field if it is set to null. ([#1069](https://github.com/eclipse-tractusx/bpdm/issues/1069))
- BPDM Gate: Fixed gate output logic to provide states based on business partner type.
- BPDM Gate: Fixed gate output logic to provide states based on business partner type.
- BPDM Cleaning Service Dummy: Removed assignment of uncategorized identifier while performing cleaning task process.

## [6.1.0] - [2024-07-15]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ class CleaningServiceDummy(

val cleanedBusinessPartner = BusinessPartner(
nameParts = businessPartner.nameParts,
uncategorized = businessPartner.uncategorized,
// Identifiers are taken as legal identifiers and should be removed from uncategorized collection
uncategorized = businessPartner.uncategorized.copy(identifiers = emptyList()),
owningCompany = businessPartner.owningCompany,
legalEntity = cleanLegalEntity(businessPartner, sharedByOwner),
site = cleanSite(businessPartner, sharedByOwner),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ class CleaningServiceApiCallsTest @Autowired constructor(
.copyWithBpnReferences(BpnReference.empty)
.copyWithLegalAddress(PostalAddress.empty)
.copyWithSiteMainAddress(PostalAddress.empty)
.copy(
uncategorized = businessPartnerFactory.createFullBusinessPartner("test").uncategorized.copy(
identifiers = emptyList() // Assign empty list to uncategorized identifiers
)
)

val resolveMapping = mockOrchestratorResolveApi()
mockOrchestratorReserveApi(mockedBusinessPartner)
Expand Down Expand Up @@ -130,6 +135,11 @@ class CleaningServiceApiCallsTest @Autowired constructor(
val mockedBusinessPartner = businessPartnerFactory.createFullBusinessPartner("test")
.copyWithLegalAddress(PostalAddress.empty)
.copyWithSiteMainAddress(PostalAddress.empty)
.copy(
uncategorized = businessPartnerFactory.createFullBusinessPartner("test").uncategorized.copy(
identifiers = emptyList() // Assign empty list to uncategorized identifiers
)
)

val resolveMapping = mockOrchestratorResolveApi()
mockOrchestratorReserveApi(mockedBusinessPartner)
Expand Down Expand Up @@ -158,6 +168,11 @@ class CleaningServiceApiCallsTest @Autowired constructor(
.copyWithBpnReferences(BpnReference.empty)
.copyWithLegalAddress(PostalAddress.empty)
.copy(site = null)
.copy(
uncategorized = businessPartnerFactory.createFullBusinessPartner("test").uncategorized.copy(
identifiers = emptyList() // Assign empty list to uncategorized identifiers
)
)

val resolveMapping = mockOrchestratorResolveApi()
mockOrchestratorReserveApi(mockedBusinessPartner)
Expand Down Expand Up @@ -185,6 +200,11 @@ class CleaningServiceApiCallsTest @Autowired constructor(
val mockedBusinessPartner = businessPartnerFactory.createFullBusinessPartner("test")
.copyWithLegalAddress(PostalAddress.empty)
.copy(site = null)
.copy(
uncategorized = businessPartnerFactory.createFullBusinessPartner("test").uncategorized.copy(
identifiers = emptyList() // Assign empty list to uncategorized identifiers
)
)

val resolveMapping = mockOrchestratorResolveApi()
mockOrchestratorReserveApi(mockedBusinessPartner)
Expand Down Expand Up @@ -212,6 +232,11 @@ class CleaningServiceApiCallsTest @Autowired constructor(
.copyWithBpnReferences(BpnReference.empty)
.copyWithLegalAddress(PostalAddress.empty)
.copy(additionalAddress = null)
.copy(
uncategorized = businessPartnerFactory.createFullBusinessPartner("test").uncategorized.copy(
identifiers = emptyList()
)
)

val resolveMapping = mockOrchestratorResolveApi()
mockOrchestratorReserveApi(mockedBusinessPartner)
Expand Down Expand Up @@ -239,6 +264,11 @@ class CleaningServiceApiCallsTest @Autowired constructor(
val mockedBusinessPartner = businessPartnerFactory.createFullBusinessPartner("test")
.copyWithLegalAddress(PostalAddress.empty)
.copy(additionalAddress = null)
.copy(
uncategorized = businessPartnerFactory.createFullBusinessPartner("test").uncategorized.copy(
identifiers = emptyList() // Assign empty list to uncategorized identifiers
)
)

val resolveMapping = mockOrchestratorResolveApi()
mockOrchestratorReserveApi(mockedBusinessPartner)
Expand Down Expand Up @@ -266,6 +296,11 @@ class CleaningServiceApiCallsTest @Autowired constructor(
.copyWithBpnReferences(BpnReference.empty)
.copyWithSiteMainAddress(null)
.copy(additionalAddress = null)
.copy(
uncategorized = businessPartnerFactory.createFullBusinessPartner("test").uncategorized.copy(
identifiers = emptyList() // Assign empty list to uncategorized identifiers
)
)

val resolveMapping = mockOrchestratorResolveApi()
mockOrchestratorReserveApi(mockedBusinessPartner)
Expand All @@ -292,6 +327,11 @@ class CleaningServiceApiCallsTest @Autowired constructor(
val mockedBusinessPartner = businessPartnerFactory.createFullBusinessPartner("test")
.copyWithSiteMainAddress(null)
.copy(additionalAddress = null)
.copy(
uncategorized = businessPartnerFactory.createFullBusinessPartner("test").uncategorized.copy(
identifiers = emptyList() // Assign empty list to uncategorized identifiers
)
)

val resolveMapping = mockOrchestratorResolveApi()
mockOrchestratorReserveApi(mockedBusinessPartner)
Expand All @@ -318,6 +358,11 @@ class CleaningServiceApiCallsTest @Autowired constructor(
.copyWithBpnReferences(BpnReference.empty)
.copyWithLegalAddress(PostalAddress.empty)
.copy(site = null, additionalAddress = null)
.copy(
uncategorized = businessPartnerFactory.createFullBusinessPartner("test").uncategorized.copy(
identifiers = emptyList() // Assign empty list to uncategorized identifiers
)
)

val resolveMapping = mockOrchestratorResolveApi()
mockOrchestratorReserveApi(mockedBusinessPartner)
Expand Down Expand Up @@ -345,6 +390,11 @@ class CleaningServiceApiCallsTest @Autowired constructor(
val mockedBusinessPartner = businessPartnerFactory.createFullBusinessPartner("test")
.copyWithLegalAddress(PostalAddress.empty)
.copy(site = null, additionalAddress = null)
.copy(
uncategorized = businessPartnerFactory.createFullBusinessPartner("test").uncategorized.copy(
identifiers = emptyList() // Assign empty list to uncategorized identifiers
)
)

val resolveMapping = mockOrchestratorResolveApi()
mockOrchestratorReserveApi(mockedBusinessPartner)
Expand Down

0 comments on commit e230e99

Please sign in to comment.