fix: fixed failing tests and commercetools-mock image#638
Merged
demeyerthom merged 1 commit intomainfrom Mar 24, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the provider’s dev/test workflow and acceptance test infrastructure, including documentation for contributors and consistency improvements across local and CI environments.
Changes:
- Add an engineering guide (
AGENTS.md) describing architecture, conventions, and workflows. - Update acceptance test enablement (
TF_ACC) parsing and refine acceptance test assertions. - Standardize test + mock-server tooling (docker compose usage, mock image tag, quieter
go testoutput) and remove legacy VS Code configs.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/resources/project/resource_test.go | Adjusts an acceptance assertion for business unit config status. |
| internal/acctest/acctest.go | Parses TF_ACC as a boolean to enable acceptance tests more reliably. |
| docker-compose.yaml | Pins commercetools mock-server image to 3.0.0-beta.1. |
| commercetools/resource_shipping_method.go | Sets ZoneRates to an empty slice to avoid API errors on create. |
| commercetools/resource_channel_test.go | Replaces whole-struct equality with more granular assertions. |
| Taskfile.yml | Switches to docker compose, reduces verbosity in test commands, and tweaks teardown. |
| AGENTS.md | Adds detailed engineering documentation for the repo. |
| .vscode/settings.json | Removed legacy editor-specific configuration. |
| .vscode/launch.json | Removed legacy editor-specific configuration. |
| .gitignore | Ignores /.vscode moving forward. |
| .github/workflows/tests.yaml | Aligns CI mock image tag and reduces go test verbosity. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fe2a95b to
4c493ab
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several improvements and cleanups to the development workflow, test infrastructure, and documentation for the terraform-provider-commercetools project. The most significant changes include the addition of a comprehensive engineering guide (
AGENTS.md), updates to the mock server version, improvements to test assertions, and the removal of legacy VSCode configuration files. There are also minor fixes to acceptance test handling and Taskfile/test commands.Documentation and Developer Experience:
AGENTS.md, covering project architecture, build/test commands, code style, naming conventions, resource/test patterns, and utility functions to help onboard and guide contributors.Test Infrastructure and Workflow:
3.0.0-beta.1in bothdocker-compose.yamland GitHub Actions workflow, ensuring a consistent and up-to-date test environment. [1] [2]TestAccChannel_AllFieldsto use granular field checks withassert.EqualValuesandassert.NotNil, making test failures easier to diagnose and increasing test robustness. [1] [2]TF_ACCas a boolean, preventing accidental test runs or skips due to string comparison errors. [1] [2] [3]Taskfile.ymlto usego test ./...(removing-vfor less noisy output) and switched fromdocker-composetodocker composefor better compatibility. [1] [2]Code and Test Cleanups:
.vscode/launch.jsonand.vscode/settings.jsonfiles, cleaning up legacy editor configurations that are now superseded by Taskfile and environment variable documentation. [1] [2]resource_shipping_method.go, ensuredZoneRatesis always set to an empty array to prevent API errors when no shipping rates are present at creation.TestAccProjectCreate_basicto assert the correct business unit configuration status rather than checking for nil.