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

feat: add code and shipping costs cutoff to Market #113

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Jonne
Copy link
Contributor

@Jonne Jonne commented Oct 31, 2024

This PR should partly fix #108 and adds some fields that were recently introduced to the Market.

  • code
  • shipping_cost_cutoff

https://docs.commercelayer.io/core/api-reference/markets/object

@Jonne Jonne changed the title feat: Add code and shipping costs cutoff to Market feat: add code and shipping costs cutoff to Market Oct 31, 2024
demeyerthom
demeyerthom previously approved these changes Nov 1, 2024
Copy link
Collaborator

@demeyerthom demeyerthom left a comment

Choose a reason for hiding this comment

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

LGTM

@demeyerthom
Copy link
Collaborator

demeyerthom commented Nov 1, 2024

@Jonne looks like the acceptance tests have failed. I think the mocks need to be updated to reflect your changes. If I read it correctly the mock file to be updated is mock/mappings/api_markets_xjbdyhlyol-2329486c-1492-47cc-a608-519ef1c30e58.json. You can add the new field values to the request and responses there.

You can then test this out by running docker compose up -d (which will start the mock service), set the following as .env file:

TF_ACC='1'
COMMERCELAYER_CLIENT_ID=client-id
COMMERCELAYER_CLIENT_SECRET=client-secret
COMMERCELAYER_API_ENDPOINT=http://localhost:8080/api
COMMERCELAYER_AUTH_ENDPOINT=http://localhost:8080/oauth/token

And finally go test ./...

It is a bit cluncky, this is my attempt of 2 years ago and I have not come around to improving it :)

@Jonne
Copy link
Contributor Author

Jonne commented Nov 4, 2024

@demeyerthom Thank you for the explanation! I was running the acceptance tests to my own CL environment and didn't realize there also was a mock environment. I've updated the mocks and am able to run the tests agains my local environment 🙏

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.

Handling code property
2 participants