Test for ./

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
This commit is contained in:
Clinton Wolfe 2019-06-18 15:22:14 -04:00
parent 31bedf7b37
commit 860d21a370
3 changed files with 29 additions and 2 deletions

View file

@ -98,13 +98,22 @@ describe "running profiles with git-based dependencies" do
end end
#------------ Edge Cases for Relative Path Support -------------------# #------------ 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 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 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"]) assert_relative_fetch_works("relative-empty", ["relative-empty", "basic-local"], ["relative-empty-01", "basic-local-01"])
end end
end end
# describe "running a profile with an ./ relative path dependency" describe "running a profile with an ./ relative path dependency" do
# describe "running a profile with a relative path dependency that does not exist" 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 end

View file

@ -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

View file

@ -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: ./