diff --git a/software/erp5testnode/testsuite/deploy-test/buildout.hash.cfg b/software/erp5testnode/testsuite/deploy-test/buildout.hash.cfg index d7c09df29c4a786792fe8dcb966ac394e3cc16af..985942b267c97c8b4b85454a3c938531dcc049a3 100644 --- a/software/erp5testnode/testsuite/deploy-test/buildout.hash.cfg +++ b/software/erp5testnode/testsuite/deploy-test/buildout.hash.cfg @@ -18,4 +18,4 @@ md5sum = 8357771b70efd0740561b1cb46f6955e [template-deploy-test] filename = instance.cfg.in -md5sum = 062e677990ca0cd0c0396993c58b46a2 +md5sum = 1faa52013b12b1753bcaff0b1309ad90 diff --git a/software/erp5testnode/testsuite/deploy-test/instance-deploy-test.cfg.jinja2 b/software/erp5testnode/testsuite/deploy-test/instance-deploy-test.cfg.jinja2 index 81671aed21627ef995bb5431c392454272718342..af6b95cc8089846cd16d03f9a8a31f4b66f83c3d 100644 --- a/software/erp5testnode/testsuite/deploy-test/instance-deploy-test.cfg.jinja2 +++ b/software/erp5testnode/testsuite/deploy-test/instance-deploy-test.cfg.jinja2 @@ -30,8 +30,8 @@ sla-computer_guid = ${slap-connection:computer-id} # Tested image # Passed by request -config-virtual-hard-drive-url = {{ slapparameter_dict.get('image-to-test-url') }} -config-virtual-hard-drive-md5sum = {{ slapparameter_dict.get('image-to-test-md5sum') }} +config-virtual-hard-drive-url = ${image-to-test:url} +config-virtual-hard-drive-md5sum = ${image-to-test:md5sum} # The test script config-bootstrap-script-url = {{ in_vm_test_script }}#{{ in_vm_test_script_md5 }} @@ -58,6 +58,24 @@ return = nat-rule-port-tcp-443 nat-rule-port-tcp-80 +[image-to-test] +# This section tries to replace the download URL by the file:// URL of an already downloaded image +recipe = slapos.recipe.build +init = + options['url'] = options['input-url'] + for md5sum, url in self.buildout['image-repository'].items(): + if md5sum == options['md5sum']: + print("Using pre-downloaded image", url) + options['url'] = url + break +input-url = {{ slapparameter_dict.get('image-to-test-url') }} +md5sum = {{ slapparameter_dict.get('image-to-test-md5sum') }} + +[image-repository] +{% for md5sum, url in test_image_repository.items() %} +{{ md5sum }} = file://{{ url }} +{% endfor %} + [directory] recipe = slapos.cookbook:mkdirectory home = ${buildout:directory} diff --git a/software/erp5testnode/testsuite/deploy-test/instance.cfg.in b/software/erp5testnode/testsuite/deploy-test/instance.cfg.in index 5edb836be6dda4c425afa008971412f9fbb30e69..00850a866eb4ff8f7e8c1aa9d420c6e8e7ba7d6b 100644 --- a/software/erp5testnode/testsuite/deploy-test/instance.cfg.in +++ b/software/erp5testnode/testsuite/deploy-test/instance.cfg.in @@ -50,3 +50,10 @@ context = raw in_vm_test_script_md5 ${deploy-script-controller-script:md5sum} raw waittime ${deploy-script-controller-script:waittime} raw tries ${deploy-script-controller-script:tries} + section test_image_repository test-image-repository + +[test-image-repository] +${download-image-debian-9:md5sum} = ${download-image-debian-9:target} +${download-image-debian-10:md5sum} = ${download-image-debian-10:target} +${download-image-debian-11:md5sum} = ${download-image-debian-11:target} + diff --git a/software/erp5testnode/testsuite/deploy-test/software.cfg b/software/erp5testnode/testsuite/deploy-test/software.cfg index df716642e2aee85d9d5479a2bec98e478968bd52..97763787ebb87d8a581a2d2a793bc49b1715e007 100644 --- a/software/erp5testnode/testsuite/deploy-test/software.cfg +++ b/software/erp5testnode/testsuite/deploy-test/software.cfg @@ -56,5 +56,24 @@ recipe = slapos.recipe.template url = ${:_profile_base_location_}/${:filename} output = ${buildout:directory}/template.cfg +[download-image] +recipe = slapos.recipe.build:download +shared = true + +[download-image-debian-9] +<= download-image +url = http://bit.ly/2IRi8Kg +md5sum = 2b113e3cd8276b9740189622603d6f99 + +[download-image-debian-10] +<= download-image +url = http://shacache.org/shacache/9d3e6d017754fdd08e5ecf78093dec27fd792fb183df6146006adf003b6f4b98c0388d5a11566627101f7855d77f60e3dd4ba7ce66850f4a8f030573b904d5ab +md5sum = b7928d7b0a2b5e2888f5ddf68f5fe422 + +[download-image-debian-11] +<= download-image +url = http://shacache.org/shacache/476c96feff4bc44950e8ccf05d703d973f6d60c5ab95c8724cc4096cb008b3f904708a2377c293bf73758914d2d4556a31a056b0f33cae11ed48194019fdab4c +md5sum = e58dbfd8637d73f7ccd473ad16da852a + [versions] erp5.util = 0.4.69