Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Łukasz Nowak
slapos
Commits
eea55d78
Commit
eea55d78
authored
Jun 25, 2024
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XXX Experiment with different cron mocking
Mock per section level instead of mocking the whole cron process.
parent
2d0d3884
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
2 deletions
+29
-2
software/kvm/test/buildout.hash.cfg
software/kvm/test/buildout.hash.cfg
+5
-1
software/kvm/test/test-instance-kvm-export-mock.cfg.jinja2
software/kvm/test/test-instance-kvm-export-mock.cfg.jinja2
+8
-0
software/kvm/test/test-instance.cfg.in
software/kvm/test/test-instance.cfg.in
+12
-0
software/kvm/test/test-software.cfg
software/kvm/test/test-software.cfg
+4
-1
No files found.
software/kvm/test/buildout.hash.cfg
View file @
eea55d78
...
...
@@ -15,4 +15,8 @@
[template-test]
filename = test-instance.cfg.in
md5sum = 8650b9054e2a1b74b6ceca6927b56b90
md5sum = 851636fe4e190e086ed424fabf0f36a4
[template-kvm-export-mock]
filename = test-instance-kvm-export-mock.cfg.jinja2
md5sum = dbbc617d5c7fa3c488615db17982ee5f
software/kvm/test/test-instance-kvm-export-mock.cfg.jinja2
0 → 100644
View file @
eea55d78
[buildout]
extends = {{ template_kvm_export }}
[cron-entry-backup]
recipe = slapos.recipe.template:jinja2
inline =
${:command}
output = {{ cron_d_mock }}/${:name}
software/kvm/test/test-instance.cfg.in
View file @
eea55d78
...
...
@@ -13,6 +13,7 @@ services = $${:etc}/service
bin = $${buildout:directory}/bin
var = $${buildout:directory}/var
log = $${:var}/log
cron-d-mock = $${:var}/cron-d-mock
cron-env-entries = $${:etc}/cron-env.d
crontabs-env = $${:etc}/crontabs-env
cronstamps-env = $${:etc}/cronstamps-env
...
...
@@ -43,3 +44,14 @@ recipe = slapos.cookbook:cron.d
name = environment
frequency = * * * * *
command = ${buildout:executable} -c 'import os ; import json ; print(json.dumps(dict(os.environ)))' > $${directory:var}/cron-environment.json
[dynamic-template-kvm-export-mock]
recipe = slapos.recipe.template:jinja2
url = ${template-kvm-export-mock:location}/${template-kvm-export-mock:filename}
output = $${buildout:directory}/template-kvm-export-mock.cfg
context =
key template_kvm_export dynamic-template-kvm-export:output
key cron_d_mock directory:cron-d-mock
[switch_softwaretype]
kvm-export = dynamic-template-kvm-export-mock:output
software/kvm/test/test-software.cfg
View file @
eea55d78
...
...
@@ -14,7 +14,10 @@ recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template.cfg
[template-kvm-export-mock]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:filename}
[dcron-output]
crond = ${:_profile_base_location_}/mock-crond
crond-orig = ${dcron:location}/sbin/crond
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment