Conversation
Two issues with this command: * The command line arguments for the secret value were ignored * If the secret value was piped through stdin, it would still prompt The second issue prevented users from using multi-line strings because the prompt reads until end-of-line. This change adds testing infrastructure for: * Setting up a workspace focused test (common between many tests) * Running a snippet of Python through the command execution API Porting more integration tests to use this infrastructure will be done in later commits.
mgyucht
suggested changes
Jul 5, 2023
Contributor
mgyucht
left a comment
There was a problem hiding this comment.
Maybe I'm confused but I think we need to handle the string value case.
| return err | ||
| } | ||
| putSecretReq.BytesValue = base64.StdEncoding.EncodeToString(bytes) | ||
| } |
Contributor
There was a problem hiding this comment.
Missing a final else case for stringValueChanged != nil?
Contributor
There was a problem hiding this comment.
When string-value flag is set, cobra reads the value directly into putSecretReq.StringValue on line 27
shreyas-goenka
approved these changes
Jul 5, 2023
andrewnester
approved these changes
Jul 5, 2023
mgyucht
approved these changes
Jul 5, 2023
Merged
pietern
added a commit
that referenced
this pull request
Jul 10, 2023
## Changes CLI: * Fix secrets put-secret command ([#545](#545)). * Fixed ignoring required positional parameters when --json flag is provided ([#535](#535)). * Update cp help message to not require file scheme ([#554](#554)). Bundles: * Fix: bundle destroy fails when bundle.tf.json file is deleted ([#519](#519)). * Fixed error reporting when included invalid files in include section ([#543](#543)). * Make top level workspace optional in JSON schema ([#562](#562)). * Propagate TF_CLI_CONFIG_FILE env variable ([#555](#555)). * Update Terraform provider schema structs ([#563](#563)). * Update inline JSON schema documentation ([#557](#557)). Dependencies: * Bump Go SDK to v0.12.0 ([#540](#540)). * Bump github.com/hashicorp/terraform-json from 0.17.0 to 0.17.1 ([#541](#541)).
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.
Changes
Two issues with this command:
The second issue prevented users from using multi-line strings because the prompt reads until end-of-line.
This change adds testing infrastructure for:
Porting more integration tests to use this infrastructure will be done in later commits.
Tests
New integration test passes.
The interactive path cannot be integration tested just yet.