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

inspec compliance version fails gracefully when no server config #926

Merged
merged 1 commit into from
Aug 17, 2016

Conversation

vjeffrey
Copy link

@vjeffrey vjeffrey commented Aug 16, 2016

screen shot 2016-08-16 at 11 35 13 am

having trouble running the tests for this at the moment, so i'm putting this up while I work on getting those done.

fixes #894

@chris-rock
Copy link
Contributor

This needs to be rebased once #928 is merged

@chris-rock
Copy link
Contributor

Great work @vjeffrey I added some minor improvements:

  • test that the version is returned, once inspec is logged in
  • remove whitespace in error message

@chris-rock chris-rock force-pushed the vj/no-token-version-error-msg branch from d0dca3e to b75b8ab Compare August 17, 2016 15:06
@chris-rock chris-rock merged commit c27878b into master Aug 17, 2016
@chris-rock chris-rock deleted the vj/no-token-version-error-msg branch August 17, 2016 15:13
describe command("#{inspec_bin} compliance version") do
its('stdout') { should include 'Server configuration information is missing' }
its('stderr') { should eq '' }
its('exit_status') { should eq 0 }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might we want to exit 1 in this case?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea @stevendanna, @vjeffrey could you add a PR to cover that?

@chris-rock chris-rock modified the milestone: 0.31.0 Aug 18, 2016
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.

inspec compliance version fails with stacktrace if no compliance URL is configured
4 participants