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.124
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.766942501468' (key: '/tmp/tmp0.0990518201465', certficate: '/tmp/tmp0.48742138849')
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.0990518201465'
-----
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 09:15:47] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shacache/06ee0fe114929f857febed6072e2ac2ea89654032642e7c3b1609ef79de314763ab1069c983621d257befd9fd5a7f9173832609f66030480bd7a21b9ff2f5afa HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "PUT /shadir/somekey0.747241173091 HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shadir/somekey0.747241173091 HTTP/1.1" 200 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shacache/06ee0fe114929f857febed6072e2ac2ea89654032642e7c3b1609ef79de314763ab1069c983621d257befd9fd5a7f9173832609f66030480bd7a21b9ff2f5afa HTTP/1.1" 200 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shadir/somekey0.747241173091 HTTP/1.1" 200 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shacache/06ee0fe114929f857febed6072e2ac2ea89654032642e7c3b1609ef79de314763ab1069c983621d257befd9fd5a7f9173832609f66030480bd7a21b9ff2f5afa HTTP/1.1" 200 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "PUT /shadir/somekey0.747241173091 HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shadir/somekey0.747241173091 HTTP/1.1" 200 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shacache/06ee0fe114929f857febed6072e2ac2ea89654032642e7c3b1609ef79de314763ab1069c983621d257befd9fd5a7f9173832609f66030480bd7a21b9ff2f5afa 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 09:15:47] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shacache/505b874dda940a131588e04b4cd0ec9892a54da5a2e261d6d8bb8fd48c7bf6087530275a4cf2f4d540b37e560a1daaa92a72e6f8544835ec468f2483113636b0 HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shacache/505b874dda940a131588e04b4cd0ec9892a54da5a2e261d6d8bb8fd48c7bf6087530275a4cf2f4d540b37e560a1daaa92a72e6f8544835ec468f2483113636b0 HTTP/1.1" 200 -
ok
test_download_not_exists (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [14/Feb/2020 09:15:47] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shacache/b8a138cdc5acb192f6d91071faefde587bd614dbea350695be635b2fcc4ce1835aad8e25226f6337544240418b78b7cbe639667074f49f3973167f35975055d6 HTTP/1.1" 404 -
ok
test_select_json_in_json_no_dict (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [14/Feb/2020 09:15:47] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shacache/8f969d5a10588e143e93601197fce3758e5835ebf809537bca2e9d091ec8827ce98d720b20d1a3f271d6eb3689cb2d43ac15eedb6f127978bd09c9465f5290bc HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "PUT /shadir/somekey0.142266891162 HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shadir/somekey0.142266891162 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 09:15:47] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shacache/96251f8d4efa6e8587cc093c62141190b675bac350d6f0a2e8bff5078986a6fa29051956b665e8990cbbac7161673b5c3103004e26c67506b2589cc56855efb5 HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "PUT /shadir/somekey0.520627221472 HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shadir/somekey0.520627221472 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 09:15:47] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shacache/fd0df68c8721191e00c663c08d1b6d6c14c0eb08ecb1a187847edfef920253580368adabff8ff9ebe734e317b55cff68f4fe3dab7614d51d3cfc3b36935f1867 HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "PUT /shadir/somekey0.720777354998 HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shadir/somekey0.720777354998 HTTP/1.1" 200 -
ok
test_select_no_json_response (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [14/Feb/2020 09:15:47] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shacache/354adf4e2fa714985d48778f86f427dc5bce3074b653856788da8da4691f1cba3339ae3a269f0942c97d9014f7759756ad150e7e0639aa332f9c48d40af9b278 HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "PUT /shadir/somekey0.504295282836 HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shadir/somekey0.504295282836 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 09:15:47] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shacache/ade64496b065533c05a7724cb5170810b00513502ea22fbcdd42874d5253daee9a15f5b47259b3b6010d064e0bcd8f41b415e3f54fea67b34421cfc659c72995 HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "PUT /shadir/somekey0.00688779834757 HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shadir/somekey0.00688779834757 HTTP/1.1" 200 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shacache/ade64496b065533c05a7724cb5170810b00513502ea22fbcdd42874d5253daee9a15f5b47259b3b6010d064e0bcd8f41b415e3f54fea67b34421cfc659c72995 HTTP/1.1" 200 -
ok
test_select_signed_content_multiple (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [14/Feb/2020 09:15:47] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shacache/9390b4621f25117b0b5152ed2ab9dd9f51d3c7d12a29271274f25437d18e87aa372b095a9bea8cba2a0cffd82cc75c9c442f5a882fdbe0a7830fa0e2011ae840 HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "PUT /shadir/somekey0.586144278989 HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shacache/9390b4621f25117b0b5152ed2ab9dd9f51d3c7d12a29271274f25437d18e87aa372b095a9bea8cba2a0cffd82cc75c9c442f5a882fdbe0a7830fa0e2011ae840 HTTP/1.1" 200 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "PUT /shadir/somekey0.586144278989 HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shadir/somekey0.586144278989 HTTP/1.1" 200 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shacache/9390b4621f25117b0b5152ed2ab9dd9f51d3c7d12a29271274f25437d18e87aa372b095a9bea8cba2a0cffd82cc75c9c442f5a882fdbe0a7830fa0e2011ae840 HTTP/1.1" 200 -
ok
test_select_signed_content_server_hacked (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [14/Feb/2020 09:15:47] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shacache/dff2f992815cc7e6e9a3f9448a5159663351b722aa89f83999bc9c5436021ab20b4224bf1752ab25d2d1acab6b3440a0b037fe8fc90c77d24e4135426683c9ba HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "PUT /shadir/somekey0.356315748011 HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shadir/somekey0.356315748011 HTTP/1.1" 200 -
ok
test_select_signed_content_several_certificates (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [14/Feb/2020 09:15:47] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shacache/d0403fc82b1aed03daabf5407b7de731e07491fe263178589315fdde1fa2c7a9332ef07e300992bef688131c4f3cb096133d61163a866ca36451e2b57f5bbfbe HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "PUT /shadir/somekey0.100939398138 HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shadir/somekey0.100939398138 HTTP/1.1" 200 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shacache/d0403fc82b1aed03daabf5407b7de731e07491fe263178589315fdde1fa2c7a9332ef07e300992bef688131c4f3cb096133d61163a866ca36451e2b57f5bbfbe HTTP/1.1" 200 -
ok
test_upload (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [14/Feb/2020 09:15:47] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shacache/7cbbe622367a55ace4a9812d181fea7cf20db07065d955bca18ec2940f60f911779cd5199fc424e51b44d6071c5c2b6ac6372fd7a945294a78610fbc0043d451 HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "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 09:15:47] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shacache/5481532cd9151693bab1d1bfd3d1e0eb3ee9512d240706f9d26fe140066008f3c38b3d81dc8b141713632ab3b65463a0c349248eb0523180408697188d7dfc94 HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "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 09:15:47] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shacache/23206b4ac82d8e2e75b4f01401848a85768480933b105d6d4135406ebf1019c756d8112c272a30486cbd7fa3ed44c6a8c37c3116fbe4b572f3187b389aae2336 HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "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 09:15:47] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shacache/f409e8541dbd2c8c32f92ecfea2ef51fd713caf1e1a898ccdaa0d7c24b387987fc904e77752c9fae1d60a55d4b66a0f108ff2591b69340f761173e6a48171f53 HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "PUT /shadir/somekey0.806723468457 HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shadir/somekey0.806723468457 HTTP/1.1" 200 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shacache/f409e8541dbd2c8c32f92ecfea2ef51fd713caf1e1a898ccdaa0d7c24b387987fc904e77752c9fae1d60a55d4b66a0f108ff2591b69340f761173e6a48171f53 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 09:15:47] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shacache/b7dd1a15737b6272c768a38bb82fff05ea6971ca1876a685a3bae74b05b13dac8c3a710d2d3f0115318843e6a01ec9840172134be2392ce9e1301ca2dc87126a HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "PUT /shadir/somekey0.903577501366 HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 09:15:47] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shadir/key_another_key0.180050891291 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 09:15:47] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shacache/0e050682e9df63a3b2fdbc9dec705fb79d72f577f297d3916157fca7c72853c2e8beb11505df42298244cb064330e576e6139e43406db6b9194837af392d5715 HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shacache/0e050682e9df63a3b2fdbc9dec705fb79d72f577f297d3916157fca7c72853c2e8beb11505df42298244cb064330e576e6139e43406db6b9194837af392d5715 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 09:15:47] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shacache/478488904f7f7fdf2c126d1e8460517e0eeabc9f8210f5276ff961ec854f95700258b5bc88b7f9807f6142ee427c838a9b6bdc7a9f8acb7186ef2569527543bf HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "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 09:15:47] code 404, message Not Found
127.0.0.1 - - [14/Feb/2020 09:15:47] "GET /shacache/fed0cbf3a56b1017f46b72392dd4aea5b3c2e739c7cc7599e578a54db31cbc83e61465903956140cbdcdd07ad8a91cc1c349bd79612801e3524f179e35273445 HTTP/1.1" 404 -
127.0.0.1 - - [14/Feb/2020 09:15:47] "POST /shacache HTTP/1.1" 201 -
ok

----------------------------------------------------------------------
Ran 29 tests in 0.124s

OK (skipped=4)