feat(organization): add --workspace-id flag to org switch for non-interactive use#1938
Merged
ronidelacruz-astro merged 4 commits intomainfrom Sep 18, 2025
Merged
Conversation
cafceeb to
ee1e8d8
Compare
Pull Request Test Coverage Report for Build 5b29ce7e-0441-423c-8be4-a1fa665a5b46Details
💛 - Coveralls |
52db661 to
61a0e7b
Compare
ianbuss
reviewed
Sep 18, 2025
Contributor
ianbuss
left a comment
There was a problem hiding this comment.
Couple of nits but otherwise looks good!
| _, err := execOrganizationCmd(cmdArgs...) | ||
| assert.NoError(t, err) | ||
| origOrgSwitch := orgSwitch | ||
| orgSwitch = func(orgName string, coreClient astrocore.CoreClient, platformCoreClient astroplatformcore.CoreClient, out io.Writer, shouldDisplayLoginLink bool) error { |
Contributor
There was a problem hiding this comment.
Looks like this is an existing pattern in this code base but this is unlikely to be "safe" for parallel test runs if we were to ever use those. Might be worth just adding a comment to that effect. You've done the right thing here @ronidelacruz-astro by adding the defer function to put the function back at the end of this test, which looks like it's missing from other tests.
feluelle
approved these changes
Sep 18, 2025
Member
feluelle
left a comment
There was a problem hiding this comment.
LGTM, I would also have commented the same nit as Ian about the inline err check.
Co-authored-by: Ian Buss <[email protected]>
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.
Description
Add --workspace-id (-w) to astro organization switch to allow non-interactive workspace switching after changing org.
🎟 Issue(s)
Related #1805
🧪 Functional Testing
📸 Screenshots
📋 Checklist
make testbefore taking out of draftmake lintbefore taking out of draft