Skip to content

Instantly share code, notes, and snippets.

@Callek
Created September 17, 2018 16:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Callek/8c591622d13ea983df512b7dd08cfb73 to your computer and use it in GitHub Desktop.
Save Callek/8c591622d13ea983df512b7dd08cfb73 to your computer and use it in GitHub Desktop.
Finished processing dependencies for scriptworker==16.0.1
py36 runtests: commands[1] | py.test --cov-config .coveragerc --cov=scriptworker --cov-report term-missing scriptworker/test/test_cot_verify.py
==================================================== test session starts =====================================================
platform linux -- Python 3.6.6, pytest-3.8.0, py-1.6.0, pluggy-0.7.1 -- /data/.tox/py36/bin/python
cachedir: .pytest_cache
Using --random-order-bucket=module
Using --random-order-seed=260725
rootdir: /data, inifile: tox.ini
plugins: xdist-1.23.0, random-order-0.8.0, mock-1.10.0, forked-0.2, cov-2.6.0, asyncio-0.9.0
[gw0] linux Python 3.6.6 cwd: /data
[gw1] linux Python 3.6.6 cwd: /data
[gw2] linux Python 3.6.6 cwd: /data
[gw3] linux Python 3.6.6 cwd: /data
[gw0] Python 3.6.6 (default, Sep 5 2018, 03:40:52) -- [GCC 6.3.0 20170516]
[gw1] Python 3.6.6 (default, Sep 5 2018, 03:40:52) -- [GCC 6.3.0 20170516]
[gw2] Python 3.6.6 (default, Sep 5 2018, 03:40:52) -- [GCC 6.3.0 20170516]
[gw3] Python 3.6.6 (default, Sep 5 2018, 03:40:52) -- [GCC 6.3.0 20170516]
gw0 [149] / gw1 [149] / gw2 [149] / gw3 [149]
scheduling tests via LoadScheduling
scriptworker/test/test_cot_verify.py::test_verify_cot_signatures_bad_sig[firefox]
scriptworker/test/test_cot_verify.py::test_guess_worker_impl[firefox-task0-None-True]
scriptworker/test/test_cot_verify.py::test_no_match_in_actions_json[firefox]
scriptworker/test/test_cot_verify.py::test_verify_docker_image_task[firefox]
[gw3] [ 0%] PASSED scriptworker/test/test_cot_verify.py::test_verify_cot_signatures_bad_sig[firefox]
[gw0] [ 1%] PASSED scriptworker/test/test_cot_verify.py::test_guess_worker_impl[firefox-task0-None-True]
scriptworker/test/test_cot_verify.py::test_get_additional_cron_jsone_context[firefox-try: a b c-False]
scriptworker/test/test_cot_verify.py::test_verify_generic_worker_task
[gw2] [ 2%] PASSED scriptworker/test/test_cot_verify.py::test_verify_docker_image_task[firefox]
[gw1] [ 2%] PASSED scriptworker/test/test_cot_verify.py::test_no_match_in_actions_json[firefox]
[gw3] [ 3%] PASSED scriptworker/test/test_cot_verify.py::test_verify_generic_worker_task
scriptworker/test/test_cot_verify.py::test_verify_scriptworker_task_worker_impl[firefox-verify_balrog_task]
scriptworker/test/test_cot_verify.py::test_verify_link_in_task_graph_exception[firefox-False]
scriptworker/test/test_cot_verify.py::test_verify_docker_image_sha_wrong_task_type[firefox-True-False]
[gw3] [ 4%] PASSED scriptworker/test/test_cot_verify.py::test_verify_link_in_task_graph_exception[firefox-False]
[gw2] [ 4%] PASSED scriptworker/test/test_cot_verify.py::test_verify_scriptworker_task_worker_impl[firefox-verify_balrog_task]
[gw1] [ 5%] PASSED scriptworker/test/test_cot_verify.py::test_verify_docker_image_sha_wrong_task_type[firefox-True-False]
scriptworker/test/test_cot_verify.py::test_download_cot_artifact[firefox-one-bad_sha-True]
scriptworker/test/test_cot_verify.py::test_verify_docker_image_sha_wrong_task_type[firefox-False-True]
scriptworker/test/test_cot_verify.py::test_take_expires_out_from_artifacts_in_payload[payload0-expected0]
[gw1] [ 6%] PASSED scriptworker/test/test_cot_verify.py::test_take_expires_out_from_artifacts_in_payload[payload0-expected0]
scriptworker/test/test_cot_verify.py::test_verify_docker_image_task_worker_type[firefox]
[gw3] [ 6%] PASSED scriptworker/test/test_cot_verify.py::test_download_cot_artifact[firefox-one-bad_sha-True]
[gw2] [ 7%] PASSED scriptworker/test/test_cot_verify.py::test_verify_docker_image_sha_wrong_task_type[firefox-False-True]
scriptworker/test/test_cot_verify.py::test_get_link[firefox-ids2-three-True]
scriptworker/test/test_cot_verify.py::test_guess_worker_impl[firefox-task2-scriptworker-False]
[gw1] [ 8%] PASSED scriptworker/test/test_cot_verify.py::test_verify_docker_image_task_worker_type[firefox]
[gw3] [ 8%] PASSED scriptworker/test/test_cot_verify.py::test_get_link[firefox-ids2-three-True]
scriptworker/test/test_cot_verify.py::test_download_cot[firefox-upstream_artifacts4-False-None]
scriptworker/test/test_cot_verify.py::test_get_additional_cron_jsone_context[firefox-foo bar baz-False]
[gw2] [ 9%] PASSED scriptworker/test/test_cot_verify.py::test_guess_worker_impl[firefox-task2-scriptworker-False]
scriptworker/test/test_cot_verify.py::test_download_cot_artifact[firefox-one-sha-False]
[gw1] [ 10%] PASSED scriptworker/test/test_cot_verify.py::test_download_cot[firefox-upstream_artifacts4-False-None]
scriptworker/test/test_cot_verify.py::test_is_artifact_optional[firefox-upstream_artifacts2-id1-id1_path1-True]
[gw2] [ 10%] PASSED scriptworker/test/test_cot_verify.py::test_download_cot_artifact[firefox-one-sha-False]
scriptworker/test/test_cot_verify.py::test_verify_partials_task_noop[firefox]
[gw1] [ 11%] PASSED scriptworker/test/test_cot_verify.py::test_is_artifact_optional[firefox-upstream_artifacts2-id1-id1_path1-True]
scriptworker/test/test_cot_verify.py::test_verify_cot_signatures_no_file[firefox-upstream_artifacts3-False]
[gw2] [ 12%] PASSED scriptworker/test/test_cot_verify.py::test_verify_partials_task_noop[firefox]
scriptworker/test/test_cot_verify.py::test_verify_partials_task[firefox]
[gw1] [ 12%] PASSED scriptworker/test/test_cot_verify.py::test_verify_cot_signatures_no_file[firefox-upstream_artifacts3-False]
scriptworker/test/test_cot_verify.py::test_check_and_update_action_task_group_id[other-decision-action-decision-True]
[gw2] [ 13%] PASSED scriptworker/test/test_cot_verify.py::test_verify_partials_task[firefox]
[gw1] [ 14%] PASSED scriptworker/test/test_cot_verify.py::test_check_and_update_action_task_group_id[other-decision-action-decision-True]
scriptworker/test/test_cot_verify.py::test_link_cot[firefox]
scriptworker/test/test_cot_verify.py::test_unknown_action_kind[firefox]
[gw2] [ 14%] PASSED scriptworker/test/test_cot_verify.py::test_link_cot[firefox]
scriptworker/test/test_cot_verify.py::test_get_additional_cron_jsone_context[firefox-asdfsadfsad-True]
[gw1] [ 15%] PASSED scriptworker/test/test_cot_verify.py::test_unknown_action_kind[firefox]
scriptworker/test/test_cot_verify.py::test_get_additional_hgpush_jsone_context[firefox-blah blah blah blah\nlbah blha try: [a] b c\nblah blah-try: [a] b c-False]
[gw1] [ 16%] PASSED scriptworker/test/test_cot_verify.py::test_get_additional_hgpush_jsone_context[firefox-blah blah blah blah\nlbah blha try: [a] b c\nblah blah-try: [a] b c-False]
scriptworker/test/test_cot_verify.py::test_find_sorted_task_dependencies[task4-expected4-build]
[gw1] [ 16%] PASSED scriptworker/test/test_cot_verify.py::test_find_sorted_task_dependencies[task4-expected4-build]
scriptworker/test/test_cot_verify.py::test_verify_scriptworker_task_worker_impl[firefox-verify_pushapk_task]
[gw1] [ 17%] PASSED scriptworker/test/test_cot_verify.py::test_verify_scriptworker_task_worker_impl[firefox-verify_pushapk_task]
scriptworker/test/test_cot_verify.py::test_get_additional_hgpush_jsone_context[firefox-try: a b c-try: a b c-False]
[gw1] [ 18%] PASSED scriptworker/test/test_cot_verify.py::test_get_additional_hgpush_jsone_context[firefox-try: a b c-try: a b c-False]
scriptworker/test/test_cot_verify.py::test_find_sorted_task_dependencies[task3-expected3-build]
[gw1] [ 18%] PASSED scriptworker/test/test_cot_verify.py::test_find_sorted_task_dependencies[task3-expected3-build]
scriptworker/test/test_cot_verify.py::test_verify_parent_task_missing_graph[firefox]
[gw1] [ 19%] PASSED scriptworker/test/test_cot_verify.py::test_verify_parent_task_missing_graph[firefox]
scriptworker/test/test_cot_verify.py::test_verify_chain_of_trust[firefox-KeyError]
[gw1] [ 20%] PASSED scriptworker/test/test_cot_verify.py::test_verify_chain_of_trust[firefox-KeyError]
scriptworker/test/test_cot_verify.py::test_guess_worker_impl[firefox-task3-generic-worker-False]
[gw1] [ 20%] PASSED scriptworker/test/test_cot_verify.py::test_guess_worker_impl[firefox-task3-generic-worker-False]
scriptworker/test/test_cot_verify.py::test_download_cot_artifacts[firefox-upstreamArtifacts1-False]
[gw1] [ 21%] PASSED scriptworker/test/test_cot_verify.py::test_download_cot_artifacts[firefox-upstreamArtifacts1-False]
scriptworker/test/test_cot_verify.py::test_guess_worker_impl[firefox-task6-generic-worker-False]
[gw1] [ 22%] PASSED scriptworker/test/test_cot_verify.py::test_guess_worker_impl[firefox-task6-generic-worker-False]
scriptworker/test/test_cot_verify.py::test_verify_cot_signatures[firefox]
[gw1] [ 22%] PASSED scriptworker/test/test_cot_verify.py::test_verify_cot_signatures[firefox]
scriptworker/test/test_cot_verify.py::test_chain_is_try[firefox-bools1-True]
[gw1] [ 23%] PASSED scriptworker/test/test_cot_verify.py::test_chain_is_try[firefox-bools1-True]
scriptworker/test/test_cot_verify.py::test_verify_parent_task_definition[firefox-decision-VQU9QMO4Teq7zr91FhBusg-/data/scriptworker/test/data/cotv2/decision_hg-push.json-VQU9QMO4Teq7zr91FhBusg-/data/scriptworker/test/data/cotv2/decision_hg-push.json]
[gw0] [ 24%] FAILED scriptworker/test/test_cot_verify.py::test_get_additional_cron_jsone_context[firefox-try: a b c-False]
scriptworker/test/test_cot_verify.py::test_verify_scriptworker_task[firefox-verify_shipit_task]
[gw0] [ 24%] PASSED scriptworker/test/test_cot_verify.py::test_verify_scriptworker_task[firefox-verify_shipit_task]
scriptworker/test/test_cot_verify.py::test_download_cot_artifact[firefox-bad-bad_sha-True]
[gw0] [ 25%] PASSED scriptworker/test/test_cot_verify.py::test_download_cot_artifact[firefox-bad-bad_sha-True]
scriptworker/test/test_cot_verify.py::test_verify_parent_task_definition[firefox-action-MP8uhRdMTjm__Q_sA0GTnA-/data/scriptworker/test/data/cotv2/action_relpro.json-VQU9QMO4Teq7zr91FhBusg-/data/scriptworker/test/data/cotv2/decision_hg-push.json]
[gw3] [ 26%] FAILED scriptworker/test/test_cot_verify.py::test_get_additional_cron_jsone_context[firefox-foo bar baz-False]
scriptworker/test/test_cot_verify.py::test_download_cot[firefox-upstream_artifacts1-False-die_async]
[gw3] [ 26%] PASSED scriptworker/test/test_cot_verify.py::test_download_cot[firefox-upstream_artifacts1-False-die_async]
scriptworker/test/test_cot_verify.py::test_verify_link_in_task_graph_exception[firefox-True]
[gw3] [ 27%] PASSED scriptworker/test/test_cot_verify.py::test_verify_link_in_task_graph_exception[firefox-True]
scriptworker/test/test_cot_verify.py::test_verify_scriptworker_task[firefox-verify_partials_task]
[gw3] [ 28%] PASSED scriptworker/test/test_cot_verify.py::test_verify_scriptworker_task[firefox-verify_partials_task]
scriptworker/test/test_cot_verify.py::test_get_pushlog_info[firefox-pushes1]
[gw3] [ 28%] PASSED scriptworker/test/test_cot_verify.py::test_get_pushlog_info[firefox-pushes1]
scriptworker/test/test_cot_verify.py::test_verify_parent_task_definition_failed_tasks_for[firefox]
[gw3] [ 29%] PASSED scriptworker/test/test_cot_verify.py::test_verify_parent_task_definition_failed_tasks_for[firefox]
scriptworker/test/test_cot_verify.py::test_take_expires_out_from_artifacts_in_payload[payload1-expected1]
[gw3] [ 30%] PASSED scriptworker/test/test_cot_verify.py::test_take_expires_out_from_artifacts_in_payload[payload1-expected1]
scriptworker/test/test_cot_verify.py::test_check_interactive_docker_worker[task2-True]
[gw3] [ 30%] PASSED scriptworker/test/test_cot_verify.py::test_check_interactive_docker_worker[task2-True]
scriptworker/test/test_cot_verify.py::test_get_source_url[task2-https://example.com/blah-GECKO-False]
[gw3] [ 31%] PASSED scriptworker/test/test_cot_verify.py::test_get_source_url[task2-https://example.com/blah-GECKO-False]
scriptworker/test/test_cot_verify.py::test_trace_back_to_tree_diff_repo[firefox]
[gw3] [ 32%] PASSED scriptworker/test/test_cot_verify.py::test_trace_back_to_tree_diff_repo[firefox]
scriptworker/test/test_cot_verify.py::test_verify_cot_cmdln[firefox-args1]
[gw2] [ 32%] FAILED scriptworker/test/test_cot_verify.py::test_get_additional_cron_jsone_context[firefox-asdfsadfsad-True]
scriptworker/test/test_cot_verify.py::test_verify_scriptworker_task[firefox-verify_signing_task]
[gw3] [ 33%] PASSED scriptworker/test/test_cot_verify.py::test_verify_cot_cmdln[firefox-args1]
[gw2] [ 34%] PASSED scriptworker/test/test_cot_verify.py::test_verify_scriptworker_task[firefox-verify_signing_task]
scriptworker/test/test_cot_verify.py::test_verify_scriptworker_task[firefox-verify_pushsnap_task]
scriptworker/test/test_cot_verify.py::test_audit_log_formatter[20-foo]
[gw2] [ 34%] PASSED scriptworker/test/test_cot_verify.py::test_audit_log_formatter[20-foo]
scriptworker/test/test_cot_verify.py::test_find_sorted_task_dependencies[task5-expected5-pushapk]
[gw3] [ 35%] PASSED scriptworker/test/test_cot_verify.py::test_verify_scriptworker_task[firefox-verify_pushsnap_task]
[gw2] [ 36%] PASSED scriptworker/test/test_cot_verify.py::test_find_sorted_task_dependencies[task5-expected5-pushapk]
scriptworker/test/test_cot_verify.py::test_build_task_dependencies[firefox]
scriptworker/test/test_cot_verify.py::test_get_source_url[task3-https://example.com/blah/comm-COMM-False]
[gw3] [ 36%] PASSED scriptworker/test/test_cot_verify.py::test_get_source_url[task3-https://example.com/blah/comm-COMM-False]
scriptworker/test/test_cot_verify.py::test_get_action_context_and_template[firefox-action-NdzxKw8bS5Sw5DRhoiM14w-/data/scriptworker/test/data/cotv3/action_retrigger.json-c5nn2xbNS9mJxeVC0uNElg-/data/scriptworker/test/data/cotv3/decision_try.json]
[gw2] [ 37%] PASSED scriptworker/test/test_cot_verify.py::test_build_task_dependencies[firefox]
scriptworker/test/test_cot_verify.py::test_verify_parent_task_definition_failed_jsone[firefox]
[gw0] [ 38%] PASSED scriptworker/test/test_cot_verify.py::test_verify_parent_task_definition[firefox-action-MP8uhRdMTjm__Q_sA0GTnA-/data/scriptworker/test/data/cotv2/action_relpro.json-VQU9QMO4Teq7zr91FhBusg-/data/scriptworker/test/data/cotv2/decision_hg-push.json]
scriptworker/test/test_cot_verify.py::test_check_interactive_docker_worker[task1-True]
[gw0] [ 38%] PASSED scriptworker/test/test_cot_verify.py::test_check_interactive_docker_worker[task1-True]
scriptworker/test/test_cot_verify.py::test_verify_build_task_noop[firefox]
[gw0] [ 39%] PASSED scriptworker/test/test_cot_verify.py::test_verify_build_task_noop[firefox]
scriptworker/test/test_cot_verify.py::test_verify_parent_task_definition_failed_diff[firefox]
[gw1] [ 40%] PASSED scriptworker/test/test_cot_verify.py::test_verify_parent_task_definition[firefox-decision-VQU9QMO4Teq7zr91FhBusg-/data/scriptworker/test/data/cotv2/decision_hg-push.json-VQU9QMO4Teq7zr91FhBusg-/data/scriptworker/test/data/cotv2/decision_hg-push.json]
scriptworker/test/test_cot_verify.py::test_verify_scriptworker_task_worker_impl[firefox-verify_signing_task]
[gw1] [ 40%] PASSED scriptworker/test/test_cot_verify.py::test_verify_scriptworker_task_worker_impl[firefox-verify_signing_task]
scriptworker/test/test_cot_verify.py::test_download_cot[firefox-upstream_artifacts0-True-die_async]
[gw1] [ 41%] PASSED scriptworker/test/test_cot_verify.py::test_download_cot[firefox-upstream_artifacts0-True-die_async]
scriptworker/test/test_cot_verify.py::test_audit_log_formatter[10- foo]
[gw1] [ 42%] PASSED scriptworker/test/test_cot_verify.py::test_audit_log_formatter[10- foo]
scriptworker/test/test_cot_verify.py::test_verify_docker_image_sha_missing[firefox]
[gw1] [ 42%] PASSED scriptworker/test/test_cot_verify.py::test_verify_docker_image_sha_missing[firefox]
scriptworker/test/test_cot_verify.py::test_chain_is_try[firefox-bools0-False]
[gw1] [ 43%] PASSED scriptworker/test/test_cot_verify.py::test_chain_is_try[firefox-bools0-False]
scriptworker/test/test_cot_verify.py::test_verify_parent_task[firefox-die_async-True]
[gw1] [ 44%] PASSED scriptworker/test/test_cot_verify.py::test_verify_parent_task[firefox-die_async-True]
scriptworker/test/test_cot_verify.py::test_get_additional_hgpush_jsone_context[firefox-asdfsadfsad--True]
[gw1] [ 44%] PASSED scriptworker/test/test_cot_verify.py::test_get_additional_hgpush_jsone_context[firefox-asdfsadfsad--True]
scriptworker/test/test_cot_verify.py::test_trace_back_to_tree[firefox]
[gw1] [ 45%] PASSED scriptworker/test/test_cot_verify.py::test_trace_back_to_tree[firefox]
scriptworker/test/test_cot_verify.py::test_check_and_update_action_task_group_id[action-decision-action-decision-False]
[gw1] [ 46%] PASSED scriptworker/test/test_cot_verify.py::test_check_and_update_action_task_group_id[action-decision-action-decision-False]
scriptworker/test/test_cot_verify.py::test_verify_docker_image_sha_wrong_task_id[firefox]
[gw1] [ 46%] PASSED scriptworker/test/test_cot_verify.py::test_verify_docker_image_sha_wrong_task_id[firefox]
scriptworker/test/test_cot_verify.py::test_verify_parent_task_definition[firefox-decision-D4euZNyCRtuBci-fnsfn7A-/data/scriptworker/test/data/cotv2/cron.json-D4euZNyCRtuBci-fnsfn7A-/data/scriptworker/test/data/cotv2/cron.json]
[gw2] [ 47%] PASSED scriptworker/test/test_cot_verify.py::test_verify_parent_task_definition_failed_jsone[firefox]
scriptworker/test/test_cot_verify.py::test_verify_cot_signatures_no_file[firefox-upstream_artifacts0-True]
[gw2] [ 48%] PASSED scriptworker/test/test_cot_verify.py::test_verify_cot_signatures_no_file[firefox-upstream_artifacts0-True]
scriptworker/test/test_cot_verify.py::test_raise_on_errors[errors0-False]
[gw2] [ 48%] PASSED scriptworker/test/test_cot_verify.py::test_raise_on_errors[errors0-False]
scriptworker/test/test_cot_verify.py::test_check_interactive_docker_worker[task0-False]
[gw2] [ 49%] PASSED scriptworker/test/test_cot_verify.py::test_check_interactive_docker_worker[task0-False]
scriptworker/test/test_cot_verify.py::test_verify_scriptworker_task_worker_impl[firefox-verify_beetmover_task]
[gw2] [ 50%] PASSED scriptworker/test/test_cot_verify.py::test_verify_scriptworker_task_worker_impl[firefox-verify_beetmover_task]
scriptworker/test/test_cot_verify.py::test_raise_on_errors[errors1-True]
[gw2] [ 51%] PASSED scriptworker/test/test_cot_verify.py::test_raise_on_errors[errors1-True]
scriptworker/test/test_cot_verify.py::test_get_all_artifacts_per_task_id[firefox-upstream_artifacts1-expected1]
[gw2] [ 51%] PASSED scriptworker/test/test_cot_verify.py::test_get_all_artifacts_per_task_id[firefox-upstream_artifacts1-expected1]
scriptworker/test/test_cot_verify.py::test_verify_link_in_task_graph[firefox]
[gw0] [ 52%] PASSED scriptworker/test/test_cot_verify.py::test_verify_parent_task_definition_failed_diff[firefox]
scriptworker/test/test_cot_verify.py::test_verify_scriptworker_task[firefox-verify_beetmover_task]
[gw2] [ 53%] PASSED scriptworker/test/test_cot_verify.py::test_verify_link_in_task_graph[firefox]
scriptworker/test/test_cot_verify.py::test_get_pushlog_info[firefox-pushes0]
[gw0] [ 53%] PASSED scriptworker/test/test_cot_verify.py::test_verify_scriptworker_task[firefox-verify_beetmover_task]
scriptworker/test/test_cot_verify.py::test_get_source_url[task0-https://example.com/blah/blah-GECKO-False]
[gw2] [ 54%] PASSED scriptworker/test/test_cot_verify.py::test_get_pushlog_info[firefox-pushes0]
[gw0] [ 55%] PASSED scriptworker/test/test_cot_verify.py::test_get_source_url[task0-https://example.com/blah/blah-GECKO-False]
scriptworker/test/test_cot_verify.py::test_verify_docker_worker_task
scriptworker/test/test_cot_verify.py::test_verify_parent_task_worker_type[firefox]
[gw2] [ 55%] PASSED scriptworker/test/test_cot_verify.py::test_verify_docker_worker_task
scriptworker/test/test_cot_verify.py::test_guess_worker_impl[firefox-task4-None-True]
[gw0] [ 56%] PASSED scriptworker/test/test_cot_verify.py::test_verify_parent_task_worker_type[firefox]
scriptworker/test/test_cot_verify.py::test_verify_worker_impls[firefox]
[gw2] [ 57%] PASSED scriptworker/test/test_cot_verify.py::test_guess_worker_impl[firefox-task4-None-True]
scriptworker/test/test_cot_verify.py::test_verify_cot_cmdln[firefox-args0]
[gw0] [ 57%] PASSED scriptworker/test/test_cot_verify.py::test_verify_worker_impls[firefox]
scriptworker/test/test_cot_verify.py::test_trace_back_to_tree_bad_repo[firefox]
[gw3] [ 58%] PASSED scriptworker/test/test_cot_verify.py::test_get_action_context_and_template[firefox-action-NdzxKw8bS5Sw5DRhoiM14w-/data/scriptworker/test/data/cotv3/action_retrigger.json-c5nn2xbNS9mJxeVC0uNElg-/data/scriptworker/test/data/cotv3/decision_try.json]
[gw0] [ 59%] PASSED scriptworker/test/test_cot_verify.py::test_trace_back_to_tree_bad_repo[firefox]
scriptworker/test/test_cot_verify.py::test_verify_task_types[firefox]
scriptworker/test/test_cot_verify.py::test_verify_parent_task_definition_bad_project[firefox]
[gw2] [ 59%] PASSED scriptworker/test/test_cot_verify.py::test_verify_cot_cmdln[firefox-args0]
[gw3] [ 60%] PASSED scriptworker/test/test_cot_verify.py::test_verify_task_types[firefox]
[gw0] [ 61%] PASSED scriptworker/test/test_cot_verify.py::test_verify_parent_task_definition_bad_project[firefox]
scriptworker/test/test_cot_verify.py::test_verify_chain_of_trust[firefox-None]
scriptworker/test/test_cot_verify.py::test_dependent_task_ids[firefox]
scriptworker/test/test_cot_verify.py::test_is_task_required_by_any_mandatory_artifact[firefox-upstream_artifacts1-id1-False]
[gw2] [ 61%] PASSED scriptworker/test/test_cot_verify.py::test_verify_chain_of_trust[firefox-None]
[gw3] [ 62%] PASSED scriptworker/test/test_cot_verify.py::test_dependent_task_ids[firefox]
scriptworker/test/test_cot_verify.py::test_get_link[firefox-ids0-one-False]
scriptworker/test/test_cot_verify.py::test_download_cot_artifact[firefox-missing-bad_sha-True]
[gw0] [ 63%] PASSED scriptworker/test/test_cot_verify.py::test_is_task_required_by_any_mandatory_artifact[firefox-upstream_artifacts1-id1-False]
scriptworker/test/test_cot_verify.py::test_guess_task_type
[gw3] [ 63%] PASSED scriptworker/test/test_cot_verify.py::test_get_link[firefox-ids0-one-False]
[gw0] [ 64%] PASSED scriptworker/test/test_cot_verify.py::test_guess_task_type
[gw2] [ 65%] PASSED scriptworker/test/test_cot_verify.py::test_download_cot_artifact[firefox-missing-bad_sha-True]
scriptworker/test/test_cot_verify.py::test_get_all_artifacts_per_task_id[firefox-None-expected0]
scriptworker/test/test_cot_verify.py::test_guess_worker_impl[firefox-task7-None-True]
scriptworker/test/test_cot_verify.py::test_get_additional_cron_jsone_context[firefox-blah blah blah blah try: a b c-False]
[gw0] [ 65%] PASSED scriptworker/test/test_cot_verify.py::test_get_all_artifacts_per_task_id[firefox-None-expected0]
[gw2] [ 66%] PASSED scriptworker/test/test_cot_verify.py::test_guess_worker_impl[firefox-task7-None-True]
scriptworker/test/test_cot_verify.py::test_find_sorted_task_dependencies[task0-expected0-decision]
scriptworker/test/test_cot_verify.py::test_guess_worker_impl[firefox-task5-None-True]
[gw2] [ 67%] PASSED scriptworker/test/test_cot_verify.py::test_find_sorted_task_dependencies[task0-expected0-decision]
scriptworker/test/test_cot_verify.py::test_get_additional_hgpush_jsone_context[firefox-blah blah blah blah try: a b c-try: a b c-False]
[gw0] [ 67%] PASSED scriptworker/test/test_cot_verify.py::test_guess_worker_impl[firefox-task5-None-True]
scriptworker/test/test_cot_verify.py::test_check_num_tasks[firefox-1-False]
[gw2] [ 68%] PASSED scriptworker/test/test_cot_verify.py::test_get_additional_hgpush_jsone_context[firefox-blah blah blah blah try: a b c-try: a b c-False]
[gw0] [ 69%] PASSED scriptworker/test/test_cot_verify.py::test_check_num_tasks[firefox-1-False]
scriptworker/test/test_cot_verify.py::test_get_link[firefox-ids1-one-True]
scriptworker/test/test_cot_verify.py::test_verify_cot_signatures_no_file[firefox-upstream_artifacts1-False]
[gw2] [ 69%] PASSED scriptworker/test/test_cot_verify.py::test_get_link[firefox-ids1-one-True]
[gw0] [ 70%] PASSED scriptworker/test/test_cot_verify.py::test_verify_cot_signatures_no_file[firefox-upstream_artifacts1-False]
scriptworker/test/test_cot_verify.py::test_verify_cot_signatures_no_file[firefox-upstream_artifacts2-True]
scriptworker/test/test_cot_verify.py::test_wrong_take_expires_out_from_artifacts_in_payload
[gw0] [ 71%] PASSED scriptworker/test/test_cot_verify.py::test_wrong_take_expires_out_from_artifacts_in_payload
scriptworker/test/test_cot_verify.py::test_download_cot_artifact_no_downloaded_cot[firefox]
[gw2] [ 71%] PASSED scriptworker/test/test_cot_verify.py::test_verify_cot_signatures_no_file[firefox-upstream_artifacts2-True]
scriptworker/test/test_cot_verify.py::test_is_artifact_optional[firefox-upstream_artifacts3-id1-id1_path2-False]
[gw0] [ 72%] PASSED scriptworker/test/test_cot_verify.py::test_download_cot_artifact_no_downloaded_cot[firefox]
scriptworker/test/test_cot_verify.py::test_check_and_update_action_task_group_id[decision-decision-action-decision-False]
[gw2] [ 73%] PASSED scriptworker/test/test_cot_verify.py::test_is_artifact_optional[firefox-upstream_artifacts3-id1-id1_path2-False]
[gw0] [ 73%] PASSED scriptworker/test/test_cot_verify.py::test_check_and_update_action_task_group_id[decision-decision-action-decision-False]
scriptworker/test/test_cot_verify.py::test_verify_parent_task[firefox-noop_async-False]
scriptworker/test/test_cot_verify.py::test_verify_docker_image_sha_wrong_built_sha[firefox]
[gw0] [ 74%] PASSED scriptworker/test/test_cot_verify.py::test_verify_docker_image_sha_wrong_built_sha[firefox]
scriptworker/test/test_cot_verify.py::test_skip_verify_parent_task_definition[firefox]
[gw2] [ 75%] PASSED scriptworker/test/test_cot_verify.py::test_verify_parent_task[firefox-noop_async-False]
[gw0] [ 75%] PASSED scriptworker/test/test_cot_verify.py::test_skip_verify_parent_task_definition[firefox]
scriptworker/test/test_cot_verify.py::test_find_sorted_task_dependencies[task1-expected1-build]
scriptworker/test/test_cot_verify.py::test_verify_docker_image_sha[firefox]
[gw2] [ 76%] PASSED scriptworker/test/test_cot_verify.py::test_find_sorted_task_dependencies[task1-expected1-build]
scriptworker/test/test_cot_verify.py::test_check_and_update_action_task_group_id[other-other-action-decision-True]
[gw2] [ 77%] PASSED scriptworker/test/test_cot_verify.py::test_check_and_update_action_task_group_id[other-other-action-decision-True]
[gw0] [ 77%] PASSED scriptworker/test/test_cot_verify.py::test_verify_docker_image_sha[firefox]
scriptworker/test/test_cot_verify.py::test_get_valid_worker_impls
scriptworker/test/test_cot_verify.py::test_is_artifact_optional[firefox-upstream_artifacts1-id1-id1_path1-True]
[gw0] [ 78%] PASSED scriptworker/test/test_cot_verify.py::test_get_valid_worker_impls
[gw2] [ 79%] PASSED scriptworker/test/test_cot_verify.py::test_is_artifact_optional[firefox-upstream_artifacts1-id1-id1_path1-True]
scriptworker/test/test_cot_verify.py::test_get_additional_hgpush_jsone_context[firefox-foo bar baz- -False]
scriptworker/test/test_cot_verify.py::test_is_artifact_optional[firefox-upstream_artifacts0-id1-id1_path1-False]
[gw0] [ 79%] PASSED scriptworker/test/test_cot_verify.py::test_get_additional_hgpush_jsone_context[firefox-foo bar baz- -False]
scriptworker/test/test_cot_verify.py::test_guess_worker_impl[firefox-task1-docker-worker-False]
[gw2] [ 80%] PASSED scriptworker/test/test_cot_verify.py::test_is_artifact_optional[firefox-upstream_artifacts0-id1-id1_path1-False]
scriptworker/test/test_cot_verify.py::test_get_all_links_in_chain[firefox]
[gw0] [ 81%] PASSED scriptworker/test/test_cot_verify.py::test_guess_worker_impl[firefox-task1-docker-worker-False]
scriptworker/test/test_cot_verify.py::test_verify_scriptworker_task[firefox-verify_balrog_task]
[gw2] [ 81%] PASSED scriptworker/test/test_cot_verify.py::test_get_all_links_in_chain[firefox]
[gw0] [ 82%] PASSED scriptworker/test/test_cot_verify.py::test_verify_scriptworker_task[firefox-verify_balrog_task]
scriptworker/test/test_cot_verify.py::test_trace_back_to_tree_unknown_repo[firefox]
scriptworker/test/test_cot_verify.py::test_download_cot_artifacts[firefox-upstreamArtifacts0-True]
[gw0] [ 83%] PASSED scriptworker/test/test_cot_verify.py::test_download_cot_artifacts[firefox-upstreamArtifacts0-True]
scriptworker/test/test_cot_verify.py::test_verify_parent_task_definition_bad_comment[firefox]
[gw2] [ 83%] PASSED scriptworker/test/test_cot_verify.py::test_trace_back_to_tree_unknown_repo[firefox]
scriptworker/test/test_cot_verify.py::test_take_expires_out_from_artifacts_in_payload[payload2-expected2]
[gw2] [ 84%] PASSED scriptworker/test/test_cot_verify.py::test_take_expires_out_from_artifacts_in_payload[payload2-expected2]
scriptworker/test/test_cot_verify.py::test_check_interactive_docker_worker[task3-True]
[gw2] [ 85%] PASSED scriptworker/test/test_cot_verify.py::test_check_interactive_docker_worker[task3-True]
[gw3] [ 85%] FAILED scriptworker/test/test_cot_verify.py::test_get_additional_cron_jsone_context[firefox-blah blah blah blah try: a b c-False]
scriptworker/test/test_cot_verify.py::test_download_cot[firefox-upstream_artifacts3-False-None]
scriptworker/test/test_cot_verify.py::test_check_num_tasks[firefox-2-False]
[gw3] [ 86%] PASSED scriptworker/test/test_cot_verify.py::test_download_cot[firefox-upstream_artifacts3-False-None]
[gw2] [ 87%] PASSED scriptworker/test/test_cot_verify.py::test_check_num_tasks[firefox-2-False]
scriptworker/test/test_cot_verify.py::test_link_task[firefox]
scriptworker/test/test_cot_verify.py::test_verify_scriptworker_task[firefox-verify_bouncer_task]
[gw3] [ 87%] PASSED scriptworker/test/test_cot_verify.py::test_link_task[firefox]
[gw2] [ 88%] PASSED scriptworker/test/test_cot_verify.py::test_verify_scriptworker_task[firefox-verify_bouncer_task]
scriptworker/test/test_cot_verify.py::test_get_additional_cron_jsone_context[firefox-blah blah blah blah\nlbah blha try: [a] b c\nblah blah-False]
scriptworker/test/test_cot_verify.py::test_download_cot_artifacts[firefox-upstreamArtifacts2-False]
[gw2] [ 89%] PASSED scriptworker/test/test_cot_verify.py::test_download_cot_artifacts[firefox-upstreamArtifacts2-False]
scriptworker/test/test_cot_verify.py::test_check_num_tasks[firefox-0-True]
[gw2] [ 89%] PASSED scriptworker/test/test_cot_verify.py::test_check_num_tasks[firefox-0-True]
scriptworker/test/test_cot_verify.py::test_verify_build_task[firefox]
[gw2] [ 90%] PASSED scriptworker/test/test_cot_verify.py::test_verify_build_task[firefox]
scriptworker/test/test_cot_verify.py::test_verify_chain_of_trust[firefox-CoTError]
[gw2] [ 91%] PASSED scriptworker/test/test_cot_verify.py::test_verify_chain_of_trust[firefox-CoTError]
scriptworker/test/test_cot_verify.py::test_is_task_required_by_any_mandatory_artifact[firefox-upstream_artifacts2-id1-True]
[gw2] [ 91%] PASSED scriptworker/test/test_cot_verify.py::test_is_task_required_by_any_mandatory_artifact[firefox-upstream_artifacts2-id1-True]
scriptworker/test/test_cot_verify.py::test_find_sorted_task_dependencies[task2-expected2-build]
[gw2] [ 92%] PASSED scriptworker/test/test_cot_verify.py::test_find_sorted_task_dependencies[task2-expected2-build]
scriptworker/test/test_cot_verify.py::test_get_source_url[task1-None-GECKO-True]
[gw2] [ 93%] PASSED scriptworker/test/test_cot_verify.py::test_get_source_url[task1-None-GECKO-True]
scriptworker/test/test_cot_verify.py::test_is_task_required_by_any_mandatory_artifact[firefox-upstream_artifacts0-id1-True]
[gw2] [ 93%] PASSED scriptworker/test/test_cot_verify.py::test_is_task_required_by_any_mandatory_artifact[firefox-upstream_artifacts0-id1-True]
scriptworker/test/test_cot_verify.py::test_download_cot[firefox-upstream_artifacts2-True-die_async]
[gw2] [ 94%] PASSED scriptworker/test/test_cot_verify.py::test_download_cot[firefox-upstream_artifacts2-True-die_async]
[gw1] [ 95%] FAILED scriptworker/test/test_cot_verify.py::test_verify_parent_task_definition[firefox-decision-D4euZNyCRtuBci-fnsfn7A-/data/scriptworker/test/data/cotv2/cron.json-D4euZNyCRtuBci-fnsfn7A-/data/scriptworker/test/data/cotv2/cron.json]
scriptworker/test/test_cot_verify.py::test_verify_scriptworker_task[firefox-verify_scriptworker_task]
[gw1] [ 95%] PASSED scriptworker/test/test_cot_verify.py::test_verify_scriptworker_task[firefox-verify_scriptworker_task]
[gw0] [ 96%] PASSED scriptworker/test/test_cot_verify.py::test_verify_parent_task_definition_bad_comment[firefox]
[gw3] [ 97%] FAILED scriptworker/test/test_cot_verify.py::test_get_additional_cron_jsone_context[firefox-blah blah blah blah\nlbah blha try: [a] b c\nblah blah-False]
scriptworker/test/test_cot_verify.py::test_verify_scriptworker_task_worker_impl[firefox-verify_scriptworker_task]
scriptworker/test/test_cot_verify.py::test_trace_back_to_tree_docker_unknown_repo[firefox]
scriptworker/test/test_cot_verify.py::test_check_num_tasks[firefox-3-False]
scriptworker/test/test_cot_verify.py::test_verify_scriptworker_task[firefox-verify_pushapk_task]
[gw1] [ 97%] PASSED scriptworker/test/test_cot_verify.py::test_check_num_tasks[firefox-3-False]
[gw2] [ 98%] PASSED scriptworker/test/test_cot_verify.py::test_verify_scriptworker_task[firefox-verify_pushapk_task]
[gw0] [ 99%] PASSED scriptworker/test/test_cot_verify.py::test_trace_back_to_tree_docker_unknown_repo[firefox]
[gw3] [100%] PASSED scriptworker/test/test_cot_verify.py::test_verify_scriptworker_task_worker_impl[firefox-verify_scriptworker_task] Coverage.py warning: No data was collected. (no-data-collected)
========================================================== FAILURES ==========================================================
______________________________ test_get_additional_cron_jsone_context[firefox-try: a b c-False] ______________________________
[gw0] linux -- Python 3.6.6 /data/.tox/py36/bin/python
cron_link = <scriptworker.cot.verify.LinkOfTrust object at 0x7f3c729dd358>
mocker = <pytest_mock.MockFixture object at 0x7f3c72a0b908>, push_comment = 'try: a b c', raises = False
@pytest.mark.asyncio
@pytest.mark.parametrize("push_comment,raises", ((
'foo bar baz', False
), (
'try: a b c', False
), (
'blah blah blah blah try: a b c', False
), (
'blah blah blah blah\nlbah blha try: [a] b c\nblah blah', False
), (
'asdfsadfsad', True
)))
async def test_get_additional_cron_jsone_context(cron_link, mocker, push_comment,
raises):
chain = cron_link
async def fake_pushlog(*args):
return {
'pushes': {
'123': {
'user': 'myuser',
'date': 'mydate',
'changesets': [{
'desc': push_comment
}]
}
}
}
def fake_commit_msg(*args):
return push_comment
mocker.patch.object(cotverify, 'get_revision', return_value="myrev")
mocker.patch.object(cotverify, 'get_pushlog_info', new=fake_pushlog)
mocker.patch.object(cotverify, 'get_commit_message', new=fake_commit_msg)
if raises:
with pytest.raises(CoTError):
await cotverify._get_additional_cron_jsone_context(
chain, chain
)
else:
expected = {
"push": {
"revision": "myrev",
"comment": '',
"owner": "cron",
"pushlog_id": "123",
"pushdate": "mydate",
}
}
> assert expected == await cotverify._get_additional_cron_jsone_context(
chain, chain
)
scriptworker/test/test_cot_verify.py:1514:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
scriptworker/cot/verify.py:1036: in _get_additional_cron_jsone_context
jsone_context['cron'] = load_json_or_yaml(parent_link.task['extra']['cron'])
scriptworker/utils.py:460: in load_json_or_yaml
contents = _load_str(string)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
s = {}, encoding = None, cls = None, object_hook = None, parse_float = None, parse_int = None, parse_constant = None
object_pairs_hook = None, kw = {}
def loads(s, *, encoding=None, cls=None, object_hook=None, parse_float=None,
parse_int=None, parse_constant=None, object_pairs_hook=None, **kw):
"""Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
``object_hook`` is an optional function that will be called with the
result of any object literal decode (a ``dict``). The return value of
``object_hook`` will be used instead of the ``dict``. This feature
can be used to implement custom decoders (e.g. JSON-RPC class hinting).
``object_pairs_hook`` is an optional function that will be called with the
result of any object literal decoded with an ordered list of pairs. The
return value of ``object_pairs_hook`` will be used instead of the ``dict``.
This feature can be used to implement custom decoders that rely on the
order that the key and value pairs are decoded (for example,
collections.OrderedDict will remember the order of insertion). If
``object_hook`` is also defined, the ``object_pairs_hook`` takes priority.
``parse_float``, if specified, will be called with the string
of every JSON float to be decoded. By default this is equivalent to
float(num_str). This can be used to use another datatype or parser
for JSON floats (e.g. decimal.Decimal).
``parse_int``, if specified, will be called with the string
of every JSON int to be decoded. By default this is equivalent to
int(num_str). This can be used to use another datatype or parser
for JSON integers (e.g. float).
``parse_constant``, if specified, will be called with one of the
following strings: -Infinity, Infinity, NaN.
This can be used to raise an exception if invalid JSON numbers
are encountered.
To use a custom ``JSONDecoder`` subclass, specify it with the ``cls``
kwarg; otherwise ``JSONDecoder`` is used.
The ``encoding`` argument is ignored and deprecated.
"""
if isinstance(s, str):
if s.startswith('\ufeff'):
raise JSONDecodeError("Unexpected UTF-8 BOM (decode using utf-8-sig)",
s, 0)
else:
if not isinstance(s, (bytes, bytearray)):
raise TypeError('the JSON object must be str, bytes or bytearray, '
> 'not {!r}'.format(s.__class__.__name__))
E TypeError: the JSON object must be str, bytes or bytearray, not 'dict'
/usr/local/lib/python3.6/json/__init__.py:348: TypeError
_____________________________ test_get_additional_cron_jsone_context[firefox-foo bar baz-False] ______________________________
[gw3] linux -- Python 3.6.6 /data/.tox/py36/bin/python
cron_link = <scriptworker.cot.verify.LinkOfTrust object at 0x7fba39cbc470>
mocker = <pytest_mock.MockFixture object at 0x7fba39c3f8d0>, push_comment = 'foo bar baz', raises = False
@pytest.mark.asyncio
@pytest.mark.parametrize("push_comment,raises", ((
'foo bar baz', False
), (
'try: a b c', False
), (
'blah blah blah blah try: a b c', False
), (
'blah blah blah blah\nlbah blha try: [a] b c\nblah blah', False
), (
'asdfsadfsad', True
)))
async def test_get_additional_cron_jsone_context(cron_link, mocker, push_comment,
raises):
chain = cron_link
async def fake_pushlog(*args):
return {
'pushes': {
'123': {
'user': 'myuser',
'date': 'mydate',
'changesets': [{
'desc': push_comment
}]
}
}
}
def fake_commit_msg(*args):
return push_comment
mocker.patch.object(cotverify, 'get_revision', return_value="myrev")
mocker.patch.object(cotverify, 'get_pushlog_info', new=fake_pushlog)
mocker.patch.object(cotverify, 'get_commit_message', new=fake_commit_msg)
if raises:
with pytest.raises(CoTError):
await cotverify._get_additional_cron_jsone_context(
chain, chain
)
else:
expected = {
"push": {
"revision": "myrev",
"comment": '',
"owner": "cron",
"pushlog_id": "123",
"pushdate": "mydate",
}
}
> assert expected == await cotverify._get_additional_cron_jsone_context(
chain, chain
)
scriptworker/test/test_cot_verify.py:1514:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
scriptworker/cot/verify.py:1036: in _get_additional_cron_jsone_context
jsone_context['cron'] = load_json_or_yaml(parent_link.task['extra']['cron'])
scriptworker/utils.py:460: in load_json_or_yaml
contents = _load_str(string)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
s = {}, encoding = None, cls = None, object_hook = None, parse_float = None, parse_int = None, parse_constant = None
object_pairs_hook = None, kw = {}
def loads(s, *, encoding=None, cls=None, object_hook=None, parse_float=None,
parse_int=None, parse_constant=None, object_pairs_hook=None, **kw):
"""Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
``object_hook`` is an optional function that will be called with the
result of any object literal decode (a ``dict``). The return value of
``object_hook`` will be used instead of the ``dict``. This feature
can be used to implement custom decoders (e.g. JSON-RPC class hinting).
``object_pairs_hook`` is an optional function that will be called with the
result of any object literal decoded with an ordered list of pairs. The
return value of ``object_pairs_hook`` will be used instead of the ``dict``.
This feature can be used to implement custom decoders that rely on the
order that the key and value pairs are decoded (for example,
collections.OrderedDict will remember the order of insertion). If
``object_hook`` is also defined, the ``object_pairs_hook`` takes priority.
``parse_float``, if specified, will be called with the string
of every JSON float to be decoded. By default this is equivalent to
float(num_str). This can be used to use another datatype or parser
for JSON floats (e.g. decimal.Decimal).
``parse_int``, if specified, will be called with the string
of every JSON int to be decoded. By default this is equivalent to
int(num_str). This can be used to use another datatype or parser
for JSON integers (e.g. float).
``parse_constant``, if specified, will be called with one of the
following strings: -Infinity, Infinity, NaN.
This can be used to raise an exception if invalid JSON numbers
are encountered.
To use a custom ``JSONDecoder`` subclass, specify it with the ``cls``
kwarg; otherwise ``JSONDecoder`` is used.
The ``encoding`` argument is ignored and deprecated.
"""
if isinstance(s, str):
if s.startswith('\ufeff'):
raise JSONDecodeError("Unexpected UTF-8 BOM (decode using utf-8-sig)",
s, 0)
else:
if not isinstance(s, (bytes, bytearray)):
raise TypeError('the JSON object must be str, bytes or bytearray, '
> 'not {!r}'.format(s.__class__.__name__))
E TypeError: the JSON object must be str, bytes or bytearray, not 'dict'
/usr/local/lib/python3.6/json/__init__.py:348: TypeError
______________________________ test_get_additional_cron_jsone_context[firefox-asdfsadfsad-True] ______________________________
[gw2] linux -- Python 3.6.6 /data/.tox/py36/bin/python
cron_link = <scriptworker.cot.verify.LinkOfTrust object at 0x7f0e3e82a6a0>
mocker = <pytest_mock.MockFixture object at 0x7f0e3e83ff98>, push_comment = 'asdfsadfsad', raises = True
@pytest.mark.asyncio
@pytest.mark.parametrize("push_comment,raises", ((
'foo bar baz', False
), (
'try: a b c', False
), (
'blah blah blah blah try: a b c', False
), (
'blah blah blah blah\nlbah blha try: [a] b c\nblah blah', False
), (
'asdfsadfsad', True
)))
async def test_get_additional_cron_jsone_context(cron_link, mocker, push_comment,
raises):
chain = cron_link
async def fake_pushlog(*args):
return {
'pushes': {
'123': {
'user': 'myuser',
'date': 'mydate',
'changesets': [{
'desc': push_comment
}]
}
}
}
def fake_commit_msg(*args):
return push_comment
mocker.patch.object(cotverify, 'get_revision', return_value="myrev")
mocker.patch.object(cotverify, 'get_pushlog_info', new=fake_pushlog)
mocker.patch.object(cotverify, 'get_commit_message', new=fake_commit_msg)
if raises:
with pytest.raises(CoTError):
await cotverify._get_additional_cron_jsone_context(
> chain, chain
)
scriptworker/test/test_cot_verify.py:1502:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
scriptworker/cot/verify.py:1036: in _get_additional_cron_jsone_context
jsone_context['cron'] = load_json_or_yaml(parent_link.task['extra']['cron'])
scriptworker/utils.py:460: in load_json_or_yaml
contents = _load_str(string)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
s = {}, encoding = None, cls = None, object_hook = None, parse_float = None, parse_int = None, parse_constant = None
object_pairs_hook = None, kw = {}
def loads(s, *, encoding=None, cls=None, object_hook=None, parse_float=None,
parse_int=None, parse_constant=None, object_pairs_hook=None, **kw):
"""Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
``object_hook`` is an optional function that will be called with the
result of any object literal decode (a ``dict``). The return value of
``object_hook`` will be used instead of the ``dict``. This feature
can be used to implement custom decoders (e.g. JSON-RPC class hinting).
``object_pairs_hook`` is an optional function that will be called with the
result of any object literal decoded with an ordered list of pairs. The
return value of ``object_pairs_hook`` will be used instead of the ``dict``.
This feature can be used to implement custom decoders that rely on the
order that the key and value pairs are decoded (for example,
collections.OrderedDict will remember the order of insertion). If
``object_hook`` is also defined, the ``object_pairs_hook`` takes priority.
``parse_float``, if specified, will be called with the string
of every JSON float to be decoded. By default this is equivalent to
float(num_str). This can be used to use another datatype or parser
for JSON floats (e.g. decimal.Decimal).
``parse_int``, if specified, will be called with the string
of every JSON int to be decoded. By default this is equivalent to
int(num_str). This can be used to use another datatype or parser
for JSON integers (e.g. float).
``parse_constant``, if specified, will be called with one of the
following strings: -Infinity, Infinity, NaN.
This can be used to raise an exception if invalid JSON numbers
are encountered.
To use a custom ``JSONDecoder`` subclass, specify it with the ``cls``
kwarg; otherwise ``JSONDecoder`` is used.
The ``encoding`` argument is ignored and deprecated.
"""
if isinstance(s, str):
if s.startswith('\ufeff'):
raise JSONDecodeError("Unexpected UTF-8 BOM (decode using utf-8-sig)",
s, 0)
else:
if not isinstance(s, (bytes, bytearray)):
raise TypeError('the JSON object must be str, bytes or bytearray, '
> 'not {!r}'.format(s.__class__.__name__))
E TypeError: the JSON object must be str, bytes or bytearray, not 'dict'
/usr/local/lib/python3.6/json/__init__.py:348: TypeError
____________________ test_get_additional_cron_jsone_context[firefox-blah blah blah blah try: a b c-False] ____________________
[gw3] linux -- Python 3.6.6 /data/.tox/py36/bin/python
cron_link = <scriptworker.cot.verify.LinkOfTrust object at 0x7fba393f5908>
mocker = <pytest_mock.MockFixture object at 0x7fba393f5e48>, push_comment = 'blah blah blah blah try: a b c', raises = False
@pytest.mark.asyncio
@pytest.mark.parametrize("push_comment,raises", ((
'foo bar baz', False
), (
'try: a b c', False
), (
'blah blah blah blah try: a b c', False
), (
'blah blah blah blah\nlbah blha try: [a] b c\nblah blah', False
), (
'asdfsadfsad', True
)))
async def test_get_additional_cron_jsone_context(cron_link, mocker, push_comment,
raises):
chain = cron_link
async def fake_pushlog(*args):
return {
'pushes': {
'123': {
'user': 'myuser',
'date': 'mydate',
'changesets': [{
'desc': push_comment
}]
}
}
}
def fake_commit_msg(*args):
return push_comment
mocker.patch.object(cotverify, 'get_revision', return_value="myrev")
mocker.patch.object(cotverify, 'get_pushlog_info', new=fake_pushlog)
mocker.patch.object(cotverify, 'get_commit_message', new=fake_commit_msg)
if raises:
with pytest.raises(CoTError):
await cotverify._get_additional_cron_jsone_context(
chain, chain
)
else:
expected = {
"push": {
"revision": "myrev",
"comment": '',
"owner": "cron",
"pushlog_id": "123",
"pushdate": "mydate",
}
}
> assert expected == await cotverify._get_additional_cron_jsone_context(
chain, chain
)
scriptworker/test/test_cot_verify.py:1514:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
scriptworker/cot/verify.py:1036: in _get_additional_cron_jsone_context
jsone_context['cron'] = load_json_or_yaml(parent_link.task['extra']['cron'])
scriptworker/utils.py:460: in load_json_or_yaml
contents = _load_str(string)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
s = {}, encoding = None, cls = None, object_hook = None, parse_float = None, parse_int = None, parse_constant = None
object_pairs_hook = None, kw = {}
def loads(s, *, encoding=None, cls=None, object_hook=None, parse_float=None,
parse_int=None, parse_constant=None, object_pairs_hook=None, **kw):
"""Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
``object_hook`` is an optional function that will be called with the
result of any object literal decode (a ``dict``). The return value of
``object_hook`` will be used instead of the ``dict``. This feature
can be used to implement custom decoders (e.g. JSON-RPC class hinting).
``object_pairs_hook`` is an optional function that will be called with the
result of any object literal decoded with an ordered list of pairs. The
return value of ``object_pairs_hook`` will be used instead of the ``dict``.
This feature can be used to implement custom decoders that rely on the
order that the key and value pairs are decoded (for example,
collections.OrderedDict will remember the order of insertion). If
``object_hook`` is also defined, the ``object_pairs_hook`` takes priority.
``parse_float``, if specified, will be called with the string
of every JSON float to be decoded. By default this is equivalent to
float(num_str). This can be used to use another datatype or parser
for JSON floats (e.g. decimal.Decimal).
``parse_int``, if specified, will be called with the string
of every JSON int to be decoded. By default this is equivalent to
int(num_str). This can be used to use another datatype or parser
for JSON integers (e.g. float).
``parse_constant``, if specified, will be called with one of the
following strings: -Infinity, Infinity, NaN.
This can be used to raise an exception if invalid JSON numbers
are encountered.
To use a custom ``JSONDecoder`` subclass, specify it with the ``cls``
kwarg; otherwise ``JSONDecoder`` is used.
The ``encoding`` argument is ignored and deprecated.
"""
if isinstance(s, str):
if s.startswith('\ufeff'):
raise JSONDecodeError("Unexpected UTF-8 BOM (decode using utf-8-sig)",
s, 0)
else:
if not isinstance(s, (bytes, bytearray)):
raise TypeError('the JSON object must be str, bytes or bytearray, '
> 'not {!r}'.format(s.__class__.__name__))
E TypeError: the JSON object must be str, bytes or bytearray, not 'dict'
/usr/local/lib/python3.6/json/__init__.py:348: TypeError
----------------------------------------------------- Captured log setup -----------------------------------------------------
utils.py 152 DEBUG makedirs(/tmp/tmpxnstoj4l/work_dir)
utils.py 152 DEBUG makedirs(/tmp/tmpxnstoj4l/log_dir)
utils.py 152 DEBUG makedirs(/tmp/tmpxnstoj4l/artifact_dir)
utils.py 152 DEBUG makedirs(/tmp/tmpxnstoj4l/task_log_dir)
utils.py 152 DEBUG makedirs(/tmp/tmpxnstoj4l/git_commit_signing_pubkey_dir)
utils.py 152 DEBUG makedirs(/tmp/tmpxnstoj4l/base_gpg_home_dir)
utils.py 152 DEBUG makedirs(/tmp/tmpxnstoj4l/git_key_repo_dir)
verify.py 338 DEBUG signing my_task_id is scriptworker
verify.py 338 DEBUG decision decision_task_id is docker-worker
test_verify_parent_task_definition[firefox-decision-D4euZNyCRtuBci-fnsfn7A-/data/scriptworker/test/data/cotv2/cron.json-D4euZNyCRtuBci-fnsfn7A-/data/scriptworker/test/data/cotv2/cron.json]
[gw1] linux -- Python 3.6.6 /data/.tox/py36/bin/python
chain = <scriptworker.cot.verify.ChainOfTrust object at 0x7fd4dff972e8>, name = 'decision', task_id = 'D4euZNyCRtuBci-fnsfn7A'
path = '/data/scriptworker/test/data/cotv2/cron.json', decision_task_id = 'D4euZNyCRtuBci-fnsfn7A'
decision_path = '/data/scriptworker/test/data/cotv2/cron.json', mocker = <pytest_mock.MockFixture object at 0x7fd4dff97240>
@pytest.mark.asyncio
@pytest.mark.parametrize("name,task_id,path,decision_task_id,decision_path", ((
"decision", "VQU9QMO4Teq7zr91FhBusg", os.path.join(COTV2_DIR, "decision_hg-push.json"),
"VQU9QMO4Teq7zr91FhBusg", os.path.join(COTV2_DIR, "decision_hg-push.json"),
), (
"action", "MP8uhRdMTjm__Q_sA0GTnA", os.path.join(COTV2_DIR, "action_relpro.json"),
"VQU9QMO4Teq7zr91FhBusg", os.path.join(COTV2_DIR, "decision_hg-push.json"),
), (
"decision", "D4euZNyCRtuBci-fnsfn7A", os.path.join(COTV2_DIR, "cron.json"),
"D4euZNyCRtuBci-fnsfn7A", os.path.join(COTV2_DIR, "cron.json"),
)))
async def test_verify_parent_task_definition(chain, name, task_id, path,
decision_task_id, decision_path, mocker):
link = cotverify.LinkOfTrust(chain.context, name, task_id)
link.task = load_json_or_yaml(path, is_path=True)
if task_id == decision_task_id:
decision_link = link
else:
decision_link = cotverify.LinkOfTrust(chain.context, 'decision', decision_task_id)
decision_link.task = load_json_or_yaml(decision_path, is_path=True)
mocker.patch.object(cotverify, 'load_json_or_yaml_from_url', new=cotv2_load_url)
mocker.patch.object(swcontext, 'load_json_or_yaml_from_url', new=cotv2_load_url)
mocker.patch.object(cotverify, 'load_json_or_yaml', new=cotv2_load)
mocker.patch.object(cotverify, 'get_pushlog_info', new=cotv2_pushlog)
chain.links = list(set([decision_link, link]))
await cotverify.verify_parent_task_definition(
> chain, link
)
scriptworker/test/test_cot_verify.py:1185:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
scriptworker/cot/verify.py:1260: in verify_parent_task_definition
compare_jsone_task_definition(parent_link, rebuilt_definitions)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
parent_link = <scriptworker.cot.verify.LinkOfTrust object at 0x7fd4dff97780>
rebuilt_definitions = {'tasks': [{'created': '2018-01-10T01:01:34.734Z', 'deadline': '2018-01-11T01:01:34.734Z', 'dependencies': [], 'expires': '2019-01-10T01:01:35.734Z', ...}], 'version': 1}
def compare_jsone_task_definition(parent_link, rebuilt_definitions):
"""Compare the json-e rebuilt task definition vs the runtime definition.
Args:
parent_link (LinkOfTrust): the parent link to test.
rebuilt_definitions (dict): the rebuilt task definitions.
Raises:
CoTError: on failure.
"""
diffs = []
for compare_definition in rebuilt_definitions['tasks']:
# Rebuilt decision tasks have an extra `taskId`; remove
if 'taskId' in compare_definition:
del(compare_definition['taskId'])
# remove key/value pairs where the value is empty, since json-e drops
# them instead of keeping them with a None/{}/[] value.
compare_definition = remove_empty_keys(compare_definition)
runtime_definition = remove_empty_keys(parent_link.task)
diff = list(dictdiffer.diff(compare_definition, runtime_definition))
if diff:
diffs.append(pprint.pformat(diff))
continue
log.info("{}: Good.".format(parent_link.name))
break
else:
error_msg = "{} {}: the runtime task doesn't match any rebuilt definition!\n{}".format(
parent_link.name, parent_link.task_id, pprint.pformat(diffs)
)
log.critical(error_msg)
> raise CoTError(error_msg)
E scriptworker.exceptions.CoTError: 'decision D4euZNyCRtuBci-fnsfn7A: the runtime task doesn\'t match any rebuilt definition!\n["[(\'change\',\\n"\n " [\'routes\', 0],\\n"\n " (\'tc-treeherder.v2.maple.054fe08d229f064a71bae9bb793e7ab8d95eff61.343\',\\n"\n " \'tc-treeherder.v2.maple.054fe08d229f064a71bae9bb793e7ab8d95eff61.-1\')),\\n"\n " (\'change\',\\n"\n " [\'payload\', \'command\', 6],\\n"\n " (\'cd /builds/worker/checkouts/gecko && ln -s /builds/worker/artifacts \'\\n"\n \' "artifacts && ./mach --log-no-times taskgraph decision \'\n \'--pushlog-id=\\\'343\\\' "\\n\'\n \' "--pushdate=\\\'1515524845\\\' --project=\\\'maple\\\' "\\n\'\n \' \\\'--message="$GECKO_COMMIT_MSG" --owner=\\\\\\\'cron@noreply.mozilla.org\\\\\\\' \'\n "\'\\n"\n \' \\\'--level=\\\\\\\'3\\\\\\\' --base-repository="$GECKO_BASE_REPOSITORY" \\\'\\n\'\n \' \\\'--head-repository="$GECKO_HEAD_REPOSITORY" --head-ref="$GECKO_HEAD_REF" \'\n "\'\\n"\n \' \\\'--head-rev="$GECKO_HEAD_REV" \'\n "--target-tasks-method=nightly_fennec\\\\n\',\\n"\n " \'cd /builds/worker/checkouts/gecko && ln -s /builds/worker/artifacts \'\\n"\n \' "artifacts && ./mach --log-no-times taskgraph decision \'\n \'--pushlog-id=\\\'-1\\\' "\\n\'\n " \'--pushdate=\\\\\'0\\\\\' --project=\\\\\'maple\\\\\' "\n \'--message="$GECKO_COMMIT_MSG" \\\'\\n\'\n \' "--owner=\\\'cron@noreply.mozilla.org\\\' --level=\\\'3\\\' "\\n\'\n \' \\\'--base-repository="$GECKO_BASE_REPOSITORY" \\\'\\n\'\n \' \\\'--head-repository="$GECKO_HEAD_REPOSITORY" --head-ref="$GECKO_HEAD_REF" \'\n "\'\\n"\n \' \\\'--head-rev="$GECKO_HEAD_REV" \'\n "--target-tasks-method=nightly_fennec\\\\n\'))]"]'
scriptworker/cot/verify.py:1338: CoTError
----------------------------------------------------- Captured log call ------------------------------------------------------
verify.py 1337 CRITICAL decision D4euZNyCRtuBci-fnsfn7A: the runtime task doesn't match any rebuilt definition!
["[('change',\n"
" ['routes', 0],\n"
" ('tc-treeherder.v2.maple.054fe08d229f064a71bae9bb793e7ab8d95eff61.343',\n"
" 'tc-treeherder.v2.maple.054fe08d229f064a71bae9bb793e7ab8d95eff61.-1')),\n"
" ('change',\n"
" ['payload', 'command', 6],\n"
" ('cd /builds/worker/checkouts/gecko && ln -s /builds/worker/artifacts '\n"
' "artifacts && ./mach --log-no-times taskgraph decision '
'--pushlog-id=\'343\' "\n'
' "--pushdate=\'1515524845\' --project=\'maple\' "\n'
' \'--message="$GECKO_COMMIT_MSG" --owner=\\\'cron@noreply.mozilla.org\\\' '
"'\n"
' \'--level=\\\'3\\\' --base-repository="$GECKO_BASE_REPOSITORY" \'\n'
' \'--head-repository="$GECKO_HEAD_REPOSITORY" --head-ref="$GECKO_HEAD_REF" '
"'\n"
' \'--head-rev="$GECKO_HEAD_REV" '
"--target-tasks-method=nightly_fennec\\n',\n"
" 'cd /builds/worker/checkouts/gecko && ln -s /builds/worker/artifacts '\n"
' "artifacts && ./mach --log-no-times taskgraph decision '
'--pushlog-id=\'-1\' "\n'
" '--pushdate=\\'0\\' --project=\\'maple\\' "
'--message="$GECKO_COMMIT_MSG" \'\n'
' "--owner=\'cron@noreply.mozilla.org\' --level=\'3\' "\n'
' \'--base-repository="$GECKO_BASE_REPOSITORY" \'\n'
' \'--head-repository="$GECKO_HEAD_REPOSITORY" --head-ref="$GECKO_HEAD_REF" '
"'\n"
' \'--head-rev="$GECKO_HEAD_REV" '
"--target-tasks-method=nightly_fennec\\n'))]"]
________ test_get_additional_cron_jsone_context[firefox-blah blah blah blah\nlbah blha try: [a] b c\nblah blah-False] ________
[gw3] linux -- Python 3.6.6 /data/.tox/py36/bin/python
cron_link = <scriptworker.cot.verify.LinkOfTrust object at 0x7fba393f5588>
mocker = <pytest_mock.MockFixture object at 0x7fba39377ef0>
push_comment = 'blah blah blah blah\nlbah blha try: [a] b c\nblah blah', raises = False
@pytest.mark.asyncio
@pytest.mark.parametrize("push_comment,raises", ((
'foo bar baz', False
), (
'try: a b c', False
), (
'blah blah blah blah try: a b c', False
), (
'blah blah blah blah\nlbah blha try: [a] b c\nblah blah', False
), (
'asdfsadfsad', True
)))
async def test_get_additional_cron_jsone_context(cron_link, mocker, push_comment,
raises):
chain = cron_link
async def fake_pushlog(*args):
return {
'pushes': {
'123': {
'user': 'myuser',
'date': 'mydate',
'changesets': [{
'desc': push_comment
}]
}
}
}
def fake_commit_msg(*args):
return push_comment
mocker.patch.object(cotverify, 'get_revision', return_value="myrev")
mocker.patch.object(cotverify, 'get_pushlog_info', new=fake_pushlog)
mocker.patch.object(cotverify, 'get_commit_message', new=fake_commit_msg)
if raises:
with pytest.raises(CoTError):
await cotverify._get_additional_cron_jsone_context(
chain, chain
)
else:
expected = {
"push": {
"revision": "myrev",
"comment": '',
"owner": "cron",
"pushlog_id": "123",
"pushdate": "mydate",
}
}
> assert expected == await cotverify._get_additional_cron_jsone_context(
chain, chain
)
scriptworker/test/test_cot_verify.py:1514:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
scriptworker/cot/verify.py:1036: in _get_additional_cron_jsone_context
jsone_context['cron'] = load_json_or_yaml(parent_link.task['extra']['cron'])
scriptworker/utils.py:460: in load_json_or_yaml
contents = _load_str(string)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
s = {}, encoding = None, cls = None, object_hook = None, parse_float = None, parse_int = None, parse_constant = None
object_pairs_hook = None, kw = {}
def loads(s, *, encoding=None, cls=None, object_hook=None, parse_float=None,
parse_int=None, parse_constant=None, object_pairs_hook=None, **kw):
"""Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance
containing a JSON document) to a Python object.
``object_hook`` is an optional function that will be called with the
result of any object literal decode (a ``dict``). The return value of
``object_hook`` will be used instead of the ``dict``. This feature
can be used to implement custom decoders (e.g. JSON-RPC class hinting).
``object_pairs_hook`` is an optional function that will be called with the
result of any object literal decoded with an ordered list of pairs. The
return value of ``object_pairs_hook`` will be used instead of the ``dict``.
This feature can be used to implement custom decoders that rely on the
order that the key and value pairs are decoded (for example,
collections.OrderedDict will remember the order of insertion). If
``object_hook`` is also defined, the ``object_pairs_hook`` takes priority.
``parse_float``, if specified, will be called with the string
of every JSON float to be decoded. By default this is equivalent to
float(num_str). This can be used to use another datatype or parser
for JSON floats (e.g. decimal.Decimal).
``parse_int``, if specified, will be called with the string
of every JSON int to be decoded. By default this is equivalent to
int(num_str). This can be used to use another datatype or parser
for JSON integers (e.g. float).
``parse_constant``, if specified, will be called with one of the
following strings: -Infinity, Infinity, NaN.
This can be used to raise an exception if invalid JSON numbers
are encountered.
To use a custom ``JSONDecoder`` subclass, specify it with the ``cls``
kwarg; otherwise ``JSONDecoder`` is used.
The ``encoding`` argument is ignored and deprecated.
"""
if isinstance(s, str):
if s.startswith('\ufeff'):
raise JSONDecodeError("Unexpected UTF-8 BOM (decode using utf-8-sig)",
s, 0)
else:
if not isinstance(s, (bytes, bytearray)):
raise TypeError('the JSON object must be str, bytes or bytearray, '
> 'not {!r}'.format(s.__class__.__name__))
E TypeError: the JSON object must be str, bytes or bytearray, not 'dict'
/usr/local/lib/python3.6/json/__init__.py:348: TypeError
----------------------------------------------------- Captured log setup -----------------------------------------------------
utils.py 152 DEBUG makedirs(/tmp/tmpghbnhrqg/work_dir)
utils.py 152 DEBUG makedirs(/tmp/tmpghbnhrqg/log_dir)
utils.py 152 DEBUG makedirs(/tmp/tmpghbnhrqg/artifact_dir)
utils.py 152 DEBUG makedirs(/tmp/tmpghbnhrqg/task_log_dir)
utils.py 152 DEBUG makedirs(/tmp/tmpghbnhrqg/git_commit_signing_pubkey_dir)
utils.py 152 DEBUG makedirs(/tmp/tmpghbnhrqg/base_gpg_home_dir)
utils.py 152 DEBUG makedirs(/tmp/tmpghbnhrqg/git_key_repo_dir)
verify.py 338 DEBUG signing my_task_id is scriptworker
verify.py 338 DEBUG decision decision_task_id is docker-worker
----------- coverage: platform linux, python 3.6.6-final-0 -----------
Name Stmts Miss Branch BrPart Cover Missing
--------------------------------------------------------------------------
scriptworker/__init__.py 0 0 0 0 100%
scriptworker/artifacts.py 123 82 30 0 31% 68-92, 107-123, 138-140, 152, 187-209, 215-223, 242-251, 265, 297-320, 338-366, 384-390
scriptworker/client.py 78 56 14 0 24% 41-44, 62-65, 84-95, 117-133, 159-164, 168-183, 187-188, 192-196, 200-206
scriptworker/config.py 108 70 56 0 30% 48-54, 90-105, 122-152, 156, 176-177, 199-217, 235-244
scriptworker/constants.py 9 3 2 0 55% 395-397
scriptworker/context.py 82 34 16 1 52% 75, 79-89, 101-102, 106-108, 117-119, 136, 140-142, 151-152, 156-157, 168-171, 195-197, 213->exit
scriptworker/cot/__init__.py 0 0 0 0 100%
scriptworker/cot/generate.py 37 37 4 0 0% 2-119
scriptworker/cot/verify.py 680 0 236 0 100%
scriptworker/exceptions.py 22 1 0 0 95% 88
scriptworker/gpg.py 446 385 160 0 10% 60, 87-95, 108, 131-135, 161-165, 186-202, 218-229, 250-261, 284-287, 306-311, 337-365, 384-386, 406-428, 450-474, 494, 514-520, 544-550, 591-611, 733-755, 771-773, 782-785, 794-796, 854-906, 933-946, 958-961, 981-1002, 1021-1028, 1040-1050, 1080-1097, 1128-1167, 1186-1196, 1213-1223, 1246-1271, 1285-1295, 1314-1318, 1329-1335, 1359-1388, 1393-1422, 1438, 1454-1459, 1469-1471, 1481, 1497-1517
scriptworker/log.py 57 33 10 0 36% 36-64, 77-85, 99, 113-116
scriptworker/task.py 192 99 46 6 49% 50, 64, 78, 219, 273, 318, 348, 368-379, 395-437, 457-482, 501-520, 533-544, 569-582, 596-611, 218->219, 270->269, 272->273, 276->exit, 317->318, 347->348
scriptworker/utils.py 232 113 92 8 49% 63-79, 100-101, 117, 132-136, 157, 178, 189-194, 217-225, 256-269, 292-303, 382-388, 405-409, 463-465, 482-499, 540-549, 600, 602, 689-700, 150->exit, 156->157, 174->exit, 175->178, 517->519, 599->600, 601->602, 608->603
scriptworker/version.py 21 21 6 0 0% 3-85
scriptworker/worker.py 92 92 16 0 0% 2-187
--------------------------------------------------------------------------
TOTAL 2179 1026 688 15 51%
============================================ 6 failed, 143 passed in 2.80 seconds ============================================
ERROR: InvocationError for command '/data/.tox/py36/bin/py.test --cov-config .coveragerc --cov=scriptworker --cov-report term-missing scriptworker/test/test_cot_verify.py' (exited with code 1)
__________________________________________________________ summary ___________________________________________________________
ERROR: py36: commands failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment