Skip to content

Commit

Permalink
add functional tests for tar lockfile reading
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
  • Loading branch information
chris-rock committed Nov 29, 2016
1 parent 4c60a69 commit b655279
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/functional/inspec_vendor_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,22 @@
lockfile = File.join(inheritance_path, 'inspec.lock')
File.exist?(lockfile).must_equal true
end

it 'use lockfile in tarball' do
# ensure the profile is vendored and packaged as tar
out = inspec('vendor ' + meta_path + ' --overwrite')
out.exit_status.must_equal 0
out = inspec('archive ' + meta_path + ' --overwrite')
out.exit_status.must_equal 0

# clean cache directory
FileUtils.rm_rf "#{Dir.home}/.inspec/cache"

# execute json command
out = inspec(' meta-profile.tar.gz -l debug')
out.exit_status.must_equal 0

length = out.stdout.scan(/Fetching URL:/).length
length.must_equal 0
end
end

0 comments on commit b655279

Please sign in to comment.