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
1.629
29
0
0
4
PASSED
Completed
SLAPOS_TEST_LOG_DIRECTORY=/srv/slapgrid/slappart5/var/log/testnode/bvi-jwUi8crcOG 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.412334916371' (key: '/tmp/tmp0.388046491579', certficate: '/tmp/tmp0.324334129134')
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.388046491579'
-----
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 - - [17/Sep/2020 02:58:36] code 404, message Not Found
127.0.0.1 - - [17/Sep/2020 02:58:36] "GET /shacache/034e05c05ec42b42229b3e9e9f761ee78c2b13dfd366aa7d6f88a12c2caa7c16a6a148de317e9d2d7f8364fe9308a1cf9e4e133af9910f071af678106356ed8a HTTP/1.1" 404 -
127.0.0.1 - - [17/Sep/2020 02:58:36] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [17/Sep/2020 02:58:36] "PUT /shadir/somekey0.897722262649 HTTP/1.1" 201 -
127.0.0.1 - - [17/Sep/2020 02:58:36] "GET /shadir/somekey0.897722262649 HTTP/1.1" 200 -
127.0.0.1 - - [17/Sep/2020 02:58:36] "GET /shacache/034e05c05ec42b42229b3e9e9f761ee78c2b13dfd366aa7d6f88a12c2caa7c16a6a148de317e9d2d7f8364fe9308a1cf9e4e133af9910f071af678106356ed8a HTTP/1.1" 200 -
127.0.0.1 - - [17/Sep/2020 02:58:36] "GET /shadir/somekey0.897722262649 HTTP/1.1" 200 -
127.0.0.1 - - [17/Sep/2020 02:58:36] "GET /shacache/034e05c05ec42b42229b3e9e9f761ee78c2b13dfd366aa7d6f88a12c2caa7c16a6a148de317e9d2d7f8364fe9308a1cf9e4e133af9910f071af678106356ed8a HTTP/1.1" 200 -
127.0.0.1 - - [17/Sep/2020 02:58:36] "PUT /shadir/somekey0.897722262649 HTTP/1.1" 201 -
127.0.0.1 - - [17/Sep/2020 02:58:36] "GET /shadir/somekey0.897722262649 HTTP/1.1" 200 -
127.0.0.1 - - [17/Sep/2020 02:58:36] "GET /shacache/034e05c05ec42b42229b3e9e9f761ee78c2b13dfd366aa7d6f88a12c2caa7c16a6a148de317e9d2d7f8364fe9308a1cf9e4e133af9910f071af678106356ed8a 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 - - [17/Sep/2020 02:58:36] code 404, message Not Found
127.0.0.1 - - [17/Sep/2020 02:58:36] "GET /shacache/97fe1067f51486f8a0a6731640e54a00e4e27868d87b757060d7f90a88c193879f285801b8549ab31ca1576783b0871ed3df609240a6adda249c9367702afe8f HTTP/1.1" 404 -
127.0.0.1 - - [17/Sep/2020 02:58:36] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [17/Sep/2020 02:58:36] "GET /shacache/97fe1067f51486f8a0a6731640e54a00e4e27868d87b757060d7f90a88c193879f285801b8549ab31ca1576783b0871ed3df609240a6adda249c9367702afe8f HTTP/1.1" 200 -
ok
test_download_not_exists (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [17/Sep/2020 02:58:36] code 404, message Not Found
127.0.0.1 - - [17/Sep/2020 02:58:36] "GET /shacache/737e775009105e86740c32cea4c3e01256f632b23d29249967776779a0800b7f7d913c9b436698891cfe85783712cb0f803ac57657d4f02d072d0721cc699787 HTTP/1.1" 404 -
ok
test_select_json_in_json_no_dict (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [17/Sep/2020 02:58:36] code 404, message Not Found
127.0.0.1 - - [17/Sep/2020 02:58:36] "GET /shacache/7a7841e6c4a6efaafda6003ad96efd5b0592981a86d257d9945af6193fe1e5739c9e5b9495f93c9d0c23eb257926a14a849db86b06beb730ef650e3362fa7e07 HTTP/1.1" 404 -
127.0.0.1 - - [17/Sep/2020 02:58:36] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [17/Sep/2020 02:58:36] "PUT /shadir/somekey0.00686269345753 HTTP/1.1" 201 -
127.0.0.1 - - [17/Sep/2020 02:58:36] "GET /shadir/somekey0.00686269345753 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 - - [17/Sep/2020 02:58:36] code 404, message Not Found
127.0.0.1 - - [17/Sep/2020 02:58:36] "GET /shacache/feda4c7e438e677bd9d7afa37a9dedf1883193dc5304ece6fe8b93f001cb635b8fc934e784803f468bdf0eb90148a2215fa40964154ca7122e62b0244b8ddd4b HTTP/1.1" 404 -
127.0.0.1 - - [17/Sep/2020 02:58:36] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [17/Sep/2020 02:58:36] "PUT /shadir/somekey0.389295761564 HTTP/1.1" 201 -
127.0.0.1 - - [17/Sep/2020 02:58:36] "GET /shadir/somekey0.389295761564 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 - - [17/Sep/2020 02:58:37] code 404, message Not Found
127.0.0.1 - - [17/Sep/2020 02:58:37] "GET /shacache/cec696c38d6c15bb4f89b75b3b2c05a3ab654b607a03e3dc4da33902fd152d4f7e91009be49bd62ab85f2d606b3d1a05c6b6a84d8a52772b4cf5c628502492a2 HTTP/1.1" 404 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "PUT /shadir/somekey0.386844911424 HTTP/1.1" 201 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "GET /shadir/somekey0.386844911424 HTTP/1.1" 200 -
ok
test_select_no_json_response (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [17/Sep/2020 02:58:37] code 404, message Not Found
127.0.0.1 - - [17/Sep/2020 02:58:37] "GET /shacache/564316f358ac7704e75d482a5c53e2a968eeefa424ff59a29b7f7931d1b51eec6cbe4087122989b1c688d07b836d4d94ae374c17514c4c2f70eb6a643927b50e HTTP/1.1" 404 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "PUT /shadir/somekey0.179992472609 HTTP/1.1" 201 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "GET /shadir/somekey0.179992472609 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 - - [17/Sep/2020 02:58:37] code 404, message Not Found
127.0.0.1 - - [17/Sep/2020 02:58:37] "GET /shacache/9153bbd642d9416e472d67b42e890d4169c10c1c1fbad2ed8b42ae6cf93ba236307c74b396cdcc37f5b1ec86b112d19de2507663d7e7a940808ba43fa885a2b4 HTTP/1.1" 404 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "PUT /shadir/somekey0.427897483513 HTTP/1.1" 201 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "GET /shadir/somekey0.427897483513 HTTP/1.1" 200 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "GET /shacache/9153bbd642d9416e472d67b42e890d4169c10c1c1fbad2ed8b42ae6cf93ba236307c74b396cdcc37f5b1ec86b112d19de2507663d7e7a940808ba43fa885a2b4 HTTP/1.1" 200 -
ok
test_select_signed_content_multiple (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [17/Sep/2020 02:58:37] code 404, message Not Found
127.0.0.1 - - [17/Sep/2020 02:58:37] "GET /shacache/7699d5aa170cb21fb1cdada7c0d011e31bcc350ef3a2ff75b9b786fda9b85f082f5b494d50fd361372782dc17039f7536bb2ace398248161e316445be6b594fd HTTP/1.1" 404 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "PUT /shadir/somekey0.521442553672 HTTP/1.1" 201 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "GET /shacache/7699d5aa170cb21fb1cdada7c0d011e31bcc350ef3a2ff75b9b786fda9b85f082f5b494d50fd361372782dc17039f7536bb2ace398248161e316445be6b594fd HTTP/1.1" 200 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "PUT /shadir/somekey0.521442553672 HTTP/1.1" 201 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "GET /shadir/somekey0.521442553672 HTTP/1.1" 200 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "GET /shacache/7699d5aa170cb21fb1cdada7c0d011e31bcc350ef3a2ff75b9b786fda9b85f082f5b494d50fd361372782dc17039f7536bb2ace398248161e316445be6b594fd HTTP/1.1" 200 -
ok
test_select_signed_content_server_hacked (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [17/Sep/2020 02:58:37] code 404, message Not Found
127.0.0.1 - - [17/Sep/2020 02:58:37] "GET /shacache/e2afacad61495e37a42537ff01ff0d2e4f6346c74c8e4a1ef11aadfc7913437713e573f0d4d43bcf0a8ca2385038dabe5730350aba67e523e5f34077dfb0c9d2 HTTP/1.1" 404 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "PUT /shadir/somekey0.742250691341 HTTP/1.1" 201 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "GET /shadir/somekey0.742250691341 HTTP/1.1" 200 -
ok
test_select_signed_content_several_certificates (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [17/Sep/2020 02:58:37] code 404, message Not Found
127.0.0.1 - - [17/Sep/2020 02:58:37] "GET /shacache/c075e37235a79d14a28f6b06ed90059708446d07af6168398e99473813378956f8458ffb3e3bd42df2eda80c74455193ec9715c28f76623d2b6fd52f5e8eb2e4 HTTP/1.1" 404 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "PUT /shadir/somekey0.238928756067 HTTP/1.1" 201 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "GET /shadir/somekey0.238928756067 HTTP/1.1" 200 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "GET /shacache/c075e37235a79d14a28f6b06ed90059708446d07af6168398e99473813378956f8458ffb3e3bd42df2eda80c74455193ec9715c28f76623d2b6fd52f5e8eb2e4 HTTP/1.1" 200 -
ok
test_upload (slapos.libnetworkcachetests.OnlineTest) ... 127.0.0.1 - - [17/Sep/2020 02:58:37] code 404, message Not Found
127.0.0.1 - - [17/Sep/2020 02:58:37] "GET /shacache/0b6a6473050287495605675350532eb1e4a5fe941406297b59849e6638a064b038062217530aa53755350ee204f3b21c387271a57243259ca5493486e491bacb HTTP/1.1" 404 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "POST /shacache HTTP/1.1" 201 -
ok
test_upload_shadir (slapos.libnetworkcachetests.OnlineTest)
Check scenario with shadir used ... 127.0.0.1 - - [17/Sep/2020 02:58:37] code 404, message Not Found
127.0.0.1 - - [17/Sep/2020 02:58:37] "GET /shacache/7ac1fa0d8bc3fd6648f3af5d488f3c28fb295f8ff7e46a0d9f8005a73aa24ef522570e75ed8ff24635272db2c377fdb7cc12e4e800c6fadcf42817a77d71a12e HTTP/1.1" 404 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "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 - - [17/Sep/2020 02:58:37] code 404, message Not Found
127.0.0.1 - - [17/Sep/2020 02:58:37] "GET /shacache/bf6b8d250cb15afe2a50052ee9c38e81adb1c6d17ee8869e66f18c8a078e3abb2e8a7d72c318542b25c356a3f094d4bdc2983b19411eb942ee29802af7baccd3 HTTP/1.1" 404 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "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 - - [17/Sep/2020 02:58:37] code 404, message Not Found
127.0.0.1 - - [17/Sep/2020 02:58:37] "GET /shacache/33be1498bfe6801d1f1709177cb8c4e36413b9498d0a5ba6f8d244b28d588c8ac24b878d64fbd915288eb71e396cd1ed71e1c48c82a0e0c670a867187cbc7371 HTTP/1.1" 404 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "PUT /shadir/somekey0.887841231045 HTTP/1.1" 201 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "GET /shadir/somekey0.887841231045 HTTP/1.1" 200 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "GET /shacache/33be1498bfe6801d1f1709177cb8c4e36413b9498d0a5ba6f8d244b28d588c8ac24b878d64fbd915288eb71e396cd1ed71e1c48c82a0e0c670a867187cbc7371 HTTP/1.1" 200 -
ok
test_upload_shadir_select_not_exists (slapos.libnetworkcachetests.OnlineTest)
Check scenario with shadir used ... 127.0.0.1 - - [17/Sep/2020 02:58:37] code 404, message Not Found
127.0.0.1 - - [17/Sep/2020 02:58:37] "GET /shacache/434b53b7636db38b7116acbb4f53b6c0a4ed72b36517330e0241bca83acab00619737410c879a28a44edc7c19b15d144683516e71b8baa4e0bc51fc2c238148b HTTP/1.1" 404 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "PUT /shadir/somekey0.502437348554 HTTP/1.1" 201 -
127.0.0.1 - - [17/Sep/2020 02:58:37] code 404, message Not Found
127.0.0.1 - - [17/Sep/2020 02:58:37] "GET /shadir/key_another_key0.46757035078 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 - - [17/Sep/2020 02:58:37] code 404, message Not Found
127.0.0.1 - - [17/Sep/2020 02:58:37] "GET /shacache/b549a1dd3b3558f7618ffdb0d8480ef7907cd9df9e2d64570febf0b7dd62634eef0dc35983f61cd0cc39534effb7f975942ff8f52c82c24b3766cc9512aa7405 HTTP/1.1" 404 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "POST /shacache HTTP/1.1" 201 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "GET /shacache/b549a1dd3b3558f7618ffdb0d8480ef7907cd9df9e2d64570febf0b7dd62634eef0dc35983f61cd0cc39534effb7f975942ff8f52c82c24b3766cc9512aa7405 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 - - [17/Sep/2020 02:58:37] code 404, message Not Found
127.0.0.1 - - [17/Sep/2020 02:58:37] "GET /shacache/17de66db70c1e5fc7ffce36d844c7594a40f77fb832a592435d48d38e42d53ecb838d7ed16382530f121a0cd2e2813cbf51b157c1b670eee4ca5343ee2eeebd2 HTTP/1.1" 404 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "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 - - [17/Sep/2020 02:58:37] code 404, message Not Found
127.0.0.1 - - [17/Sep/2020 02:58:37] "GET /shacache/1327c076da1eca0618e2c2fcaf7aa8e14c0e09d50d7b6b90946671371a1e6054e7b585ea4526629c2bafcaf9281b59c39dbd75e8b62cc9e8e8c0fc4ad4fd87e8 HTTP/1.1" 404 -
127.0.0.1 - - [17/Sep/2020 02:58:37] "POST /shacache HTTP/1.1" 201 -
ok

----------------------------------------------------------------------
Ran 29 tests in 1.629s

OK (skipped=4)