Repository navigation
Allow setting codespace display name during create - #6739
Merged
Merged
Conversation
mislav
approved these changes
Dec 19, 2022
mislav
left a comment
Contributor
There was a problem hiding this comment.
Thanks! Added some tests.
Re: flags parsing test: this Cobra statement pretty much ensures that the flag value will be stored into opts.displayName, so we won't really need to test flags parsing logic.
createCmd.Flags().StringVarP(&opts.displayName, "display-name", "d", "", "display name for the codespace")
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.
Adding the display_name field to the POST /user/codespaces request and exposing it via a new
--display-name -dargument forgh codespace create.e.g.
The tests for the api code and the command handler both return a mock'd response that contains a
hardcoded codespace name and so updating the tests for these seemed kinda useless. Some of the other
commands' tests assert that the options object contains the right values, e.g. browse_test.go. I
didn't see any tests like that for codespace/create.go. Maybe that's something to be added in the
future?
Fixes #6549