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
4.834
29
0
0
4
PASSED
Completed
SLAPOS_TEST_LOG_DIRECTORY=/srv/slapgrid/slappart5/var/log/testnode/bvi-nhubIUnM3B SLAPOS_TEST_SHARED_PART_LIST=/srv/slapgrid/slappart5/srv/shared:/srv/slapgrid/slappart5/srv/testnode/bvi/shared /srv/slapgrid/slappart5/srv/testnode/bvi/soft/e1351768082399478c1b8d9a0c412905/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.240737122234' (key: '/tmp/tmp0.903574085995', certficate: '/tmp/tmp0.377941163899')
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.903574085995'
-----
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 - - [16/Sep/2020 14:11:44] code 404, message Not Found
127.0.0.1 - - [16/Sep/2020 14:11:44] "GET /shacache/87902c54d0a62153b65bbb4b1b1a30fa3df37720b1115cfe50cd16348835d463583acd353a8886e87a0e4fa23b858749192798616c8ccb1018b8bdcfa589258e HTTP/1.1" 404 -
127.0.0.1 - - [16/Sep/2020 14:11:44] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [16/Sep/2020 14:11:46] "PUT /shadir/somekey0.607831460162 HTTP/1.1" 201 -
127.0.0.1 - - [16/Sep/2020 14:11:46] "GET /shadir/somekey0.607831460162 HTTP/1.1" 200 -
127.0.0.1 - - [16/Sep/2020 14:11:46] "GET /shacache/87902c54d0a62153b65bbb4b1b1a30fa3df37720b1115cfe50cd16348835d463583acd353a8886e87a0e4fa23b858749192798616c8ccb1018b8bdcfa589258e HTTP/1.1" 200 -
127.0.0.1 - - [16/Sep/2020 14:11:46] "GET /shadir/somekey0.607831460162 HTTP/1.1" 200 -
127.0.0.1 - - [16/Sep/2020 14:11:46] "GET /shacache/87902c54d0a62153b65bbb4b1b1a30fa3df37720b1115cfe50cd16348835d463583acd353a8886e87a0e4fa23b858749192798616c8ccb1018b8bdcfa589258e HTTP/1.1" 200 -
127.0.0.1 - - [16/Sep/2020 14:11:46] "PUT /shadir/somekey0.607831460162 HTTP/1.1" 201 -
127.0.0.1 - - [16/Sep/2020 14:11:46] "GET /shadir/somekey0.607831460162 HTTP/1.1" 200 -
127.0.0.1 - - [16/Sep/2020 14:11:46] "GET /shacache/87902c54d0a62153b65bbb4b1b1a30fa3df37720b1115cfe50cd16348835d463583acd353a8886e87a0e4fa23b858749192798616c8ccb1018b8bdcfa589258e 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 - - [16/Sep/2020 14:11:49] code 404, message Not Found
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shacache/6ef70dee8d5a4d6a4c1e8ef247fedbc96ef0a97bff4bafa25e750d6687b8de457213b43cc955a0569e62c0186f441f07fe410ca12f58940702a7992aa93fd7db HTTP/1.1" 404 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shacache/6ef70dee8d5a4d6a4c1e8ef247fedbc96ef0a97bff4bafa25e750d6687b8de457213b43cc955a0569e62c0186f441f07fe410ca12f58940702a7992aa93fd7db HTTP/1.1" 200 -
ok
test_download_not_exists (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [16/Sep/2020 14:11:49] code 404, message Not Found
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shacache/cee36a837eae278a161e21a5e8247ba46854a9343a4a27a8698817bd51eaf53a1c73a22451c8f3abd6a17e823fb5ce9176663d934dc5a3d52728c5de2bfb5969 HTTP/1.1" 404 -
ok
test_select_json_in_json_no_dict (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [16/Sep/2020 14:11:49] code 404, message Not Found
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shacache/ed2ceb0985ade60dfc2514586d95570696452ebf5e781f5c447e522773da8a3cefee00587e0c015c88d725c04c4432e2186a9fcf5b34b12e6e652f3e63d46a70 HTTP/1.1" 404 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "PUT /shadir/somekey0.323797189233 HTTP/1.1" 201 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shadir/somekey0.323797189233 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 - - [16/Sep/2020 14:11:49] code 404, message Not Found
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shacache/7b0488d46bf9ad7fa904cbcd51388a83e51b52ba55c19fa9f482efb0cdb8b373a76560237e8b36dfd2b8dc1d30bd52b47a52e4e4d6b12a3120c84cd012a4b39d HTTP/1.1" 404 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "PUT /shadir/somekey0.326890283502 HTTP/1.1" 201 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shadir/somekey0.326890283502 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 - - [16/Sep/2020 14:11:49] code 404, message Not Found
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shacache/602944779d040849a90888fa64e667e338a2cbb27cd12541f3c13793641883ac8a9f51cd10ba4d9ad70c99cd9c07201eeb7c0f3eb09affeabec8a12fefff6616 HTTP/1.1" 404 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "PUT /shadir/somekey0.650627323596 HTTP/1.1" 201 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shadir/somekey0.650627323596 HTTP/1.1" 200 -
ok
test_select_no_json_response (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [16/Sep/2020 14:11:49] code 404, message Not Found
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shacache/7ac93ac67ac65b064bea6caa8b398e006ec7e477f1a24257e187bafc13b724c041da6a25f531f928c1a9949b5ae940ea677409df3cb5f0bb3f4d210eb47fb797 HTTP/1.1" 404 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "PUT /shadir/somekey0.439208575777 HTTP/1.1" 201 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shadir/somekey0.439208575777 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 - - [16/Sep/2020 14:11:49] code 404, message Not Found
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shacache/625a429cbd08a204564240f929ae8abda2c65f5f9fb5014534093ee3fa4cb51a4899441b36c8b7f20d2e9c3e1052426712893cab71fd4808be5a91b84477bb47 HTTP/1.1" 404 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "PUT /shadir/somekey0.641835514009 HTTP/1.1" 201 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shadir/somekey0.641835514009 HTTP/1.1" 200 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shacache/625a429cbd08a204564240f929ae8abda2c65f5f9fb5014534093ee3fa4cb51a4899441b36c8b7f20d2e9c3e1052426712893cab71fd4808be5a91b84477bb47 HTTP/1.1" 200 -
ok
test_select_signed_content_multiple (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [16/Sep/2020 14:11:49] code 404, message Not Found
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shacache/f916ae56167032e53af400d10bc09658bfe9ec521992e04ddc3d689fe4b557fc5fec59f8e1250f8595c8064fc7219ab5a0f898aba95c6ef68e4d422e0baba12e HTTP/1.1" 404 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "PUT /shadir/somekey0.0155992923054 HTTP/1.1" 201 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shacache/f916ae56167032e53af400d10bc09658bfe9ec521992e04ddc3d689fe4b557fc5fec59f8e1250f8595c8064fc7219ab5a0f898aba95c6ef68e4d422e0baba12e HTTP/1.1" 200 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "PUT /shadir/somekey0.0155992923054 HTTP/1.1" 201 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shadir/somekey0.0155992923054 HTTP/1.1" 200 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shacache/f916ae56167032e53af400d10bc09658bfe9ec521992e04ddc3d689fe4b557fc5fec59f8e1250f8595c8064fc7219ab5a0f898aba95c6ef68e4d422e0baba12e HTTP/1.1" 200 -
ok
test_select_signed_content_server_hacked (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [16/Sep/2020 14:11:49] code 404, message Not Found
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shacache/830d354e386f375ec96172bba092cf278d1d6f8dd46ae672cd19128cb8a8a1484f3af2435894813936d0921fe27c52d9da10ee97e3a4a2766a94fccc41049f52 HTTP/1.1" 404 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "PUT /shadir/somekey0.927784744687 HTTP/1.1" 201 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shadir/somekey0.927784744687 HTTP/1.1" 200 -
ok
test_select_signed_content_several_certificates (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [16/Sep/2020 14:11:49] code 404, message Not Found
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shacache/641ecc453ab99deb054132dbeddd5eb2f4cbc896259ef1018f6e3bb09b5548feb3fe7f5f47f5f000425fff30d06f87575cbef0e37f129868631575c9db53bb28 HTTP/1.1" 404 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "PUT /shadir/somekey0.328705858887 HTTP/1.1" 201 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shadir/somekey0.328705858887 HTTP/1.1" 200 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shacache/641ecc453ab99deb054132dbeddd5eb2f4cbc896259ef1018f6e3bb09b5548feb3fe7f5f47f5f000425fff30d06f87575cbef0e37f129868631575c9db53bb28 HTTP/1.1" 200 -
ok
test_upload (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [16/Sep/2020 14:11:49] code 404, message Not Found
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shacache/91b44771f11a5b18101764bb3a4db1bdcab476118bb04a2e45991d5a0e3415f272ce2a821c370f181db79ab27d4635c0b6c5ea265137d5fd612596824288512c HTTP/1.1" 404 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "POST /shacache HTTP/1.1" 201 -
ok
test_upload_shadir (slapos.libnetworkcachetests.OnlineTest)
Check scenario with shadir used ... 127.0.0.1 - - [16/Sep/2020 14:11:49] code 404, message Not Found
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shacache/e0681741a5b0d93dba1be426755b32ff5524e6fd17fc3c91f4f21543a225840d177aa75230fe00362a07932696b7228c8b1dd2135cbca5b0befe4c033bdcf5e3 HTTP/1.1" 404 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "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 - - [16/Sep/2020 14:11:49] code 404, message Not Found
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shacache/dc50413b105ea672d41dc2a9d03dd1c0968d959cb367d4edfa522519c615bda63eb6a7d8083cae037962d3430e40a50df309da72aa895adc1d03c28a8943af1a HTTP/1.1" 404 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "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 - - [16/Sep/2020 14:11:49] code 404, message Not Found
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shacache/1294af3fc79210ef595efecdad8383ff5cc26d6f71465797c609972c4ea554e4b2808c7d145ac8806cbe89a847bc8f20c8fef2c83d53dc50eec4477fadf5d8be HTTP/1.1" 404 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "PUT /shadir/somekey0.987223650894 HTTP/1.1" 201 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shadir/somekey0.987223650894 HTTP/1.1" 200 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shacache/1294af3fc79210ef595efecdad8383ff5cc26d6f71465797c609972c4ea554e4b2808c7d145ac8806cbe89a847bc8f20c8fef2c83d53dc50eec4477fadf5d8be HTTP/1.1" 200 -
ok
test_upload_shadir_select_not_exists (slapos.libnetworkcachetests.OnlineTest)
Check scenario with shadir used ... 127.0.0.1 - - [16/Sep/2020 14:11:49] code 404, message Not Found
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shacache/8344d40614bc157108b95c51f1cfd9302212412d7bb8b624f0e0212cac7b7e352fc61e4d9c7bfa87a2970e78fa2d26b427f8bc628964cc71b42fc0e23ab2a57b HTTP/1.1" 404 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "PUT /shadir/somekey0.00726680215419 HTTP/1.1" 201 -
127.0.0.1 - - [16/Sep/2020 14:11:49] code 404, message Not Found
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shadir/key_another_key0.716657836101 HTTP/1.1" 404 -
INFO:networkcache:ignored unhandled exception at /srv/slapgrid/slappart5/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 - - [16/Sep/2020 14:11:49] code 404, message Not Found
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shacache/fa2a1f152bc6325aff0da95792d072241e159d281f495e7bce36a7c9082ecce93449257e6e7dccba4c327c4e3d23b3045e619e9d0f8cc0672202234f80f56aaa HTTP/1.1" 404 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shacache/fa2a1f152bc6325aff0da95792d072241e159d281f495e7bce36a7c9082ecce93449257e6e7dccba4c327c4e3d23b3045e619e9d0f8cc0672202234f80f56aaa 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 - - [16/Sep/2020 14:11:49] code 404, message Not Found
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shacache/53e9774b4dcaf30312568ad442bb5d3f8203923d2a7879ad747f3e98b19fea3b52d17ec901f063954dc562fa0c94f19164b745d418cf963b9054e3517c4f02f5 HTTP/1.1" 404 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "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 - - [16/Sep/2020 14:11:49] code 404, message Not Found
127.0.0.1 - - [16/Sep/2020 14:11:49] "GET /shacache/5b41bad34fd9c8ad8bb33dde0b9f9feb7e8f54d080b2e72d1100c8060048d50018d2c3e759af7320ec99de3f4bdb2ae0ac4429afead4ff29326f8df44ebb7236 HTTP/1.1" 404 -
127.0.0.1 - - [16/Sep/2020 14:11:49] "POST /shacache HTTP/1.1" 201 -
ok

----------------------------------------------------------------------
Ran 29 tests in 4.834s

OK (skipped=4)