Implement lab 7 transport security and worker containment
This commit is contained in:
@@ -0,0 +1,233 @@
|
||||
..EEEEE................................................................. [ 7%]
|
||||
........................................................................ [ 14%]
|
||||
....FFFFFFFFF..................FF..F.................................... [ 21%]
|
||||
........................................................................ [ 28%]
|
||||
........................................................................ [ 36%]
|
||||
........................................................................ [ 43%]
|
||||
........................................................................ [ 50%]
|
||||
........................................................................ [ 57%]
|
||||
........................................................................ [ 64%]
|
||||
........................................................................ [ 72%]
|
||||
................................................s....................... [ 79%]
|
||||
........................................................................ [ 86%]
|
||||
........................................................................ [ 93%]
|
||||
......s........................................................ [100%]
|
||||
==================================== ERRORS ====================================
|
||||
__________ ERROR at setup of test_confirmed_job_is_consumed_and_acked __________
|
||||
student-tests/adapters/test_rabbitmq.py:101: in rabbitmq
|
||||
assert time.monotonic() < deadline, "RabbitMQ не стал готов"
|
||||
E AssertionError: RabbitMQ не стал готов
|
||||
E assert 1484532.602456583 < 1484531.669322458
|
||||
E + where 1484532.602456583 = <built-in function monotonic>()
|
||||
E + where <built-in function monotonic> = time.monotonic
|
||||
_ ERROR at setup of test_message_off_the_schema_goes_to_the_dead_letter_queue __
|
||||
student-tests/adapters/test_rabbitmq.py:101: in rabbitmq
|
||||
assert time.monotonic() < deadline, "RabbitMQ не стал готов"
|
||||
E AssertionError: RabbitMQ не стал готов
|
||||
E assert 1484532.602456583 < 1484531.669322458
|
||||
E + where 1484532.602456583 = <built-in function monotonic>()
|
||||
E + where <built-in function monotonic> = time.monotonic
|
||||
_____ ERROR at setup of test_failed_processing_is_requeued_and_retried[1] ______
|
||||
student-tests/adapters/test_rabbitmq.py:101: in rabbitmq
|
||||
assert time.monotonic() < deadline, "RabbitMQ не стал готов"
|
||||
E AssertionError: RabbitMQ не стал готов
|
||||
E assert 1484532.602456583 < 1484531.669322458
|
||||
E + where 1484532.602456583 = <built-in function monotonic>()
|
||||
E + where <built-in function monotonic> = time.monotonic
|
||||
_____ ERROR at setup of test_failed_processing_is_requeued_and_retried[12] _____
|
||||
student-tests/adapters/test_rabbitmq.py:101: in rabbitmq
|
||||
assert time.monotonic() < deadline, "RabbitMQ не стал готов"
|
||||
E AssertionError: RabbitMQ не стал готов
|
||||
E assert 1484532.602456583 < 1484531.669322458
|
||||
E + where 1484532.602456583 = <built-in function monotonic>()
|
||||
E + where <built-in function monotonic> = time.monotonic
|
||||
_____________ ERROR at setup of test_worker_account_cannot_publish _____________
|
||||
student-tests/adapters/test_rabbitmq.py:101: in rabbitmq
|
||||
assert time.monotonic() < deadline, "RabbitMQ не стал готов"
|
||||
E AssertionError: RabbitMQ не стал готов
|
||||
E assert 1484532.602456583 < 1484531.669322458
|
||||
E + where 1484532.602456583 = <built-in function monotonic>()
|
||||
E + where <built-in function monotonic> = time.monotonic
|
||||
=================================== FAILURES ===================================
|
||||
__________________ test_migrations_are_ordered_and_versioned ___________________
|
||||
student-tests/api/test_migrations.py:283: in test_migrations_are_ordered_and_versioned
|
||||
assert [script.revision for script in reversed(list(scripts.walk_revisions()))] == VERSIONS
|
||||
E AssertionError: assert ['0001_init',...rantine', ...] == ['0001_init',...rantine', ...]
|
||||
E
|
||||
E Left contains one more item: '0008_login_budget'
|
||||
E Use -v to get more diff
|
||||
_______________________ test_fresh_schema_matches_models _______________________
|
||||
student-tests/api/test_migrations.py:290: in test_fresh_schema_matches_models
|
||||
assert (
|
||||
E AssertionError: assert [[('modify_ty...GINT(), ...)]] == []
|
||||
E
|
||||
E Left contains one more item: [('modify_type', None, 'login_budget', 'window', {'existing_nullable': False, 'existing_server_default': False, 'existing_comment': None}, BIGINT(), ...)]
|
||||
E Use -v to get more diff
|
||||
__________________________ test_rerun_changes_nothing __________________________
|
||||
student-tests/api/test_migrations.py:305: in test_rerun_changes_nothing
|
||||
assert await revision(empty_database) == VERSIONS[-1]
|
||||
E AssertionError: assert '0008_login_budget' == '0007_trace_context'
|
||||
E
|
||||
E - 0007_trace_context
|
||||
E + 0008_login_budget
|
||||
__________________ test_legacy_upgrade_preserves_every_row[1] __________________
|
||||
student-tests/api/test_migrations.py:320: in test_legacy_upgrade_preserves_every_row
|
||||
assert await revision(empty_database) == VERSIONS[-1]
|
||||
E AssertionError: assert '0008_login_budget' == '0007_trace_context'
|
||||
E
|
||||
E - 0007_trace_context
|
||||
E + 0008_login_budget
|
||||
__________________ test_legacy_upgrade_preserves_every_row[2] __________________
|
||||
student-tests/api/test_migrations.py:320: in test_legacy_upgrade_preserves_every_row
|
||||
assert await revision(empty_database) == VERSIONS[-1]
|
||||
E AssertionError: assert '0008_login_budget' == '0007_trace_context'
|
||||
E
|
||||
E - 0007_trace_context
|
||||
E + 0008_login_budget
|
||||
__________________ test_legacy_upgrade_preserves_every_row[3] __________________
|
||||
student-tests/api/test_migrations.py:320: in test_legacy_upgrade_preserves_every_row
|
||||
assert await revision(empty_database) == VERSIONS[-1]
|
||||
E AssertionError: assert '0008_login_budget' == '0007_trace_context'
|
||||
E
|
||||
E - 0007_trace_context
|
||||
E + 0008_login_budget
|
||||
__________________ test_legacy_upgrade_preserves_every_row[4] __________________
|
||||
student-tests/api/test_migrations.py:320: in test_legacy_upgrade_preserves_every_row
|
||||
assert await revision(empty_database) == VERSIONS[-1]
|
||||
E AssertionError: assert '0008_login_budget' == '0007_trace_context'
|
||||
E
|
||||
E - 0007_trace_context
|
||||
E + 0008_login_budget
|
||||
__________________ test_legacy_upgrade_preserves_every_row[5] __________________
|
||||
student-tests/api/test_migrations.py:320: in test_legacy_upgrade_preserves_every_row
|
||||
assert await revision(empty_database) == VERSIONS[-1]
|
||||
E AssertionError: assert '0008_login_budget' == '0007_trace_context'
|
||||
E
|
||||
E - 0007_trace_context
|
||||
E + 0008_login_budget
|
||||
__________________ test_legacy_upgrade_preserves_every_row[6] __________________
|
||||
student-tests/api/test_migrations.py:320: in test_legacy_upgrade_preserves_every_row
|
||||
assert await revision(empty_database) == VERSIONS[-1]
|
||||
E AssertionError: assert '0008_login_budget' == '0007_trace_context'
|
||||
E
|
||||
E - 0007_trace_context
|
||||
E + 0008_login_budget
|
||||
____________ test_simultaneous_migration_processes_serialize[False] ____________
|
||||
student-tests/api/test_migrations.py:415: in test_simultaneous_migration_processes_serialize
|
||||
assert await revision(empty_database) == VERSIONS[-1]
|
||||
E AssertionError: assert '0008_login_budget' == '0007_trace_context'
|
||||
E
|
||||
E - 0007_trace_context
|
||||
E + 0008_login_budget
|
||||
____________ test_simultaneous_migration_processes_serialize[True] _____________
|
||||
student-tests/api/test_migrations.py:415: in test_simultaneous_migration_processes_serialize
|
||||
assert await revision(empty_database) == VERSIONS[-1]
|
||||
E AssertionError: assert '0008_login_budget' == '0007_trace_context'
|
||||
E
|
||||
E - 0007_trace_context
|
||||
E + 0008_login_budget
|
||||
_______________ test_failed_revision_rolls_back_ddl_and_version ________________
|
||||
.venv/lib/python3.14/site-packages/alembic/script/base.py:217: in _catch_revision_errors
|
||||
yield
|
||||
.venv/lib/python3.14/site-packages/alembic/script/base.py:425: in _upgrade_revs
|
||||
for script in reversed(list(revs))
|
||||
^^^^^^^^^^
|
||||
.venv/lib/python3.14/site-packages/alembic/script/revision.py:814: in iterate_revisions
|
||||
revisions, heads = fn(
|
||||
.venv/lib/python3.14/site-packages/alembic/script/revision.py:1447: in _collect_upgrade_revisions
|
||||
for rev in self._parse_upgrade_target(
|
||||
.venv/lib/python3.14/site-packages/alembic/script/revision.py:1234: in _parse_upgrade_target
|
||||
return self.get_revisions(target)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
.venv/lib/python3.14/site-packages/alembic/script/revision.py:544: in get_revisions
|
||||
resolved_id, branch_label = self._resolve_revision_number(id_)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
.venv/lib/python3.14/site-packages/alembic/script/revision.py:778: in _resolve_revision_number
|
||||
current_head = self.get_current_head(branch_label)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
.venv/lib/python3.14/site-packages/alembic/script/revision.py:508: in get_current_head
|
||||
raise MultipleHeads(
|
||||
E alembic.script.revision.MultipleHeads: Multiple heads are present for given argument 'head'; 0003_failure, 0008_login_budget
|
||||
|
||||
The above exception was the direct cause of the following exception:
|
||||
student-tests/api/test_migrations.py:465: in test_failed_revision_rolls_back_ddl_and_version
|
||||
await asyncio.to_thread(command.upgrade, config, "head")
|
||||
../../../../../.local/share/uv/python/cpython-3.14.5-macos-aarch64-none/lib/python3.14/asyncio/threads.py:25: in to_thread
|
||||
return await loop.run_in_executor(None, func_call)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
../../../../../.local/share/uv/python/cpython-3.14.5-macos-aarch64-none/lib/python3.14/concurrent/futures/thread.py:86: in run
|
||||
result = ctx.run(self.task)
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
../../../../../.local/share/uv/python/cpython-3.14.5-macos-aarch64-none/lib/python3.14/concurrent/futures/thread.py:73: in run
|
||||
return fn(*args, **kwargs)
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
.venv/lib/python3.14/site-packages/alembic/command.py:483: in upgrade
|
||||
script.run_env()
|
||||
.venv/lib/python3.14/site-packages/alembic/script/base.py:549: in run_env
|
||||
util.load_python_file(self.dir, "env.py")
|
||||
.venv/lib/python3.14/site-packages/alembic/util/pyfiles.py:116: in load_python_file
|
||||
module = load_module_py(module_id, path)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
.venv/lib/python3.14/site-packages/alembic/util/pyfiles.py:136: in load_module_py
|
||||
spec.loader.exec_module(module) # type: ignore
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
<frozen importlib._bootstrap_external>:759: in exec_module
|
||||
???
|
||||
<frozen importlib._bootstrap>:491: in _call_with_frames_removed
|
||||
???
|
||||
/private/var/folders/mv/1d_0hqt94jj1lb13qxh20b8c0000gn/T/pytest-of-artemkostylev/pytest-317/test_failed_revision_rolls_bac0/alembic/env.py:111: in <module>
|
||||
asyncio.run(run_async_migrations())
|
||||
../../../../../.local/share/uv/python/cpython-3.14.5-macos-aarch64-none/lib/python3.14/asyncio/runners.py:204: in run
|
||||
return runner.run(main)
|
||||
^^^^^^^^^^^^^^^^
|
||||
../../../../../.local/share/uv/python/cpython-3.14.5-macos-aarch64-none/lib/python3.14/asyncio/runners.py:127: in run
|
||||
return self._loop.run_until_complete(task)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
../../../../../.local/share/uv/python/cpython-3.14.5-macos-aarch64-none/lib/python3.14/asyncio/base_events.py:719: in run_until_complete
|
||||
return future.result()
|
||||
^^^^^^^^^^^^^^^
|
||||
/private/var/folders/mv/1d_0hqt94jj1lb13qxh20b8c0000gn/T/pytest-of-artemkostylev/pytest-317/test_failed_revision_rolls_bac0/alembic/env.py:94: in run_async_migrations
|
||||
await connection.run_sync(run_migrations)
|
||||
.venv/lib/python3.14/site-packages/sqlalchemy/ext/asyncio/engine.py:888: in run_sync
|
||||
return await greenlet_spawn(
|
||||
.venv/lib/python3.14/site-packages/sqlalchemy/util/_concurrency_py3k.py:203: in greenlet_spawn
|
||||
result = context.switch(value)
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
/private/var/folders/mv/1d_0hqt94jj1lb13qxh20b8c0000gn/T/pytest-of-artemkostylev/pytest-317/test_failed_revision_rolls_bac0/alembic/env.py:68: in run_migrations
|
||||
context.run_migrations()
|
||||
<string>:8: in run_migrations
|
||||
???
|
||||
.venv/lib/python3.14/site-packages/alembic/runtime/environment.py:946: in run_migrations
|
||||
self.get_context().run_migrations(**kw)
|
||||
.venv/lib/python3.14/site-packages/alembic/runtime/migration.py:615: in run_migrations
|
||||
for step in self._migrations_fn(heads, self):
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
.venv/lib/python3.14/site-packages/alembic/command.py:472: in upgrade
|
||||
return script._upgrade_revs(revision, rev)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
.venv/lib/python3.14/site-packages/alembic/script/base.py:413: in _upgrade_revs
|
||||
with self._catch_revision_errors(
|
||||
../../../../../.local/share/uv/python/cpython-3.14.5-macos-aarch64-none/lib/python3.14/contextlib.py:162: in __exit__
|
||||
self.gen.throw(value)
|
||||
.venv/lib/python3.14/site-packages/alembic/script/base.py:243: in _catch_revision_errors
|
||||
raise util.CommandError(multiple_heads) from mh
|
||||
E alembic.util.exc.CommandError: Multiple head revisions are present for given argument 'head'; please specify a specific target revision, '<branchname>@head' to narrow to a specific head, or 'heads' for all heads
|
||||
=========================== short test summary info ============================
|
||||
FAILED student-tests/api/test_migrations.py::test_migrations_are_ordered_and_versioned
|
||||
FAILED student-tests/api/test_migrations.py::test_fresh_schema_matches_models
|
||||
FAILED student-tests/api/test_migrations.py::test_rerun_changes_nothing - Ass...
|
||||
FAILED student-tests/api/test_migrations.py::test_legacy_upgrade_preserves_every_row[1]
|
||||
FAILED student-tests/api/test_migrations.py::test_legacy_upgrade_preserves_every_row[2]
|
||||
FAILED student-tests/api/test_migrations.py::test_legacy_upgrade_preserves_every_row[3]
|
||||
FAILED student-tests/api/test_migrations.py::test_legacy_upgrade_preserves_every_row[4]
|
||||
FAILED student-tests/api/test_migrations.py::test_legacy_upgrade_preserves_every_row[5]
|
||||
FAILED student-tests/api/test_migrations.py::test_legacy_upgrade_preserves_every_row[6]
|
||||
FAILED student-tests/api/test_migrations.py::test_simultaneous_migration_processes_serialize[False]
|
||||
FAILED student-tests/api/test_migrations.py::test_simultaneous_migration_processes_serialize[True]
|
||||
FAILED student-tests/api/test_migrations.py::test_failed_revision_rolls_back_ddl_and_version
|
||||
ERROR student-tests/adapters/test_rabbitmq.py::test_confirmed_job_is_consumed_and_acked
|
||||
ERROR student-tests/adapters/test_rabbitmq.py::test_message_off_the_schema_goes_to_the_dead_letter_queue
|
||||
ERROR student-tests/adapters/test_rabbitmq.py::test_failed_processing_is_requeued_and_retried[1]
|
||||
ERROR student-tests/adapters/test_rabbitmq.py::test_failed_processing_is_requeued_and_retried[12]
|
||||
ERROR student-tests/adapters/test_rabbitmq.py::test_worker_account_cannot_publish
|
||||
12 failed, 980 passed, 2 skipped, 19 deselected, 5 errors in 256.73s (0:04:16)
|
||||
Reference in New Issue
Block a user