VIFIB DESCENTRALIZED CLOUD COMPUTING

SlapOS is a decentralized Cloud Computing technology that can automate the deployment and configuration of applications in a heterogeneous environment.
slapos.libnetworkcache
0.180
29
0
0
4
PASSED
Completed
SLAPOS_TEST_LOG_DIRECTORY=/srv/slapgrid/slappart0/var/log/testnode/bvi-MqCyz2j4rF SLAPOS_TEST_SHARED_PART_LIST=/srv/slapgrid/slappart0/srv/shared:/srv/slapgrid/slappart0/srv/testnode/bvi/shared /srv/slapgrid/slappart0/srv/testnode/bvi/soft/b46f68b4c79e8fe509633311b0a555b8/bin/python_for_test setup.py test
running test
running egg_info
creating slapos.libnetworkcache.egg-info
writing requirements to slapos.libnetworkcache.egg-info/requires.txt
writing slapos.libnetworkcache.egg-info/PKG-INFO
writing namespace_packages to slapos.libnetworkcache.egg-info/namespace_packages.txt
writing top-level names to slapos.libnetworkcache.egg-info/top_level.txt
writing dependency_links to slapos.libnetworkcache.egg-info/dependency_links.txt
writing entry points to slapos.libnetworkcache.egg-info/entry_points.txt
writing manifest file 'slapos.libnetworkcache.egg-info/SOURCES.txt'
reading manifest file 'slapos.libnetworkcache.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'slapos.libnetworkcache.egg-info/SOURCES.txt'
running build_ext
Generating certificate for '0.980704029106' (key: '/tmp/tmp0.124099264161', certficate: '/tmp/tmp0.0587194758863')
WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox.
test_generate_cert_exists (slapos.libnetworkcachetests.GenerateSignatureScriptTest) ... ok
test_generate_certificate (slapos.libnetworkcachetests.GenerateSignatureScriptTest) ... Generating a RSA private key
............................................................+++++
........+++++
writing new private key to '/tmp/tmp0.124099264161'
-----
ok
test_generate_key_exists (slapos.libnetworkcachetests.GenerateSignatureScriptTest) ... ok
test_download_offline (slapos.libnetworkcachetests.OfflineTest) ... ok
test_upload_offline (slapos.libnetworkcachetests.OfflineTest) ... ok
test_DirectoryNotFound_non_trustable_entry (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [18/Sep/2020 09:21:14] code 404, message Not Found
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shacache/26b29c69d6615b29ec75e1847aa0f3669c66bdfaddad3ecec6af6820e5a6e7a8f44aefb63aa14b66e9a90a51669ea7b4627fcb7f145e6b3f3152ee02fee1acdb HTTP/1.1" 404 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "PUT /shadir/somekey0.705592496349 HTTP/1.1" 201 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shadir/somekey0.705592496349 HTTP/1.1" 200 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shacache/26b29c69d6615b29ec75e1847aa0f3669c66bdfaddad3ecec6af6820e5a6e7a8f44aefb63aa14b66e9a90a51669ea7b4627fcb7f145e6b3f3152ee02fee1acdb HTTP/1.1" 200 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shadir/somekey0.705592496349 HTTP/1.1" 200 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shacache/26b29c69d6615b29ec75e1847aa0f3669c66bdfaddad3ecec6af6820e5a6e7a8f44aefb63aa14b66e9a90a51669ea7b4627fcb7f145e6b3f3152ee02fee1acdb HTTP/1.1" 200 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "PUT /shadir/somekey0.705592496349 HTTP/1.1" 201 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shadir/somekey0.705592496349 HTTP/1.1" 200 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shacache/26b29c69d6615b29ec75e1847aa0f3669c66bdfaddad3ecec6af6820e5a6e7a8f44aefb63aa14b66e9a90a51669ea7b4627fcb7f145e6b3f3152ee02fee1acdb HTTP/1.1" 200 -
ok
test_NetworkcacheClient_handle_bad_certificates (slapos.libnetworkcachetests.OnlineTest) ... INFO:networkcache:Ignored wrong certificate, reason:
[('asn1 encoding routines', 'c2i_ibuf', 'illegal zero content'), ('asn1 encoding routines', 'asn1_template_noexp_d2i', 'nested asn1 error'), ('asn1 encoding routines', 'asn1_template_noexp_d2i', 'nested asn1 error'), ('PEM routines', 'PEM_ASN1_read_bio', 'ASN1 lib')], offending certificate:
-----BEGIN CERTIFICATE-----
MIIB4DCCAUkCADANBgkqhkiG9w0BAQsFADA5MQswCQYDVQQGEwJGUjEZMBcGA1UE
CBMQRGVmYXVsdCBQcm92aW5jZTEPMA0GA1UEChMGTmV4ZWRpMB4XDTExMDkxNTA5
MDAwMloXDTEyMDkxNTA5MDAwMlowOTELMAkGA1UEBhMCRlIxGTAXBgNVBAgTEERl
ZmF1bHQgUHJvdmluY2UxDzANBgNVBAoTBk5leGVkaTCBnzANBgkqhkiG9w0BAQEF
AAOBjQAwgYkCgYEApYZv6OstoqNzxG1KI6iE5U4Ts2Xx9lgLeUGAMyfJLyMmRLhw
boKOyJ9Xke4dncoBAyNPokUR6iWOcnPHtMvNOsBFZ2f7VA28em3+E1JRYdeNUEtX
Z0s3HjcouaNAnPfjFTXHYj4um1wOw2cURSPuU5dpzKBbV+/QCb5DLheynisCAwEA
ATANBgkqhkiG9w0BAQsFAAOBgQBCZLbTVdrw3RZlVVMFezSHrhBYKAukTwZrNmJX
mHqi2tN8tNo6FX+wmxUUAf3e8R2Ymbdbn2bfbPpcKQ2fG7PuKGvhwMG3BlF9paEC
q7jdfWO18Zp/BG7tagz0jmmC4y/8akzHsVlruo2+2du2freE8dK746uoMlXlP93g
QUUGLQ==
-----END CERTIFICATE-----

ok
test_download (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [18/Sep/2020 09:21:14] code 404, message Not Found
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shacache/df053f46143f0194d66cc4d81ee08442611ec15ef1609ebad7257a6cb45c377a4b09f4faf4fd1eece8d252ec95caa4b336dee647365bad39e9adb1632eafec0f HTTP/1.1" 404 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shacache/df053f46143f0194d66cc4d81ee08442611ec15ef1609ebad7257a6cb45c377a4b09f4faf4fd1eece8d252ec95caa4b336dee647365bad39e9adb1632eafec0f HTTP/1.1" 200 -
ok
test_download_not_exists (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [18/Sep/2020 09:21:14] code 404, message Not Found
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shacache/86361afc45e6df8e795a1ca67b6533c03d04351bf0c78fa6e18bb3fdf28c7d7ccfcea22a93b62e67d5b739f56de2f7cc5ecf8b5bb867ff720b3a25ff708c37f4 HTTP/1.1" 404 -
ok
test_select_json_in_json_no_dict (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [18/Sep/2020 09:21:14] code 404, message Not Found
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shacache/129e9c119a0b9aad6510f0ce4b19de4a68fee259b25243c90b83f1e1e5f83fc91b4083b086398c85dab56a3941a155559da1a2064259b842f81b05606724951d HTTP/1.1" 404 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "PUT /shadir/somekey0.166918865346 HTTP/1.1" 201 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shadir/somekey0.166918865346 HTTP/1.1" 200 -
INFO:networkcache:Bad or missing sha512 in directory response ('This is a string')
ok
test_select_json_no_in_json_response (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [18/Sep/2020 09:21:14] code 404, message Not Found
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shacache/87b59ec3a0b6fa79d81d1a9276d23eb962eef641297f520c9f79c2ad50e8c039dc0e2d8bb683f57d32f6255a905b61edd81c975c12b3758de811348fdabcbc2a HTTP/1.1" 404 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "PUT /shadir/somekey0.935419519775 HTTP/1.1" 201 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shadir/somekey0.935419519775 HTTP/1.1" 200 -
INFO:networkcache:Failed to parse json-in-json response (u'This is not a json.')
ok
test_select_no_entries (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [18/Sep/2020 09:21:14] code 404, message Not Found
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shacache/2a2bf80402bdc75c46333d24390d48a8d4e90c3c6646888d7cef74b634219935da75b322466ddefa64cfd78057a9eae177ce9b1424a9a75eeef242f849e43652 HTTP/1.1" 404 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "PUT /shadir/somekey0.0260896757959 HTTP/1.1" 201 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shadir/somekey0.0260896757959 HTTP/1.1" 200 -
ok
test_select_no_json_response (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [18/Sep/2020 09:21:14] code 404, message Not Found
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shacache/9b0aa613a477256e1ce207630c234fdf1b97e1a8507d1dbcf1b91124325e4504c2361e0cafe0564d6958f27f3f9904fae12746395efa5f1a5fa4383adee4cb84 HTTP/1.1" 404 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "PUT /shadir/somekey0.414796699773 HTTP/1.1" 201 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shadir/somekey0.414796699773 HTTP/1.1" 200 -
INFO:networkcache:Failed to parse json response ('This is not a json.')
ok
test_select_signed_content (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [18/Sep/2020 09:21:14] code 404, message Not Found
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shacache/043819d390b9f62dce263d4f561d44d545ebf7a12d935252de6876d966d73face31a99d304dfe32ab50418d038eb35e1e526a9d4c62d5295bcba8b99e37a3ded HTTP/1.1" 404 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "PUT /shadir/somekey0.45520680841 HTTP/1.1" 201 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shadir/somekey0.45520680841 HTTP/1.1" 200 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shacache/043819d390b9f62dce263d4f561d44d545ebf7a12d935252de6876d966d73face31a99d304dfe32ab50418d038eb35e1e526a9d4c62d5295bcba8b99e37a3ded HTTP/1.1" 200 -
ok
test_select_signed_content_multiple (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [18/Sep/2020 09:21:14] code 404, message Not Found
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shacache/a2a4a80eb2b97c0f72351b520d6ce0cac250d55466e7669ab900d254e1f2df5c1d5434fcceeaae65724e561a2fafb49244b2520179d2b16b77517df6e502153f HTTP/1.1" 404 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "PUT /shadir/somekey0.094127981369 HTTP/1.1" 201 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shacache/a2a4a80eb2b97c0f72351b520d6ce0cac250d55466e7669ab900d254e1f2df5c1d5434fcceeaae65724e561a2fafb49244b2520179d2b16b77517df6e502153f HTTP/1.1" 200 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "PUT /shadir/somekey0.094127981369 HTTP/1.1" 201 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shadir/somekey0.094127981369 HTTP/1.1" 200 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shacache/a2a4a80eb2b97c0f72351b520d6ce0cac250d55466e7669ab900d254e1f2df5c1d5434fcceeaae65724e561a2fafb49244b2520179d2b16b77517df6e502153f HTTP/1.1" 200 -
ok
test_select_signed_content_server_hacked (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [18/Sep/2020 09:21:14] code 404, message Not Found
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shacache/f59be6ef9a2a47cc251f3e8b31ace548d0fc3d3e47a54c42e76659a21cb13755028a0297dda1450e496207e5311c9e8e9c05fdcd4812bd46a6442850f22f5d7e HTTP/1.1" 404 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "PUT /shadir/somekey0.798087496614 HTTP/1.1" 201 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shadir/somekey0.798087496614 HTTP/1.1" 200 -
ok
test_select_signed_content_several_certificates (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [18/Sep/2020 09:21:14] code 404, message Not Found
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shacache/e94def66509a235e83c8db95f32110a535a6660c7242c6630861e3ea55e8bed4394a1123f0dcf076737c71e87d4f76576f6f4db851616a91d18077cb31a2ce58 HTTP/1.1" 404 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "PUT /shadir/somekey0.290962923092 HTTP/1.1" 201 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shadir/somekey0.290962923092 HTTP/1.1" 200 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shacache/e94def66509a235e83c8db95f32110a535a6660c7242c6630861e3ea55e8bed4394a1123f0dcf076737c71e87d4f76576f6f4db851616a91d18077cb31a2ce58 HTTP/1.1" 200 -
ok
test_upload (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [18/Sep/2020 09:21:14] code 404, message Not Found
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shacache/46a0e05b9a420dc9f30d413d435b8f52735960239f30d8825d7b713d617595a8864876a1f8a48ba1abe9cc6895501d109b02f76e4996491848d33efe2b27d146 HTTP/1.1" 404 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "POST /shacache HTTP/1.1" 201 -
ok
test_upload_shadir (slapos.libnetworkcachetests.OnlineTest)
Check scenario with shadir used ... 127.0.0.1 - - [18/Sep/2020 09:21:14] code 404, message Not Found
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shacache/b917511f47e0f2e491208ee543f8172d32b99416ae66243f2e8d6bd14bfc6f73d743e2696a6fdfad8b84a5732f5bd8e48c67fd72d747727e87a016600b956c3b HTTP/1.1" 404 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "PUT /shadir/mykey HTTP/1.1" 201 -
ok
test_upload_shadir_no_filename (slapos.libnetworkcachetests.OnlineTest)
Check scenario with shadir used, but not filename passed ... 127.0.0.1 - - [18/Sep/2020 09:21:14] code 404, message Not Found
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shacache/20bb048a87e10e8be0d3500fc596099d1214ffe55c5fcb8d52e99d5649f9af9bbca608c584831ed94ba0971e414af21d484aba0fb5ea3f0755c63e2c10d2062c HTTP/1.1" 404 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "POST /shacache HTTP/1.1" 201 -
INFO:networkcache:file_name and urlmd5 are required for non-generic upload
ok
test_upload_shadir_select (slapos.libnetworkcachetests.OnlineTest)
Check scenario with shadir used ... 127.0.0.1 - - [18/Sep/2020 09:21:14] code 404, message Not Found
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shacache/5612b4e33bf4d6aeb01bf2a79b589a03b3c2959ae641ceea02689a952803008c7f25f1d30e5e1c7aeb782c864085e83b6794d9ee044ec3a967f1f3c7ee3c1fbf HTTP/1.1" 404 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "PUT /shadir/somekey0.726097137228 HTTP/1.1" 201 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shadir/somekey0.726097137228 HTTP/1.1" 200 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shacache/5612b4e33bf4d6aeb01bf2a79b589a03b3c2959ae641ceea02689a952803008c7f25f1d30e5e1c7aeb782c864085e83b6794d9ee044ec3a967f1f3c7ee3c1fbf HTTP/1.1" 200 -
ok
test_upload_shadir_select_not_exists (slapos.libnetworkcachetests.OnlineTest)
Check scenario with shadir used ... 127.0.0.1 - - [18/Sep/2020 09:21:14] code 404, message Not Found
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shacache/226d54248959f4c3a69fe435110ceefd2696c83f6df34e491d8a8adca8d0691edf4121b21d91540a150c2313061d4c65efa32dd054b6236f7a6a01d9a7621c27 HTTP/1.1" 404 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "PUT /shadir/somekey0.957625701883 HTTP/1.1" 201 -
127.0.0.1 - - [18/Sep/2020 09:21:14] code 404, message Not Found
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shadir/key_another_key0.740845743616 HTTP/1.1" 404 -
INFO:networkcache:ignored unhandled exception at /srv/slapgrid/slappart0/srv/testnode/bvi/inst/test0-0/parts/slapos.libnetworkcache/slapos/libnetworkcachetests.py:403
HTTPError: HTTP Error 404: Not Found
ok
test_upload_twice_same (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [18/Sep/2020 09:21:14] code 404, message Not Found
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shacache/e8cbe2ca9b4baa2fc6a1383a16ddc3bdd083acd1fcbcabd95d1e111481119a258a37d2aa00c0344421290cd05f449c6870e4c279f74a996085da4616366ed426 HTTP/1.1" 404 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shacache/e8cbe2ca9b4baa2fc6a1383a16ddc3bdd083acd1fcbcabd95d1e111481119a258a37d2aa00c0344421290cd05f449c6870e4c279f74a996085da4616366ed426 HTTP/1.1" 200 -
ok
test_upload_wrong_return_code (slapos.libnetworkcachetests.OnlineTestPOST200)
Check reaction on HTTP return code different then 201 ... 127.0.0.1 - - [18/Sep/2020 09:21:14] code 404, message Not Found
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shacache/baa6d49c941390d0b594a5780bedbecb209e6b978fb49e5583214203f4ae37992833222df61e51368417d032a520953bebc0da49864548ec37ded1b289dd07a2 HTTP/1.1" 404 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "POST /shacache HTTP/1.1" 200 -
ok
test_upload_to_ssl_auth (slapos.libnetworkcachetests.OnlineTestSSLServer) ... skipped 'Requires standalone test server'
test_upload_to_ssl_auth_no_auth (slapos.libnetworkcachetests.OnlineTestSSLServer) ... skipped 'Requires standalone test server'
test_upload_with_key_with_ssl_auth (slapos.libnetworkcachetests.OnlineTestSSLServer) ... skipped 'Requires standalone test server'
test_upload_with_key_with_ssl_auth_no_dir_auth (slapos.libnetworkcachetests.OnlineTestSSLServer) ... skipped 'Requires standalone test server'
test_upload_wrong_return_sha (slapos.libnetworkcachetests.OnlineTestWrongChecksum)
Check reaction in case of wrong sha returned ... 127.0.0.1 - - [18/Sep/2020 09:21:14] code 404, message Not Found
127.0.0.1 - - [18/Sep/2020 09:21:14] "GET /shacache/a87e952c16aad7ed2e48745b53f5c9c4b58a8a41884a706339e6377217cae981af86980ebf0ce4ffb5b9110e9a98dafe6faead008057ce971c3b0563da749011 HTTP/1.1" 404 -
127.0.0.1 - - [18/Sep/2020 09:21:14] "POST /shacache HTTP/1.1" 201 -
ok

----------------------------------------------------------------------
Ran 29 tests in 0.180s

OK (skipped=4)