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

Check on archives is broken #343

Closed
chris-rock opened this issue Dec 31, 2015 · 1 comment
Closed

Check on archives is broken #343

chris-rock opened this issue Dec 31, 2015 · 1 comment
Assignees
Labels
Type: Bug Feature not working as expected
Milestone

Comments

@chris-rock
Copy link
Contributor

Check works on directories:

$ b bin/inspec check base_linux 
I, [2015-12-31T12:55:37.496650 #86922]  INFO -- : Checking profile in base_linux
W, [2015-12-31T12:55:37.496768 #86922]  WARN -- : The use of `metadata.rb` is deprecated. Use `inspec.yml`.
I, [2015-12-31T12:55:37.496801 #86922]  INFO -- : Metadata OK.
D, [2015-12-31T12:55:37.496887 #86922] DEBUG -- : Found 45 rules.
D, [2015-12-31T12:55:37.496904 #86922] DEBUG -- : Verify all rules in  base_linux/tests/filesystem_spec.rb
D, [2015-12-31T12:55:37.496923 #86922] DEBUG -- : Verify all rules in  base_linux/tests/sysctl_ipv4_spec.rb
D, [2015-12-31T12:55:37.496956 #86922] DEBUG -- : Verify all rules in  base_linux/tests/sysctl_ipv6_spec.rb
D, [2015-12-31T12:55:37.496974 #86922] DEBUG -- : Verify all rules in  base_linux/tests/sysctl_spec.rb

Generate an archive:

$ b bin/inspec archive base_linux
I, [2015-12-31T12:56:01.576715 #86956]  INFO -- : Checking profile in base_linux
W, [2015-12-31T12:56:01.576854 #86956]  WARN -- : The use of `metadata.rb` is deprecated. Use `inspec.yml`.
I, [2015-12-31T12:56:01.576889 #86956]  INFO -- : Metadata OK.
D, [2015-12-31T12:56:01.576929 #86956] DEBUG -- : Found 45 rules.
D, [2015-12-31T12:56:01.576942 #86956] DEBUG -- : Verify all rules in  base_linux/tests/filesystem_spec.rb
D, [2015-12-31T12:56:01.576960 #86956] DEBUG -- : Verify all rules in  base_linux/tests/sysctl_ipv4_spec.rb
D, [2015-12-31T12:56:01.576989 #86956] DEBUG -- : Verify all rules in  base_linux/tests/sysctl_ipv6_spec.rb
D, [2015-12-31T12:56:01.577007 #86956] DEBUG -- : Verify all rules in  base_linux/tests/sysctl_spec.rb
I, [2015-12-31T12:56:01.577170 #86956]  INFO -- : Profile check finished. Generate archive /Users/chartmann/Development/compliance/inspec/base_linux.tar.gz.
D, [2015-12-31T12:56:01.577543 #86956] DEBUG -- : Add the following files to archive:
D, [2015-12-31T12:56:01.577563 #86956] DEBUG -- :     metadata.rb
D, [2015-12-31T12:56:01.577572 #86956] DEBUG -- :     README.md
D, [2015-12-31T12:56:01.577581 #86956] DEBUG -- :     tests
D, [2015-12-31T12:56:01.577589 #86956] DEBUG -- :     tests/filesystem_spec.rb
D, [2015-12-31T12:56:01.577597 #86956] DEBUG -- :     tests/sysctl_ipv4_spec.rb
D, [2015-12-31T12:56:01.577604 #86956] DEBUG -- :     tests/sysctl_ipv6_spec.rb
D, [2015-12-31T12:56:01.577611 #86956] DEBUG -- :     tests/sysctl_spec.rb
I, [2015-12-31T12:56:01.582945 #86956]  INFO -- : Finished archive generation.

But check does not work on archives anymore

$ b bin/inspec check base_linux.tar.gz 
/Users/chartmann/Development/compliance/inspec/lib/inspec/profile.rb:29:in `initialize': Cannot find directory base_linux.tar.gz (RuntimeError)
    from /Users/chartmann/Development/compliance/inspec/lib/inspec/profile.rb:15:in `new'
    from /Users/chartmann/Development/compliance/inspec/lib/inspec/profile.rb:15:in `from_path'
    from bin/inspec:76:in `check'
    from /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from bin/inspec:184:in `<main>'
@chris-rock chris-rock added the Type: Bug Feature not working as expected label Jan 21, 2016
@chris-rock chris-rock added this to the 0.9.11 milestone Jan 25, 2016
@chris-rock chris-rock self-assigned this Jan 25, 2016
@chris-rock chris-rock modified the milestones: 0.9.12, 0.9.11 Jan 29, 2016
@srenatus
Copy link
Contributor

srenatus commented Feb 4, 2016

Duplicate #408.

@srenatus srenatus closed this as completed Feb 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Feature not working as expected
Projects
None yet
Development

No branches or pull requests

2 participants