Tests: Make as many tests as possible async.
authorlain <lain@soykaf.club>
Mon, 21 Dec 2020 11:21:40 +0000 (12:21 +0100)
committerlain <lain@soykaf.club>
Mon, 21 Dec 2020 11:21:40 +0000 (12:21 +0100)
commit9ba60f70d2076017b610708691f9b88a025c6d97
treeac80e0aefe6157228323ed5fc8396426df292528
parentc9d73af74dc816dac484f1be2e842baac6fdaa6c
Tests: Make as many tests as possible async.

In general, tests that match these criteria can be made async:

- Doesn't use real Cachex.
- Doesn't write to the Config / Application Environment.
- Uses Mock. Using Mox is fine.
- Uses the streamer.
134 files changed:
test/mix/tasks/pleroma/count_statuses_test.exs
test/mix/tasks/pleroma/database_test.exs
test/mix/tasks/pleroma/ecto/rollback_test.exs
test/mix/tasks/pleroma/instance_test.exs
test/mix/tasks/pleroma/refresh_counter_cache_test.exs
test/pleroma/activity/ir/topics_test.exs
test/pleroma/activity/search_test.exs
test/pleroma/bbs/handler_test.exs
test/pleroma/bookmark_test.exs
test/pleroma/config_test.exs
test/pleroma/conversation/participation_test.exs
test/pleroma/earmark_renderer_test.exs
test/pleroma/ecto_type/activity_pub/object_validators/date_time_test.exs
test/pleroma/ecto_type/activity_pub/object_validators/object_id_test.exs
test/pleroma/ecto_type/activity_pub/object_validators/recipients_test.exs
test/pleroma/ecto_type/activity_pub/object_validators/safe_text_test.exs
test/pleroma/emails/admin_email_test.exs
test/pleroma/emails/user_email_test.exs
test/pleroma/emoji/formatter_test.exs
test/pleroma/emoji/pack_test.exs
test/pleroma/emoji_test.exs
test/pleroma/filter_test.exs
test/pleroma/following_relationship_test.exs
test/pleroma/healthcheck_test.exs
test/pleroma/html_test.exs
test/pleroma/integration/mastodon_websocket_test.exs
test/pleroma/keys_test.exs
test/pleroma/list_test.exs
test/pleroma/marker_test.exs
test/pleroma/mfa/backup_codes_test.exs
test/pleroma/mfa/totp_test.exs
test/pleroma/mfa_test.exs
test/pleroma/migration_helper/notification_backfill_test.exs
test/pleroma/moderation_log_test.exs
test/pleroma/pagination_test.exs
test/pleroma/registration_test.exs
test/pleroma/repo/migrations/fix_legacy_tags_test.exs
test/pleroma/repo/migrations/move_welcome_settings_test.exs
test/pleroma/repo_test.exs
test/pleroma/report_note_test.exs
test/pleroma/safe_jsonb_set_test.exs
test/pleroma/stats_test.exs
test/pleroma/upload/filter/dedupe_test.exs
test/pleroma/upload/filter/exiftool_test.exs
test/pleroma/uploaders/local_test.exs
test/pleroma/user/notification_setting_test.exs
test/pleroma/user/query_test.exs
test/pleroma/user_relationship_test.exs
test/pleroma/web/activity_pub/mrf/anti_followbot_policy_test.exs
test/pleroma/web/activity_pub/mrf/ensure_re_prepended_test.exs
test/pleroma/web/activity_pub/mrf/force_bot_unlisted_policy_test.exs
test/pleroma/web/activity_pub/mrf/no_placeholder_text_policy_test.exs
test/pleroma/web/activity_pub/mrf/normalize_markup_test.exs
test/pleroma/web/activity_pub/mrf/tag_policy_test.exs
test/pleroma/web/activity_pub/object_validators/accept_validation_test.exs
test/pleroma/web/activity_pub/object_validators/announce_validation_test.exs
test/pleroma/web/activity_pub/object_validators/article_note_validator_test.exs
test/pleroma/web/activity_pub/object_validators/attachment_validator_test.exs
test/pleroma/web/activity_pub/object_validators/block_validation_test.exs
test/pleroma/web/activity_pub/object_validators/delete_validation_test.exs
test/pleroma/web/activity_pub/object_validators/emoji_react_handling_test.exs
test/pleroma/web/activity_pub/object_validators/follow_validation_test.exs
test/pleroma/web/activity_pub/object_validators/like_validation_test.exs
test/pleroma/web/activity_pub/object_validators/reject_validation_test.exs
test/pleroma/web/activity_pub/object_validators/undo_handling_test.exs
test/pleroma/web/activity_pub/object_validators/update_handling_test.exs
test/pleroma/web/activity_pub/transmogrifier/accept_handling_test.exs
test/pleroma/web/activity_pub/transmogrifier/block_handling_test.exs
test/pleroma/web/activity_pub/transmogrifier/emoji_react_handling_test.exs
test/pleroma/web/activity_pub/transmogrifier/like_handling_test.exs
test/pleroma/web/activity_pub/transmogrifier/reject_handling_test.exs
test/pleroma/web/activity_pub/transmogrifier/undo_handling_test.exs
test/pleroma/web/activity_pub/transmogrifier/user_update_handling_test.exs
test/pleroma/web/activity_pub/utils_test.exs
test/pleroma/web/activity_pub/views/user_view_test.exs
test/pleroma/web/activity_pub/visibility_test.exs
test/pleroma/web/admin_api/controllers/chat_controller_test.exs
test/pleroma/web/admin_api/controllers/report_controller_test.exs
test/pleroma/web/admin_api/controllers/status_controller_test.exs
test/pleroma/web/admin_api/search_test.exs
test/pleroma/web/admin_api/views/moderation_log_view_test.exs
test/pleroma/web/admin_api/views/report_view_test.exs
test/pleroma/web/auth/authenticator_test.exs
test/pleroma/web/auth/basic_auth_test.exs
test/pleroma/web/auth/pleroma_authenticator_test.exs
test/pleroma/web/auth/totp_authenticator_test.exs
test/pleroma/web/endpoint/metrics_exporter_test.exs
test/pleroma/web/mastodon_api/controllers/auth_controller_test.exs
test/pleroma/web/mastodon_api/controllers/conversation_controller_test.exs
test/pleroma/web/mastodon_api/controllers/filter_controller_test.exs
test/pleroma/web/mastodon_api/controllers/follow_request_controller_test.exs
test/pleroma/web/mastodon_api/controllers/list_controller_test.exs
test/pleroma/web/mastodon_api/controllers/marker_controller_test.exs
test/pleroma/web/mastodon_api/controllers/poll_controller_test.exs
test/pleroma/web/mastodon_api/controllers/report_controller_test.exs
test/pleroma/web/mastodon_api/controllers/subscription_controller_test.exs
test/pleroma/web/mastodon_api/controllers/suggestion_controller_test.exs
test/pleroma/web/mastodon_api/mastodon_api_controller_test.exs
test/pleroma/web/mastodon_api/mastodon_api_test.exs
test/pleroma/web/mastodon_api/views/conversation_view_test.exs
test/pleroma/web/mastodon_api/views/list_view_test.exs
test/pleroma/web/mastodon_api/views/marker_view_test.exs
test/pleroma/web/mastodon_api/views/scheduled_activity_view_test.exs
test/pleroma/web/mastodon_api/views/subscription_view_test.exs
test/pleroma/web/media_proxy/invalidation/script_test.exs
test/pleroma/web/metadata/player_view_test.exs
test/pleroma/web/metadata/providers/feed_test.exs
test/pleroma/web/metadata/providers/rel_me_test.exs
test/pleroma/web/metadata/utils_test.exs
test/pleroma/web/mongoose_im_controller_test.exs
test/pleroma/web/o_auth/app_test.exs
test/pleroma/web/o_auth/authorization_test.exs
test/pleroma/web/o_auth/mfa_controller_test.exs
test/pleroma/web/o_auth/token/utils_test.exs
test/pleroma/web/o_auth/token_test.exs
test/pleroma/web/pleroma_api/controllers/conversation_controller_test.exs
test/pleroma/web/pleroma_api/controllers/mascot_controller_test.exs
test/pleroma/web/pleroma_api/controllers/notification_controller_test.exs
test/pleroma/web/pleroma_api/controllers/scrobble_controller_test.exs
test/pleroma/web/pleroma_api/controllers/two_factor_authentication_controller_test.exs
test/pleroma/web/pleroma_api/views/chat_view_test.exs
test/pleroma/web/pleroma_api/views/scrobble_view_test.exs
test/pleroma/web/plugs/cache_control_test.exs
test/pleroma/web/plugs/cache_test.exs
test/pleroma/web/plugs/idempotency_plug_test.exs
test/pleroma/web/plugs/uploaded_media_plug_test.exs
test/pleroma/web/preload/providers/user_test.exs
test/pleroma/web/push/impl_test.exs
test/pleroma/web/rel_me_test.exs
test/pleroma/web/rich_media/parser/ttl/aws_signed_url_test.exs
test/pleroma/web/twitter_api/controller_test.exs
test/pleroma/web/uploader_controller_test.exs
test/pleroma/web/web_finger_test.exs
test/pleroma/workers/cron/new_users_digest_worker_test.exs