pleroma/test/pleroma
Ilja 28c37dc386
Fix test get_user_apps/1
For some reason I had a test who suddenly failed, mix test test/pleroma/web/o_auth/app_test.exs:54. A user has a list of applications and this test adds them and then sees if the list it gets back is the same as the apps it added.

When I ran mix test a day before I didn't have this problem and when I pushed code today in a different MR, the pipeline succeeded (see https://git.pleroma.social/ilja/pleroma/-/jobs/205827), yet locally it failed. So it seems the test can sometimes succeed and sometimes fail, which makes it untrustworthy.

The failure I see is because the returned list is in reverse order. I assume that's not per sé wrong. You just want to know if the apps you added are actually there. I fixed the test by first ordering the lists before comparing.

AFAICT (and as far as that's relevant) the test got introduced in commit cb2a072e62
2022-03-19 16:57:38 +01:00
..
activity Update copyright, also 2022-02-12 11:53:32 -06:00
bbs Update copyright, also 2022-02-12 11:53:32 -06:00
chat Update copyright, also 2022-02-12 11:53:32 -06:00
config Update copyright, also 2022-02-12 11:53:32 -06:00
conversation Update copyright, also 2022-02-12 11:53:32 -06:00
docs Update copyright, also 2022-02-12 11:53:32 -06:00
ecto_type/activity_pub/object_validators Update copyright, also 2022-02-12 11:53:32 -06:00
emails Update copyright, also 2022-02-12 11:53:32 -06:00
emoji Update copyright, also 2022-02-12 11:53:32 -06:00
gun Update copyright, also 2022-02-12 11:53:32 -06:00
http Update copyright, also 2022-02-12 11:53:32 -06:00
instances Update copyright, also 2022-02-12 11:53:32 -06:00
integration Update copyright, also 2022-02-12 11:53:32 -06:00
mfa Update copyright, also 2022-02-12 11:53:32 -06:00
migration_helper Update copyright, also 2022-02-12 11:53:32 -06:00
object Update copyright, also 2022-02-12 11:53:32 -06:00
password Update copyright, also 2022-02-12 11:53:32 -06:00
repo/migrations Update copyright, also 2022-02-12 11:53:32 -06:00
upload Update copyright, also 2022-02-12 11:53:32 -06:00
uploaders Update copyright, also 2022-02-12 11:53:32 -06:00
user Update copyright, also 2022-02-12 11:53:32 -06:00
web Fix test get_user_apps/1 2022-03-19 16:57:38 +01:00
workers Update copyright, also 2022-02-12 11:53:32 -06:00
activity_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
application_requirements_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
bookmark_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
captcha_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
chat_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
config_db_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
config_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
conversation_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
emoji_test.exs Add unicode 14 support 2022-02-21 17:27:22 -06:00
filter_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
following_relationship_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
formatter_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
frontend_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
hashtag_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
healthcheck_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
html_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
http_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
instances_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
job_queue_monitor_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
keys_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
list_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
marker_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
mfa_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
moderation_log_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
notification_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
object_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
otp_version_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
pagination_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
registration_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
repo_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
report_note_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
reverse_proxy_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
runtime_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
safe_jsonb_set_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
scheduled_activity_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
signature_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
stats_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
upload_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
user_invite_token_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
user_relationship_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
user_search_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
user_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
utils_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
xml_builder_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00