test(share): fix TestShareCmdProviderSystem/ProviderArgsFlag assertion, fixes #7959#7960
Merged
test(share): fix TestShareCmdProviderSystem/ProviderArgsFlag assertion, fixes #7959#7960
Conversation
|
Download the artifacts for this pull request:
See Testing a PR. |
fixes #7959 ## The Issue - #7959 TestShareCmdProviderSystem/ProviderArgsFlag was failing because it checked stderr for provider output, but ddev share captures provider stderr internally and only displays it on failure. ## How This PR Solves The Issue Changed the test to verify the args were passed by checking ddev's stdout message "with args: --custom-flag value123" instead of the provider's stderr. This tests the actual user-visible behavior. Also removed the DDEV_TEST_SHARE_CMD skip condition so the test runs in CI. ## Manual Testing Instructions Run the test: ``` go test -v -run TestShareCmdProviderSystem/ProviderArgsFlag ./cmd/ddev/cmd/ ``` ## Automated Testing Overview The test itself verifies the --provider-args flag functionality. ## Release/Deployment Notes None - test-only change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use atomic.Bool for hookSuccess variable to avoid data race between the goroutine that scans stderr and the main test goroutine that reads the result. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
4266b7f to
5fadec9
Compare
rfay
commented
Dec 22, 2025
Member
Author
rfay
left a comment
There was a problem hiding this comment.
I don't think this does any harm and a number of other tests including HEAD are waiting for this fix.
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.
The Issue
TestShareCmdProviderSystem/ProviderArgsFlag was failing because it checked stderr for provider output, but ddev share captures provider stderr internally and only displays it on failure.
How This PR Solves The Issue
Changed the test to verify the args were passed by checking ddev's stdout message "with args: --custom-flag value123" instead of the provider's stderr. This tests the actual user-visible behavior.
Also removed the DDEV_TEST_SHARE_CMD skip condition so the test always runs in CI.
🤖 Generated with Claude Code