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

DEVX-248 migrate inventory sync #499

Merged
merged 15 commits into from
Oct 24, 2023

Conversation

lojzatran
Copy link
Contributor

@lojzatran lojzatran requested a review from salander85 October 20, 2023 14:51
@lojzatran lojzatran marked this pull request as ready for review October 20, 2023 14:52
"{\"data\":{\"typeDefinitions\":{\"results\":[{\"id\":\"02e915e7-7763-48d1-83bd-d4e940a1a368\","
+ "\"key\":\"test-custom-type-key\"}]}}}";
final GraphQLResponse customTypesResult =
readObject(jsonStringCustomTypes, GraphQLResponse.class);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
readObject(jsonStringCustomTypes, GraphQLResponse.class);
mockResourceIdsGraphQlRequest(sourceClient, "typeDefinitions", "02e915e7-7763-48d1-83bd-d4e940a1a368", "test-custom-type-key");

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I cannot do it here as these 2 mocks are then later used as following:

when(graphQLResponse.getBody()).thenReturn(customTypesResult).thenReturn(supplyChannelsResult);

When calling graphql endpoint, It returns first the customType and then on the second call it returns supplyChannels.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see. Maybe it's a bit easier to read when mocking the client like here:

@lojzatran lojzatran requested a review from salander85 October 23, 2023 20:55
"{\"data\":{\"typeDefinitions\":{\"results\":[{\"id\":\"02e915e7-7763-48d1-83bd-d4e940a1a368\","
+ "\"key\":\"test-custom-type-key\"}]}}}";
final GraphQLResponse customTypesResult =
readObject(jsonStringCustomTypes, GraphQLResponse.class);
Copy link
Contributor

Choose a reason for hiding this comment

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

I see. Maybe it's a bit easier to read when mocking the client like here:

Base automatically changed from DEVX-247_migrate_category_syncer to sync-java-migration-v10 October 24, 2023 10:30
…VX-248_migrate_inventory_sync

# Conflicts:
#	src/integration-test/java/com/commercetools/project/sync/InventorySyncMultiChannelIT.java
#	src/integration-test/java/com/commercetools/project/sync/util/IntegrationTestUtils.java
#	src/test/java/com/commercetools/project/sync/SyncerFactoryTest.java
#	src/test/java/com/commercetools/project/sync/category/CategorySyncerTest.java
#	src/test/java/com/commercetools/project/sync/util/TestUtils.java
@lojzatran lojzatran merged commit e2bca8a into sync-java-migration-v10 Oct 24, 2023
@lojzatran lojzatran deleted the DEVX-248_migrate_inventory_sync branch October 24, 2023 19:39
lojzatran added a commit that referenced this pull request Nov 6, 2023
* Install sync-java-version 10 beta and change http client.

* Migrate abstract syncer (#484)

* Migrate abstract syncer, utils and tests (only compilable)

* Adjust javadoc

* Use consistent return type

* Make syncer implementation compilable (#485)

* Migrate abstract syncer, utils and tests (only compilable)

* Adjust javadoc

* Adjust signature of syncer subclasses and fix code

* Formatting

* Remove unused constant

* Comment not compilable unittests

* Migrate SyncerFactory and CliRunner (#496)

* Migrate SyncerFactory

* Migrate client utils and rename

* Migrate CliRunner

* Migrate unittests for SyncerFactory

* Migrate unittests for CLIRunner

* Cleanup test code

* Add final modifier

Co-authored-by: Lam Tran <[email protected]>

---------

Co-authored-by: Lam Tran <[email protected]>

* Approved tasks from syncer factory base (#497)

* Migrate SyncerFactory

* Migrate client utils and rename

* Migrate CliRunner

* Migrate unittests for SyncerFactory

* Migrate unittests for CLIRunner

* Cleanup test code

* DEVX-259 fix tests (#494)

* DEVX-246 migrate solution info (#491)

---------

Co-authored-by: Lam Tran <[email protected]>

* Fix spotbugs violations

* DEVX-247 migrate category syncer (#498)

* Revert "Fix spotbugs violations"

This reverts commit 31da628.

* Delete unused variable

* DEVX-248 migrate inventory sync (#499)

* Migrate SyncerFactory

* Migrate client utils and rename

* Migrate CliRunner

* Migrate unittests for SyncerFactory

* Migrate unittests for CLIRunner

* Cleanup test code

* DEVX-247 migrate category syncr

* DEVX-247 fix spotbugs

* DEVX-247 rename variable

* DEVX-247 rename variable

* DEVX-248 migrate inventory syncer

* DEVX-248 refactor category syncer test

* DEVX-248 refactor code

* DEVX-248 fix formatting

---------

Co-authored-by: salander85 <[email protected]>

* Migrate product syncer with unittests (#502)

* Migrate ITs for product syncer (#505)

* DEVX-250 migrate cart discount syncer (#504)

* DEVX-251 migrate customer syncer (#506)

* DEVX-253 migrate product type syncer (#509)

* Migrate shoppinglist syncer (#511)

* DEVX-252 migrate custom object syncer (#503)

* DEVX-252 migrate custom object syncer

* DEVX-252 disable test

* DEVX-245 fix category syncer IT (#514)

* DEVX-245 fix category syncer IT

* DEVX-245 fix formatting

* Update sync-java to newest version

* Revert "Update sync-java to newest version"

This reverts commit a278421.

* Migrate state-syncer incl. unittests (#512)

* Migrate state-syncer incl. unittests

* Make error-handling in transform consistent with other syncers

* Assert instance of method call

* Fix test

* Migrate tax category syncer (#513)

* Migrate type syncer (#515)

* Migrate type syncer

* Test type-sync fails with error callback

* Replace private method with utility method. Correct tests.

* Update sync-java to newest version (#517)

* Update sync-java to newest version

* Update http-client to newest version

* DEVX-276 add retry (#516)

* DEVX-276 add retry

* DEVX-276 update retry mechanism

* DEVX-276 fix tests

* Migrate CLI runner IT (#508)

* Update README.md

---------

Co-authored-by: Lam Tran <[email protected]>
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.

2 participants