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.174
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.0945704254268' (key: '/tmp/tmp0.0555771689327', certficate: '/tmp/tmp0.0080296165942')
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.0555771689327'
-----
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 - - [14/Feb/2020 11:13:50] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shacache/b7fac8ac2bd5d7bda6312adbcd43df624684f726456fd3ddbc262a54fdc361e6e67dfa44493419e4f074ff7e5e9a2858890ee47fafdc0192492f30fa6586e3c9 HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "PUT /shadir/somekey0.248455020561 HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shadir/somekey0.248455020561 HTTP/1.1" 200 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shacache/b7fac8ac2bd5d7bda6312adbcd43df624684f726456fd3ddbc262a54fdc361e6e67dfa44493419e4f074ff7e5e9a2858890ee47fafdc0192492f30fa6586e3c9 HTTP/1.1" 200 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shadir/somekey0.248455020561 HTTP/1.1" 200 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shacache/b7fac8ac2bd5d7bda6312adbcd43df624684f726456fd3ddbc262a54fdc361e6e67dfa44493419e4f074ff7e5e9a2858890ee47fafdc0192492f30fa6586e3c9 HTTP/1.1" 200 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "PUT /shadir/somekey0.248455020561 HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shadir/somekey0.248455020561 HTTP/1.1" 200 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shacache/b7fac8ac2bd5d7bda6312adbcd43df624684f726456fd3ddbc262a54fdc361e6e67dfa44493419e4f074ff7e5e9a2858890ee47fafdc0192492f30fa6586e3c9 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 - - [14/Feb/2020 11:13:50] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shacache/6fb2fbc5b1797d8d21b6b9a43d86b9acb5a648980dd336e040d09d8e418f8bd090401391b3cf24a92de47a6e20f2e8a8d4261881b080ace1d5d7cb264ad2fc28 HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shacache/6fb2fbc5b1797d8d21b6b9a43d86b9acb5a648980dd336e040d09d8e418f8bd090401391b3cf24a92de47a6e20f2e8a8d4261881b080ace1d5d7cb264ad2fc28 HTTP/1.1" 200 -
ok
test_download_not_exists (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [14/Feb/2020 11:13:50] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shacache/efb806c28b410b3afd53590d9fcf3e33b2e89cda25f22306484c3c6768f4ef9a2c7cfe23b0fc3cba8cb997feb08e0ee64867db9270d84bd5358660ddd35be80b HTTP/1.1" 404 -
ok
test_select_json_in_json_no_dict (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [14/Feb/2020 11:13:50] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shacache/77b68f4fb7e5216b5b501924e33d825214ee98018e47c1e312dc244f331bc8d393d5f1a4566c03138cd465f5adcddf5fccc0818c9aabf39d3dc07e72e78dfd30 HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "PUT /shadir/somekey0.0132135974239 HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shadir/somekey0.0132135974239 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 - - [14/Feb/2020 11:13:50] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shacache/a67f5d6f5b4d6987e3df520017b12032a4aea11e2b40bd5ccaf357d1c8bfde680fe3d1911a55249a36981a658ac609f741f951b8c360e027e1e269699902a5d7 HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "PUT /shadir/somekey0.969789288216 HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shadir/somekey0.969789288216 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 - - [14/Feb/2020 11:13:50] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shacache/79cc31b0884ea5c8ec9370de3d616a4b69aba786ed8f76f906db702194fd0d82173b1ffa0cba994a3abb92468adc89bfcbb7cf8f85a2dfddafd173373945f5a9 HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "PUT /shadir/somekey0.342035224458 HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shadir/somekey0.342035224458 HTTP/1.1" 200 -
ok
test_select_no_json_response (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [14/Feb/2020 11:13:50] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shacache/8ec2d14861fb728d1285928d2279c21462ffbd9bb07dfc7beb71787edc0fee15f72b49c85d15199e6cc39aef9ca2fa60facda1b65b36149a4a12086abe518a67 HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "PUT /shadir/somekey0.134089875165 HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shadir/somekey0.134089875165 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 - - [14/Feb/2020 11:13:50] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shacache/9948e2aa8f2ec2febf12ee434a176b5339cd83d749e72ab0558a0566faf1dad11bbf3255eeca1c8dccc1be290edbacd8b3e6e75941612957ab9beaa638345920 HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "PUT /shadir/somekey0.879842037484 HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shadir/somekey0.879842037484 HTTP/1.1" 200 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shacache/9948e2aa8f2ec2febf12ee434a176b5339cd83d749e72ab0558a0566faf1dad11bbf3255eeca1c8dccc1be290edbacd8b3e6e75941612957ab9beaa638345920 HTTP/1.1" 200 -
ok
test_select_signed_content_multiple (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [14/Feb/2020 11:13:50] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shacache/73f02ba158513829f4dc3977e3b1fc9b60a19ccb9cd1adc09cf1c763795f2590ad4b81ace5d9f4eecfdfa60fd69e5b7aa7df27c1332f950072600841b9b2f15e HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "PUT /shadir/somekey0.0443680343002 HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shacache/73f02ba158513829f4dc3977e3b1fc9b60a19ccb9cd1adc09cf1c763795f2590ad4b81ace5d9f4eecfdfa60fd69e5b7aa7df27c1332f950072600841b9b2f15e HTTP/1.1" 200 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "PUT /shadir/somekey0.0443680343002 HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shadir/somekey0.0443680343002 HTTP/1.1" 200 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shacache/73f02ba158513829f4dc3977e3b1fc9b60a19ccb9cd1adc09cf1c763795f2590ad4b81ace5d9f4eecfdfa60fd69e5b7aa7df27c1332f950072600841b9b2f15e HTTP/1.1" 200 -
ok
test_select_signed_content_server_hacked (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [14/Feb/2020 11:13:50] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shacache/9c9a5192f59166be74058171974026970207f4efbcb7c02225fc72052eff9e950af9984fd370d84be7d1e8a012e97ced4a134abe814b0df10b556de5e5048048 HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "PUT /shadir/somekey0.933751003815 HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shadir/somekey0.933751003815 HTTP/1.1" 200 -
ok
test_select_signed_content_several_certificates (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [14/Feb/2020 11:13:50] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shacache/b90efc3d52bfb06bb7088faa3e7988dc278f205966940d895a0b853436601a9fb0c135e3217a708dfb88c639d00fce5a61e6f82f62c294d131476f12ba3a7e23 HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "PUT /shadir/somekey0.848746611863 HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shadir/somekey0.848746611863 HTTP/1.1" 200 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shacache/b90efc3d52bfb06bb7088faa3e7988dc278f205966940d895a0b853436601a9fb0c135e3217a708dfb88c639d00fce5a61e6f82f62c294d131476f12ba3a7e23 HTTP/1.1" 200 -
ok
test_upload (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [14/Feb/2020 11:13:50] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shacache/1cf7588de287b3aec812b5cff922f00465fb19060a10895ca44c9644f9682b1716162645800a028e0494e7f49a1a5d52c7f2ace153754bf6fc0e595def064bf2 HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "POST /shacache HTTP/1.1" 201 -
ok
test_upload_shadir (slapos.libnetworkcachetests.OnlineTest)
Check scenario with shadir used ... 127.0.0.1 - - [14/Feb/2020 11:13:50] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shacache/698c017ab72a090ee791dd8f898fa08589db229f97b68cc1247e35587251895dc60d7b60e4a10a9a7ab509907df106baf379552d2bbe2220e01b0c055404c980 HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "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 - - [14/Feb/2020 11:13:50] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shacache/2f57c2be62fdc5646584edc5232c64d25df125f2f75dbe59ae04e3790ec9d50a66b051cd8908877eedb0f6ca978ca6eafe12b1b8b4dff90c5dd21c92d1322bad HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "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 - - [14/Feb/2020 11:13:50] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shacache/8a35c117a5ef5d5db06262913b8fb442064d37d6dadd73beba9f2ba7b0329b2188272b0d7458df2fd2c581fe6f52036e746e6924e8be5acf87eaebbe5374bb15 HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "PUT /shadir/somekey0.64647709398 HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shadir/somekey0.64647709398 HTTP/1.1" 200 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shacache/8a35c117a5ef5d5db06262913b8fb442064d37d6dadd73beba9f2ba7b0329b2188272b0d7458df2fd2c581fe6f52036e746e6924e8be5acf87eaebbe5374bb15 HTTP/1.1" 200 -
ok
test_upload_shadir_select_not_exists (slapos.libnetworkcachetests.OnlineTest)
Check scenario with shadir used ... 127.0.0.1 - - [14/Feb/2020 11:13:50] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shacache/5bfb4be22a2a810278c6f89d3c7fd56b05ff99943322489b379077b134126fafe73fe3bcdb7201f78e564ff480f353c620f974795796086e8df97a748f72bd5c HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "PUT /shadir/somekey0.105644007645 HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 11:13:50] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shadir/key_another_key0.543051270046 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 - - [14/Feb/2020 11:13:50] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shacache/ab526835251d3e63c4a7e54808124828bece716f1cfb5064b811db9ea7e7511bb396c43e877b9e4843022d41d66016bfe0f3dc38b0e69dfbcfa6683fc459c408 HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shacache/ab526835251d3e63c4a7e54808124828bece716f1cfb5064b811db9ea7e7511bb396c43e877b9e4843022d41d66016bfe0f3dc38b0e69dfbcfa6683fc459c408 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 - - [14/Feb/2020 11:13:50] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shacache/ce9399ad7cebe8d7191a8cedd50369d6eb152374a4da71735c63c80305c055c8d9c83f1fa5963053ed47462e19474f8d0ecf3bc986ec2c5fd6b53aad355a537c HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "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 - - [14/Feb/2020 11:13:50] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 11:13:50] "GET /shacache/e1d52e3da1189614634cb508f72173b22d77234ee92456302351a8897e2093eee61249c547cc8d88f4e973bfac5a5e28fe8de365df8e3fae468eddd2d7a82196 HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 11:13:50] "POST /shacache HTTP/1.1" 201 -
ok

----------------------------------------------------------------------
Ran 29 tests in 0.174s

OK (skipped=4)