Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow set "json value" to be a string. #468

Merged
merged 2 commits into from
May 28, 2019
Merged

Conversation

ajvb
Copy link
Contributor

@ajvb ajvb commented May 23, 2019

Adds back support for string values in --set, while retaining support
for yaml multidoc that caused this bug.

Fixes #461

Adds back support for string values in --set, while retaining support
for yaml multidoc that caused this bug.

Fixes #461
@ajvb ajvb requested a review from autrilla May 23, 2019 17:28
@ajvb
Copy link
Contributor Author

ajvb commented May 23, 2019

@autrilla I'd like to add a functional regression test for this, but am having some trouble with the value assertion. Am basically copying https://github.com/mozilla/sops/blob/master/functional-tests/src/lib.rs#L196-L228 and then changing the --set call to:

  let output = Command::new(SOPS_BINARY_PATH)
            .arg("--set")
            .arg(r#"["a"] "aaa""#)

But am having trouble with how to unwrap/assert that map["a"] == "aaa"

@codecov-io
Copy link

codecov-io commented May 23, 2019

Codecov Report

Merging #468 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #468   +/-   ##
========================================
  Coverage    36.38%   36.38%           
========================================
  Files           20       20           
  Lines         2718     2718           
========================================
  Hits           989      989           
  Misses        1640     1640           
  Partials        89       89

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ea56679...775274b. Read the comment docs.

@autrilla
Copy link
Contributor

I've added the functional test for you

@autrilla autrilla force-pushed the ajvb/allow-string-in-set branch from b44a6ab to 775274b Compare May 23, 2019 21:02
@ajvb
Copy link
Contributor Author

ajvb commented May 23, 2019

@autrilla Oh awesome, thank you!

@ajvb ajvb merged commit f8e60a1 into develop May 28, 2019
@ajvb ajvb deleted the ajvb/allow-string-in-set branch May 28, 2019 15:55
ajvb added a commit that referenced this pull request Jun 11, 2019
* Changes to travis config and docs for using develop (#462)

* Fixes integration tests in travis to not run on PR's (they will now
run on merges into `develop` and `master`)
* Change README.rst and CONTRIBUTING.md to reflect the use of `develop`
as the primary development branch

* use golang 1.12 for building sops

* pgp/keysource: Check size of key fingerprint

Make sure the key fingerprint is longer than 16 characters before
slicing it.

Closes #463

* Allow set "json value" to be a string. (#468)

* Allow set "json value" to be a string.

Adds back support for string values in --set, while retaining support
for yaml multidoc that caused this bug.

Fixes #461

* Add functional test for --set'ing strings

* Vendoring update (#472)

It's been around 9 months since our last vendor update. This is also
needed for some new features being worked on for sops workspace.

Additionally, this PR regenerates the kms mocks.

* Remove duplicate sentence from readme (#475)

* 3.3.1 bump and release notes (#477)
ajvb added a commit that referenced this pull request Sep 11, 2019
* Changes to travis config and docs for using develop (#462)

* Fixes integration tests in travis to not run on PR's (they will now
run on merges into `develop` and `master`)
* Change README.rst and CONTRIBUTING.md to reflect the use of `develop`
as the primary development branch

* use golang 1.12 for building sops

* pgp/keysource: Check size of key fingerprint

Make sure the key fingerprint is longer than 16 characters before
slicing it.

Closes #463

* Allow set "json value" to be a string. (#468)

* Allow set "json value" to be a string.

Adds back support for string values in --set, while retaining support
for yaml multidoc that caused this bug.

Fixes #461

* Add functional test for --set'ing strings

* Vendoring update (#472)

It's been around 9 months since our last vendor update. This is also
needed for some new features being worked on for sops workspace.

Additionally, this PR regenerates the kms mocks.

* Remove duplicate sentence from readme (#475)

* 3.3.1 bump and release notes (#477)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants