Skip to content

Val 49 tests autovalidation#50

Merged
Niktux merged 4 commits intopuzzle-org:masterfrom
ValentinCoulon:val-49-tests-autovalidation
Dec 13, 2022
Merged

Val 49 tests autovalidation#50
Niktux merged 4 commits intopuzzle-org:masterfrom
ValentinCoulon:val-49-tests-autovalidation

Conversation

@ValentinCoulon
Copy link
Copy Markdown
Contributor

@ValentinCoulon ValentinCoulon commented Dec 8, 2022

J'ai changé les validations en utilisant l'api http dans le module http.
Le purge ne me semblait pas pertinent a faire en curl, vu qu'on fait la validation en curl juste après.

Niveau réal c'était un peu l'aventure :

avto-dev/rabbitmq-api-client ne proposait pas de consomer les messages, j'ai du passer sur une autre lib : https://github.com/groall/rabbitmq-http-api-client-php

La lib n'est pas sur packagist, j'ai donc forké : https://github.com/naoned/rabbitmq-http-api-client-php
La méthode getMessages() de la lib ne fonctionnant pas, j'ai effectué les corrections sur le fork et sorti une 0.2.3

J'en ai profiter pour contribuer à la lib d'origine groall/rabbitmq-http-api-client-php#2

Comment thread features/consume.feature Outdated

Scenario: Consuming a text message
Given The queue 'test_1' contains the text message "Puzzle is great"
Given The queue 'test_1' is empty
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C'est bizarre cet ajour : "Etant donné que la queue est vide et que la queue contient 1 message" C'est contradictoire ?
Je loupe qqch ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

En fait la queue n'est pas purgée au début, donc si il restait des messages avant les tests (par exemple, en cas de plantage d'un test précédent), le test fait un faux positif.

C'est pourquoi j'ai ajouté la purge de chaque queue avant de commencer les traiter.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes j'en déduis ça mais du coup le texte Gherkin est faux.
Essaie plutôt un "Given ... contains only the text message ..." et rajoute la purge dans l'implem PHP

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GIven c'est l'état de départ, tu peux pas y faire un enchaînement temporel d'actions

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bien reçu ! Je fais la modif !

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed avec 0e7b17f
J'ai du refaire une correction sur la llib http

@Niktux
Copy link
Copy Markdown
Contributor

Niktux commented Dec 9, 2022

C'est validé 👍

@Niktux Niktux merged commit a4d80b7 into puzzle-org:master Dec 13, 2022
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