mirror of
https://github.com/inspec/inspec
synced 2024-11-23 13:13:22 +00:00
Test for ./
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
This commit is contained in:
parent
31bedf7b37
commit
860d21a370
3 changed files with 29 additions and 2 deletions
|
@ -98,13 +98,22 @@ describe "running profiles with git-based dependencies" do
|
|||
end
|
||||
|
||||
#------------ Edge Cases for Relative Path Support -------------------#
|
||||
|
||||
# TODO: These next two tests trigger a bug, in which the profile appears
|
||||
# to have a key collision in the cache.
|
||||
|
||||
describe "running a profile with an '' relative path dependency" do
|
||||
it "should find the top-level profile in the git-referenced child profile and execute that" do
|
||||
assert_relative_fetch_works("relative-empty", ["relative-empty", "basic-local"], ["relative-empty-01", "basic-local-01"])
|
||||
end
|
||||
end
|
||||
|
||||
# describe "running a profile with an ./ relative path dependency"
|
||||
# describe "running a profile with a relative path dependency that does not exist"
|
||||
describe "running a profile with an ./ relative path dependency" do
|
||||
it "should find the top-level profile in the git-referenced child profile and execute that" do
|
||||
assert_relative_fetch_works("relative-dot-slash", ["relative-dot-slash", "basic-local"], ["relative-dot-slash-01", "basic-local-01"])
|
||||
end
|
||||
end
|
||||
|
||||
# describe "running a profile with a relative path dependency that does not exist" do
|
||||
|
||||
end
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
include_controls 'basic-local'
|
||||
|
||||
control 'relative-dot-slash-01' do
|
||||
describe 'always-pass' do
|
||||
it { should cmp 'always-pass'}
|
||||
end
|
||||
end
|
|
@ -0,0 +1,11 @@
|
|||
name: relative-dot-slash
|
||||
title: relative-dot-slash
|
||||
license: Apache-2.0
|
||||
summary: A profile that depends on profiles using an ./ path
|
||||
version: 0.1.0
|
||||
supports:
|
||||
platform: os
|
||||
depends:
|
||||
- name: basic-local
|
||||
git: test/unit/mock/profiles/git-fetcher/basic-local
|
||||
relative_path: ./
|
Loading…
Reference in a new issue