Remove or rewrite commented-out tests (OrderComponentTest, GatewayControllerTest)

Aperta
#145 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
62/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
docker, java, mongodb, spring-boot
Ambito
testing-qa

Direzione di ricerca

Start with order-service's commented-out OrderComponentTest and customer-service's CustomerComponentTest as the model to copy from. The gateway-service GatewayControllerTest is a manual load script, so decide whether to delete it or move it out of src/test. Done means OrderComponentTest runs with @SpringBootTest(RANDOM_PORT), a Testcontainers MongoDB, and covers testAccept and testPrepare, and the gateway test no longer sits in the test sources.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Problem

  • order-service: OrderComponentTest is entirely commented out and based on JUnit 4 (SpringRunner, HoverflyRule, @ClassRule). order-service therefore has no component test, unlike account-service and customer-service.
  • gateway-service: GatewayControllerTest has its @Test commented out; it is a manual load script that sends 100 orders to localhost:8080.

Suggested solution

  • Rewrite OrderComponentTest in the style of CustomerComponentTest (@SpringBootTest(RANDOM_PORT), Testcontainers MongoDB with @ServiceConnection, @ExtendWith(HoverflyExtension.class)), covering testAccept and testPrepare.
  • Remove GatewayControllerTest from src/test (or move the load generator outside the test sources) if it is not meant to run.
Lingua principale
Java
Stelle
12
Fork
7
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di piomin/sample-spring-cloud-testing

Tutte le issue di piomin/sample-spring-cloud-testing

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.