Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix spec (% 10000 and assert_performed_jobs) #9350

Conversation

dzc34
Copy link
Collaborator

@dzc34 dzc34 commented Jul 24, 2023

reprise de la PR #9251 de @seb-by-ouidou

corrige plusieurs tests qui ne testent pas ce qu'ils devraient
ils passent au vert lorsqu'ils sont lancés seuls, mais sont rouges lorsqu'ils sont lancés avec tous les tests

réponse de @tchak #9251 (comment)

Merci pour la contribution !
Serait-il possible d'avoir une explication sur le changement dossier.id % 10000 ? Nous n'arrivons pas à le comprendre.

commentaire de @seb-by-ouidou #9251 (comment)

cela vient de la method

self.timestamped_filename(attachment) dans laquelle se trouve
id = attachment.id % 10000

donc si vous lancez le test 1 fois, pas de pb car vous aurez un id < 10000

mais si vous lancez les tests de nombreuses fois consecutives, alors les id vont augmenter. Une fois que vous depassez 10000, alors le test passait au rouge avant ma contribution. En mettant % 10000 , il reste vert

self.timestamped_filename(attachment) dans app/lib/active_storage/downloadable_file.rb


L'ADULLACT a mandaté le prestataire Ouidou pour développer plusieurs fonctionnalités (tickets et PR à venir).

  • C'est dans ce cadre que Ouidou nous propose certains correctifs annexes comme celui-ci.
  • Si c'est nécessaire, @seb-by-ouidou pourra interagir avec l'équipe @betagouv sur ce ticket et sur la PR (répondre aux commentaires, pousser des commits…).

Rebase du code (si nécessaire)

Si besoin nous pouvons faire les rebases et/ou ajouter un utilisateur @betagouv pour intervenir directement sur notre dépôt.


trackingAdullactContrib

@what-the-diff
Copy link

what-the-diff bot commented Jul 24, 2023

PR Summary

  • File Reference Adjustment in 'procedure_archive_service_spec.rb'
    A line of code in this file was modified to change the way archives are explicitly referred to. Previously, the entire ID of the dossier was used in the file reference. Now, in order to streamline things and reduce complexity, only the last four digits of the ID are being used.

  • Code Execution Verification in 'instruction_spec.rb'
    Some lines of code related to user log-in have been updated with an additional verification process. This new block, assert_performed_jobs, is utilized to confirm that certain tasks have been executed as expected. This enhancement ensures greater reliability of the function, which logs in users.

@dzc34 dzc34 marked this pull request as draft July 24, 2023 13:20
@dzc34 dzc34 marked this pull request as ready for review July 24, 2023 13:34
@dzc34
Copy link
Collaborator Author

dzc34 commented Jul 24, 2023

La CI est rouge sur demarches-simplifiees / demarches-simplifiees.fr
mais verte sur àdullact / demarches-simplifiees.fr adullact#63

@tchak tchak enabled auto-merge July 25, 2023 08:45
@tchak tchak added this pull request to the merge queue Jul 25, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 25, 2023
@tchak tchak added this pull request to the merge queue Jul 25, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 25, 2023
@tchak tchak added this pull request to the merge queue Jul 25, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 25, 2023
@tchak tchak added this pull request to the merge queue Jul 25, 2023
Merged via the queue into demarches-simplifiees:main with commit 9571981 Jul 25, 2023
@dzc34 dzc34 deleted the adullact_fix_spec_instructeur_procedures_controller branch July 25, 2023 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants