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

Removed piping results to shasum to avoid test passing incorrectly #552

Merged
merged 1 commit into from
Jan 15, 2016

Conversation

techraf
Copy link
Contributor

@techraf techraf commented Jan 14, 2016

I understand that this was supposed to be some sort of optimisation, but because h1.exit_status and h2.exit_status will always inherit the exit code of the latter openssl sha -sha512, the test would pass if both: the certificate and the key were invalid or the files were non-existent.

For example the following check always passed:

describe x509_private_key('/some/non-existent/key/file') do
    it { should have_matching_certificate('/etc/passwd') }
end

Removing the pipe solves the problem, but I guess the correct way for such cases should be decided for the whole project. For example to make run_command to behave like bash with 'set -o pipefail'.

@mizzy
Copy link
Owner

mizzy commented Jan 15, 2016

Thanks!

Removing the pipe solves the problem, but I guess the correct way for such cases should be decided for the whole project. For example to make run_command to behave like bash with 'set -o pipefail'.

Thanks for your advice. I'll check it.

mizzy added a commit that referenced this pull request Jan 15, 2016
Removed piping results to shasum to avoid test passing incorrectly
@mizzy mizzy merged commit 3a76cc1 into mizzy:master Jan 15, 2016
@mizzy
Copy link
Owner

mizzy commented Jan 15, 2016

Released as v2.29.1.

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.

2 participants