Experiment with git subrepo storage

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
This commit is contained in:
Clinton Wolfe 2019-06-14 09:53:14 -04:00
parent 0e32d2429f
commit 12fcb24932
55 changed files with 133 additions and 0 deletions

View file

@ -0,0 +1 @@
This is a git repo used as a test fixture. Because we cannot directly store the .git/ directory, it is stored as git-fixture/, and a symlink is created at test runtime.

View file

@ -0,0 +1,5 @@
control 'basic-local-01' do
describe 'always-pass' do
it { should cmp 'always-pass'}
end
end

View file

@ -0,0 +1 @@
Add change only on one branch

View file

@ -0,0 +1 @@
ref: refs/heads/master

View file

@ -0,0 +1,10 @@
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[user]
name = test user
email = test@test.org

View file

@ -0,0 +1 @@
Unnamed repository; edit this file 'description' to name the repository.

View file

@ -0,0 +1,6 @@
# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~

View file

@ -0,0 +1,4 @@
0000000000000000000000000000000000000000 0e7d2b9c2c5a1372341e36febceab86558439149 test user <test@test.org> 1560485536 -0400 commit (initial): Initial commit
0e7d2b9c2c5a1372341e36febceab86558439149 0e7d2b9c2c5a1372341e36febceab86558439149 test user <test@test.org> 1560485563 -0400 checkout: moving from master to test-branch
0e7d2b9c2c5a1372341e36febceab86558439149 54d0671d3e2c4a28865a0ecc98863859bd4d7475 test user <test@test.org> 1560485674 -0400 commit: Add change only on one branch
54d0671d3e2c4a28865a0ecc98863859bd4d7475 0e7d2b9c2c5a1372341e36febceab86558439149 test user <test@test.org> 1560485682 -0400 checkout: moving from test-branch to master

View file

@ -0,0 +1 @@
0000000000000000000000000000000000000000 0e7d2b9c2c5a1372341e36febceab86558439149 test user <test@test.org> 1560485536 -0400 commit (initial): Initial commit

View file

@ -0,0 +1,2 @@
0000000000000000000000000000000000000000 0e7d2b9c2c5a1372341e36febceab86558439149 test user <test@test.org> 1560485563 -0400 branch: Created from HEAD
0e7d2b9c2c5a1372341e36febceab86558439149 54d0671d3e2c4a28865a0ecc98863859bd4d7475 test user <test@test.org> 1560485674 -0400 commit: Add change only on one branch

View file

@ -0,0 +1,4 @@
x­<>±
Ã0 D;û+nó$h²ô{$Ùƒj+¥„Òo
]
;Ü-÷Ž'æyºœÔû6Ü<36>…£)™+<1B>§Œâ (5t4©ÈlwÞƒVŽøl@Ûð@,~³½®ßÐó¸×^Ò;é·e&ï¶E2¸ëòWé kI

View file

@ -0,0 +1,2 @@
xU±
€0 <05>ûoëT¨Ÿ”¦ ÑHSÿÝ.7Ý]M˜cœX·ÞTàYå Ê$!ÎY<1D>q«©À“œtYØÉìs@í¸aÁëþ<C3AB>ž±—-»Á {¥#

View file

@ -0,0 +1,4 @@
x<>Q
Â0DýÎ)öJ²É&)ˆèQͶl+iúáím½<6D>0<æcfx™¦gÄxjUrÈŽ°3¥I,Qo°”XÏ\<£³A½S•¹<E280A2>P0wŒLÉØ€Ö±¾—ÌrôDÑÙθ­<C2A5>K…&kƒm•
×ÃÞ\:ÜÀ<C39C>×.ÎÚi­ø7­íÑ?JêQ
ð˜æA`™_Ÿ»ö_5Í<ª/{fHJ

View file

@ -0,0 +1 @@
0e7d2b9c2c5a1372341e36febceab86558439149

View file

@ -0,0 +1 @@
54d0671d3e2c4a28865a0ecc98863859bd4d7475

View file

@ -0,0 +1 @@
0e7d2b9c2c5a1372341e36febceab86558439149

View file

@ -0,0 +1,8 @@
name: basic-local
title: basic-local
license: Apache-2.0
summary: A profile to be executed as a local git checkout
version: 0.1.0
supports:
platform: os

View file

@ -0,0 +1 @@
This is a git repo used as a test fixture. Because we cannot directly store the .git/ directory, it is stored as git-fixture/, and a symlink is created at test runtime.

View file

@ -0,0 +1,5 @@
control 'child-01' do
describe 'always-pass' do
it { should cmp 'always-pass'}
end
end

View file

@ -0,0 +1,8 @@
name: child-01
title: child-01
license: Apache-2.0
summary: A profile to be included via git and a relative path
version: 0.1.0
supports:
platform: os

View file

@ -0,0 +1,5 @@
control 'child-02' do
describe 'always-pass' do
it { should cmp 'always-pass'}
end
end

View file

@ -0,0 +1,8 @@
name: child-02
title: child-02
license: Apache-2.0
summary: A profile to be included via git and a deep relative path
version: 0.1.0
supports:
platform: os

View file

@ -0,0 +1 @@
Add child-02

View file

@ -0,0 +1 @@
ref: refs/heads/master

View file

@ -0,0 +1,10 @@
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[user]
name = InSpec Test Fixture
email = inspec@chef.io

View file

@ -0,0 +1 @@
Unnamed repository; edit this file 'description' to name the repository.

View file

@ -0,0 +1,6 @@
# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~

View file

@ -0,0 +1,2 @@
0000000000000000000000000000000000000000 65dcdc3491c0c138538379f404f2517d968282a7 InSpec Test Fixture <inspec@chef.io> 1554036073 -0400 commit (initial): Add child-01 profile
65dcdc3491c0c138538379f404f2517d968282a7 36f4c4ecd2b870c0d0869c14a3e41dd506e5a887 InSpec Test Fixture <inspec@chef.io> 1554036109 -0400 commit: Add child-02

View file

@ -0,0 +1,2 @@
0000000000000000000000000000000000000000 65dcdc3491c0c138538379f404f2517d968282a7 InSpec Test Fixture <inspec@chef.io> 1554036073 -0400 commit (initial): Add child-01 profile
65dcdc3491c0c138538379f404f2517d968282a7 36f4c4ecd2b870c0d0869c14a3e41dd506e5a887 InSpec Test Fixture <inspec@chef.io> 1554036109 -0400 commit: Add child-02

View file

@ -0,0 +1,3 @@
x²▌K
1 @]В╧─▓~2mAD7┌k╫@MR╕═32VПЬ┼GpШЮ=оВ{КЮ╪_УER■)╧4╦▄Б■ё( √р5х5Б═╣▓y■E╖ Ш░-#[÷х's ╙#%ъ√+я■WГNсЫ║ }v8╤w-
ш6=©pоёжM⌡w`┴Заb├5Dц©к╝ЪЗФ <╤⌡╛я≥╩-H8

View file

@ -0,0 +1,3 @@
xMŒA
ƒ0E»Î)þºhv=ʘŒu É I¼}¥«.ßãñÖ¤+æçëQ(³GØ%ÅaZ\—žþ9IàÒnó6
;Ë8¹väLõº¬ê&‰Ñ+CJHGäˆSé AˆÌ†Ê‰ºœ £¾»“k-Ó8ÿŽfZ{ó°»Û´fmÎ}í7+

View file

@ -0,0 +1 @@
xMЊ1Г SуЉэЂ-;Jє<е зppОтыX©RОh4[Ц луq«TШ#$ЙqZVgbщџі®г2ЇF!с7ЋRЁ.‡Цu—М0ЕЖђтВ[ T#ќ3™њЊFЬЙ}€VЏe^іЦґЫрhW·k/:њых®5f

View file

@ -0,0 +1 @@
36f4c4ecd2b870c0d0869c14a3e41dd506e5a887

View file

@ -0,0 +1,8 @@
# include_controls 'child-01'
# include_controls 'child-02'
control 'top-level-01' do
describe 'always-pass' do
it { should cmp 'always-pass'}
end
end

View file

@ -0,0 +1,14 @@
name: top-level-relative
title: top-level-relative
license: Apache-2.0
summary: A profile that depends on profiles that are stored in a repo in subdirs
version: 0.1.0
supports:
platform: os
depends:
- name: child-01
git: test/unit/mock/profiles/git-fetcher/git-repo-01
relative_path: child-01
# - name: child-02
# git: ./git-repo-01
# relative_path: deeper-path/in/repo/child-01