|
| 1 | +{ |
| 2 | + fetchPypi, |
| 3 | + keystoneauth1, |
| 4 | + lib, |
| 5 | + openstacksdk, |
| 6 | + oslo-i18n, |
| 7 | + oslo-utils, |
| 8 | + python3Packages, |
| 9 | + writeText, |
| 10 | +}: |
| 11 | +let |
| 12 | + inherit (python3Packages) |
| 13 | + ddt |
| 14 | + pbr |
| 15 | + prettytable |
| 16 | + pyopenssl |
| 17 | + requests |
| 18 | + requests-mock |
| 19 | + stestr |
| 20 | + testscenarios |
| 21 | + warlock |
| 22 | + wrapt |
| 23 | + ; |
| 24 | + |
| 25 | + disabledTests = [ |
| 26 | + # Skip tests which require networking. |
| 27 | + "test_http_chunked_response" |
| 28 | + "test_v1_download_has_no_stray_output_to_stdout" |
| 29 | + "test_v2_requests_valid_cert_verification" |
| 30 | + "test_download_has_no_stray_output_to_stdout" |
| 31 | + "test_v1_requests_cert_verification_no_compression" |
| 32 | + "test_v1_requests_cert_verification" |
| 33 | + "test_v2_download_has_no_stray_output_to_stdout" |
| 34 | + "test_v2_requests_bad_ca" |
| 35 | + "test_v2_requests_bad_cert" |
| 36 | + "test_v2_requests_cert_verification_no_compression" |
| 37 | + "test_v2_requests_cert_verification" |
| 38 | + "test_v2_requests_valid_cert_no_key" |
| 39 | + "test_v2_requests_valid_cert_verification_no_compression" |
| 40 | + "test_log_request_id_once" |
| 41 | + # asserts exact amount of mock calls |
| 42 | + "test_cache_schemas_gets_when_forced" |
| 43 | + "test_cache_schemas_gets_when_not_exists" |
| 44 | + # binary dosn't exist in nixos: /bin/echo |
| 45 | + "test_image_update_data_is_read_from_pipe" |
| 46 | + ]; |
| 47 | +in |
| 48 | +python3Packages.buildPythonPackage rec { |
| 49 | + pname = "python-glanceclient"; |
| 50 | + version = "4.7.0"; |
| 51 | + |
| 52 | + src = fetchPypi { |
| 53 | + inherit pname version; |
| 54 | + sha256 = "sha256-wZRS7xLaPEhLadIqiIznp0kQvbh4O76RJIxg76U3iBA="; |
| 55 | + }; |
| 56 | + |
| 57 | + pyproject = true; |
| 58 | + build-system = [ |
| 59 | + python3Packages.pbr |
| 60 | + python3Packages.setuptools |
| 61 | + ]; |
| 62 | + |
| 63 | + propagatedBuildInputs = [ |
| 64 | + keystoneauth1 |
| 65 | + oslo-i18n |
| 66 | + oslo-utils |
| 67 | + pbr |
| 68 | + prettytable |
| 69 | + pyopenssl |
| 70 | + requests |
| 71 | + warlock |
| 72 | + wrapt |
| 73 | + ]; |
| 74 | + |
| 75 | + nativeCheckInputs = [ |
| 76 | + ddt |
| 77 | + openstacksdk |
| 78 | + requests-mock |
| 79 | + stestr |
| 80 | + testscenarios |
| 81 | + ]; |
| 82 | + |
| 83 | + checkInputs = [ |
| 84 | + ddt |
| 85 | + keystoneauth1 |
| 86 | + oslo-i18n |
| 87 | + oslo-utils |
| 88 | + pbr |
| 89 | + prettytable |
| 90 | + pyopenssl |
| 91 | + requests |
| 92 | + requests-mock |
| 93 | + testscenarios |
| 94 | + warlock |
| 95 | + wrapt |
| 96 | + ]; |
| 97 | + |
| 98 | + checkPhase = '' |
| 99 | + runHook preCheck |
| 100 | + stestr run -e ${writeText "disabled-tests" (lib.concatStringsSep "\n" disabledTests)} |
| 101 | + runHook postCheck |
| 102 | + ''; |
| 103 | + |
| 104 | +} |
0 commit comments