qb_akkoma/test/pleroma/web/o_auth
Ilja 8b843be03e 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-06-29 20:43:41 +01:00
..
token Bump Copyright to 2021 2021-01-13 07:49:50 +01:00
app_test.exs Fix test get_user_apps/1 2022-06-29 20:43:41 +01:00
authorization_test.exs Bump Copyright to 2021 2021-01-13 07:49:50 +01:00
ldap_authorization_test.exs Pbkdf2: Use it everywhere. 2021-01-14 15:06:16 +01:00
mfa_controller_test.exs Pbkdf2: Use it everywhere. 2021-01-14 15:06:16 +01:00
o_auth_controller_test.exs Return token's primary key with POST /oauth/token 2021-03-24 12:50:05 -05:00
token_test.exs Bump Copyright to 2021 2021-01-13 07:49:50 +01:00