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.126
29
0
0
4
PASSED
Completed
SLAPOS_TEST_SHARED_PART_LIST= /srv/slapgrid/slappart9/srv/testnode/bvi/soft/65dbbd3d11daa99cf78c9566a0a4798e/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.0725834586312' (key: '/tmp/tmp0.0512933205667', certficate: '/tmp/tmp0.177986531196')
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.0512933205667'
-----
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 - - [13/Feb/2020 22:56:49] code 404, message Not Found
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shacache/e0b988ac4b2200124fb3ae19ea3bd42ba908240e614f1adb46e43ba5fed33a6092119047e8685ca4c0f79e62c130b16dfdeafb50ea2eb3c0413e7cf09ca08ffa HTTP/1.1" 404 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "PUT /shadir/somekey0.140835564097 HTTP/1.1" 201 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shadir/somekey0.140835564097 HTTP/1.1" 200 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shacache/e0b988ac4b2200124fb3ae19ea3bd42ba908240e614f1adb46e43ba5fed33a6092119047e8685ca4c0f79e62c130b16dfdeafb50ea2eb3c0413e7cf09ca08ffa HTTP/1.1" 200 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shadir/somekey0.140835564097 HTTP/1.1" 200 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shacache/e0b988ac4b2200124fb3ae19ea3bd42ba908240e614f1adb46e43ba5fed33a6092119047e8685ca4c0f79e62c130b16dfdeafb50ea2eb3c0413e7cf09ca08ffa HTTP/1.1" 200 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "PUT /shadir/somekey0.140835564097 HTTP/1.1" 201 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shadir/somekey0.140835564097 HTTP/1.1" 200 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shacache/e0b988ac4b2200124fb3ae19ea3bd42ba908240e614f1adb46e43ba5fed33a6092119047e8685ca4c0f79e62c130b16dfdeafb50ea2eb3c0413e7cf09ca08ffa 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 - - [13/Feb/2020 22:56:49] code 404, message Not Found
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shacache/bc625a1d4f49a95dcbecee4d0fa1695231e8a0e48a6db4456d9d232b18221d3d119d2a7d8c32215979f5488f346b900a358d24ac5e4778522982104bdc4a50c7 HTTP/1.1" 404 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shacache/bc625a1d4f49a95dcbecee4d0fa1695231e8a0e48a6db4456d9d232b18221d3d119d2a7d8c32215979f5488f346b900a358d24ac5e4778522982104bdc4a50c7 HTTP/1.1" 200 -
ok
test_download_not_exists (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [13/Feb/2020 22:56:49] code 404, message Not Found
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shacache/43ffd46f835855bffa872fced893bf54c3344f557a5724698ed501bb4bad070429d1c33ee9d3622b0c984b0b23f8bd94d17b52d6f18cd2f510980f80d3fd57a0 HTTP/1.1" 404 -
ok
test_select_json_in_json_no_dict (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [13/Feb/2020 22:56:49] code 404, message Not Found
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shacache/1b508aa4e62812fdce8d9a6d706204d916b2c510a03324be8460a09f2efcb38c33b510eaeb6b83e470182df304a6a7918e5bf341a78e5bb0c05a937fa9bc2032 HTTP/1.1" 404 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "PUT /shadir/somekey0.455029452909 HTTP/1.1" 201 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shadir/somekey0.455029452909 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 - - [13/Feb/2020 22:56:49] code 404, message Not Found
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shacache/477862f6bb8a857ed62a840659db0594a9e4b9cfbf92b4062db8eb2b863c053a498a9de2045e02dc31ef51625760763afc0ea96a64d72a4756f5410030b1d56a HTTP/1.1" 404 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "PUT /shadir/somekey0.21758919358 HTTP/1.1" 201 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shadir/somekey0.21758919358 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 - - [13/Feb/2020 22:56:49] code 404, message Not Found
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shacache/e1c71854fc7064772bd8b65a3e9a8164fc2d0dc63691b50d7ef03aaaa52c5d91f5b911f1fb8e896ac64a8658c56f60a32a60f420736a11e945d7f4c4013db195 HTTP/1.1" 404 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "PUT /shadir/somekey0.855295239521 HTTP/1.1" 201 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shadir/somekey0.855295239521 HTTP/1.1" 200 -
ok
test_select_no_json_response (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [13/Feb/2020 22:56:49] code 404, message Not Found
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shacache/34288b3700db4154232d2de32d6dece45bc83c85025e7aa660735b37af0ce861e065618393057453f00ed120d69e432b2f03f9da1df991e0e0c6af2f6c2ff98d HTTP/1.1" 404 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "PUT /shadir/somekey0.674084801581 HTTP/1.1" 201 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shadir/somekey0.674084801581 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 - - [13/Feb/2020 22:56:49] code 404, message Not Found
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shacache/ed4a020cb8b2e3ec5be9769221bdb3f3234cb3ff2bc133ecbaaceff8a6108b243534523cbfb6048c760254e460bbd5df0b87dfc525f79103d6e1f1b27e7c167b HTTP/1.1" 404 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "PUT /shadir/somekey0.762497359189 HTTP/1.1" 201 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shadir/somekey0.762497359189 HTTP/1.1" 200 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shacache/ed4a020cb8b2e3ec5be9769221bdb3f3234cb3ff2bc133ecbaaceff8a6108b243534523cbfb6048c760254e460bbd5df0b87dfc525f79103d6e1f1b27e7c167b HTTP/1.1" 200 -
ok
test_select_signed_content_multiple (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [13/Feb/2020 22:56:49] code 404, message Not Found
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shacache/37166270b7a267c0246f877ce257ce27794392d950495e3a0c0b34ca76660d7c96211f0c15593b9e9c1c6af5ede1f02a960ba78e20549ea66d49d726c5af36a0 HTTP/1.1" 404 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "PUT /shadir/somekey0.767148168126 HTTP/1.1" 201 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shacache/37166270b7a267c0246f877ce257ce27794392d950495e3a0c0b34ca76660d7c96211f0c15593b9e9c1c6af5ede1f02a960ba78e20549ea66d49d726c5af36a0 HTTP/1.1" 200 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "PUT /shadir/somekey0.767148168126 HTTP/1.1" 201 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shadir/somekey0.767148168126 HTTP/1.1" 200 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shacache/37166270b7a267c0246f877ce257ce27794392d950495e3a0c0b34ca76660d7c96211f0c15593b9e9c1c6af5ede1f02a960ba78e20549ea66d49d726c5af36a0 HTTP/1.1" 200 -
ok
test_select_signed_content_server_hacked (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [13/Feb/2020 22:56:49] code 404, message Not Found
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shacache/0a5c68c8d4cc4b5f24d6428598cb3f871b19dd8b77f3cf71b785c4c9c1e84169af029c64952d647eff8b6c9d931816197bdbb5d46798eb20e120c3c272089c41 HTTP/1.1" 404 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "PUT /shadir/somekey0.445120529925 HTTP/1.1" 201 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shadir/somekey0.445120529925 HTTP/1.1" 200 -
ok
test_select_signed_content_several_certificates (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [13/Feb/2020 22:56:49] code 404, message Not Found
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shacache/919541e1ef2280658e32e216425ac2f24b9f1d4b1769df928d06cc6f0c89412e89ef04985cf2af34cc56719e4a70c873919351a32241cab2634333d51cfe3c3d HTTP/1.1" 404 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "PUT /shadir/somekey0.150492307944 HTTP/1.1" 201 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shadir/somekey0.150492307944 HTTP/1.1" 200 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shacache/919541e1ef2280658e32e216425ac2f24b9f1d4b1769df928d06cc6f0c89412e89ef04985cf2af34cc56719e4a70c873919351a32241cab2634333d51cfe3c3d HTTP/1.1" 200 -
ok
test_upload (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [13/Feb/2020 22:56:49] code 404, message Not Found
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shacache/0b97bcc149d8deb268359ee28f56a831cc5131a1f31105ece3aeb10b3ef53a3ce5716bbb70e109011a4d674de60b1517bb9f5cd3c21dcdacccd352d50f9918ab HTTP/1.1" 404 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "POST /shacache HTTP/1.1" 201 -
ok
test_upload_shadir (slapos.libnetworkcachetests.OnlineTest)
Check scenario with shadir used ... 127.0.0.1 - - [13/Feb/2020 22:56:49] code 404, message Not Found
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shacache/acde116bdac42ec2e87edcf2e94775d72513959bdce36a2b5b98e88ccdc6eef2e8cf2398ec2ce297ed074235b6575cba560961cfb44b5ec8cb88bccf424a590a HTTP/1.1" 404 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [13/Feb/2020 22:56: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 - - [13/Feb/2020 22:56:49] code 404, message Not Found
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shacache/54336c05fa64b766d2877ddffaf226964ef4039f978a542dfa84d674aed3b74633725e76879fca7e4d19dc4dc897fcd41ae4ccc32e6cdf894b882e68e96dd5c9 HTTP/1.1" 404 -
127.0.0.1 - - [13/Feb/2020 22:56: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 - - [13/Feb/2020 22:56:49] code 404, message Not Found
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shacache/cbe7cddf099ba007655857b481048e58a8533a0d742d8328d3dcd49784b0d9d803cc4f5ecc285c2c4610dd815097e3ff86dea8d28650b51766c8d955a690d2a9 HTTP/1.1" 404 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "PUT /shadir/somekey0.164237960217 HTTP/1.1" 201 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shadir/somekey0.164237960217 HTTP/1.1" 200 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shacache/cbe7cddf099ba007655857b481048e58a8533a0d742d8328d3dcd49784b0d9d803cc4f5ecc285c2c4610dd815097e3ff86dea8d28650b51766c8d955a690d2a9 HTTP/1.1" 200 -
ok
test_upload_shadir_select_not_exists (slapos.libnetworkcachetests.OnlineTest)
Check scenario with shadir used ... 127.0.0.1 - - [13/Feb/2020 22:56:49] code 404, message Not Found
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shacache/46266e043450c734a1356b6ae3dd38b60204e1641bd20e2074f48f36d63776546f0c551ee140e1c88a30ca40c2d69e90e4d4854ce1f33e1c1d9d2ee8a6a65de2 HTTP/1.1" 404 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "PUT /shadir/somekey0.040608509569 HTTP/1.1" 201 -
127.0.0.1 - - [13/Feb/2020 22:56:49] code 404, message Not Found
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shadir/key_another_key0.520653078919 HTTP/1.1" 404 -
INFO:networkcache:ignored unhandled exception at /srv/slapgrid/slappart9/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 - - [13/Feb/2020 22:56:49] code 404, message Not Found
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shacache/4a2256f4405d1b5ee5854eb718306e6d354b33a5c48849948b322cd0b6cd3db5f8e2e168026238b14c5aaafc48534cf05bcbbe27c5005fc86a73aa34227ccfff HTTP/1.1" 404 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shacache/4a2256f4405d1b5ee5854eb718306e6d354b33a5c48849948b322cd0b6cd3db5f8e2e168026238b14c5aaafc48534cf05bcbbe27c5005fc86a73aa34227ccfff 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 - - [13/Feb/2020 22:56:49] code 404, message Not Found
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shacache/8dec737d5bcc39a3671f71375c0118fb27fe511fda3649ef1afc5dbd113056ae8c712c67ceb158cd18a4841e2be2987c01e2066697296dd924ea4ddf8415d59a HTTP/1.1" 404 -
127.0.0.1 - - [13/Feb/2020 22:56: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 - - [13/Feb/2020 22:56:49] code 404, message Not Found
127.0.0.1 - - [13/Feb/2020 22:56:49] "GET /shacache/eb2b39dbaacca14224d945942386629d65f241ee2e41484a1f65f268d2486ba45665cf889765430c2eba50ba194abe0f39531f27ce5bcf1b501216b7ee6432e8 HTTP/1.1" 404 -
127.0.0.1 - - [13/Feb/2020 22:56:49] "POST /shacache HTTP/1.1" 201 -
ok

----------------------------------------------------------------------
Ran 29 tests in 0.126s

OK (skipped=4)