chore: Add docker and env-no-quotes mount formats#477
Closed
ryan-blunden wants to merge 1 commit intoDopplerHQ:masterfrom
Closed
chore: Add docker and env-no-quotes mount formats#477ryan-blunden wants to merge 1 commit intoDopplerHQ:masterfrom
ryan-blunden wants to merge 1 commit intoDopplerHQ:masterfrom
Conversation
nmanoogian
reviewed
Feb 18, 2025
Contributor
nmanoogian
left a comment
There was a problem hiding this comment.
Sorry for the delay on the review, @ryan-blunden, and thanks for putting this up! I actually just bumped into this missing mount format on a personal project the other day.
Everything looks good and works well in my testing. Just one small comment on the automated tests.
| t.Errorf("Unable to convert secrets to byte array in %s format", format) | ||
| } | ||
|
|
||
| format = "env" |
Contributor
There was a problem hiding this comment.
check/copy-pasta: These look identical to the env tests above. I assume this is supposed to be testing the new formats?
diff --git a/pkg/controllers/secrets_test.go b/pkg/controllers/secrets_test.go
index 23ab1f6..bccb47c 100644
--- a/pkg/controllers/secrets_test.go
+++ b/pkg/controllers/secrets_test.go
@@ -82,15 +82,15 @@ func TestSecretsToBytes(t *testing.T) {
t.Errorf("Unable to convert secrets to byte array in %s format", format)
}
- format = "env"
+ format = "env-no-quotes"
bytes, err = SecretsToBytes(secrets, format, "")
- if !err.IsNil() || string(bytes) != strings.Join([]string{`S1="foo"`, `SECRET2="bar"`}, "\n") {
+ if !err.IsNil() || string(bytes) != strings.Join([]string{`S1=foo`, `SECRET2=bar`}, "\n") {
t.Errorf("Unable to convert secrets to byte array in %s format", format)
}
- format = "env"
+ format = "docker"
bytes, err = SecretsToBytes(secrets, format, "")
- if !err.IsNil() || string(bytes) != strings.Join([]string{`S1="foo"`, `SECRET2="bar"`}, "\n") {
+ if !err.IsNil() || string(bytes) != strings.Join([]string{`S1=foo`, `SECRET2=bar`}, "\n") {
t.Errorf("Unable to convert secrets to byte array in %s format", format)
}
(You can apply by copying the patch and doing pbpaste | git apply or pasting manually)
Contributor
|
We've gotten a few requests for this recently so I'll push the change back up on an internal branch (#481) and merge it. Thanks again for putting this up! |
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.
No description provided.