Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[TASK] Postman: collections hard-code localhost:8080 instead of {{serverURL}}

Aperta Adatta ai principianti
#38,221 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
java, postman
Ambito
testing, tooling

Direzione di ricerca

Inizia da dotcms-postman/src/main/resources/postman/ e trova i 17 URL delle richieste codificati come localhost:8080, poi esamina JobQueueResourceAPITests.postman_collection.json per individuare i riferimenti a baseUrl nelle richieste e negli script. Sostituisci quegli indirizzi con {{serverURL}} dell’ambiente, come descritto, mantenendo i valori elencati fuori ambito. Verifica il criterio di accettazione grep ed esegui GraphQLTests.json e un’altra collection interessata su una porta diversa da 8080.

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

Descrizione

Team : Platform Type : Test Automation
Description

Some Postman collections hard-code http://localhost:8080 as the request address instead of using the {{serverURL}} environment variable that the rest of the suite uses. Those requests fail whenever dotCMS listens on any port other than 8080, so a local Postman run can't use a different port. That rules out running a second, isolated stack next to another one on the same machine. CI is not affected today because it publishes Tomcat on 8080.

A local run of GraphQLTests.json against a stack on port 28480 stopped at the "Switch Host" request with ECONNREFUSED 127.0.0.1:8080.

Part of epic #34645 (CI/CD pipeline stability).

Where

All files are under dotcms-postman/src/main/resources/postman/.

  1. There are 17 request URLs written as "raw": "http://localhost:8080/...", with host: ["localhost"] and port: "8080". Find them with grep -n '"raw": "http://localhost:8080' *.json. The count per file is:
    • UserResource.postman_collection.json: 6
    • PagesResourceTests.json: 3
    • Workflow_Resource_Tests.json: 3
    • Template_Resource.postman_collection.json: 2
    • GraphQLTests.json: 1 ("Switch Host")
    • Integrity_Checker_JWT_Token_Test.postman_collection.json: 1
    • NavResourceTests.json: 1
  2. JobQueueResourceAPITests.postman_collection.json sets its own collection variable baseUrl to http://localhost:8080. 38 requests use it as {{baseUrl}}, and 3 scripts read it with pm.collectionVariables.get("baseUrl").

Fix

  • Each of the 17 requests should use {{serverURL}}/... with host: ["{{serverURL}}"] and no port, matching the requests next to it.
  • In JobQueueResourceAPITests, the requests and scripts should use the environment's serverURL instead of the hard-coded baseUrl.

Out of scope

  • Collection variables named serverURL whose value is localhost:8080. The runner (index.js) passes serverURL as an environment variable, which overrides them.
  • Origin header values of localhost:8080. These are header values, not request addresses.
  • The note in dotcms-postman/pom.xml about ApiToken_Resource needing the external port to equal the internal one. That is a server-side matter.
Acceptance Criteria
  • grep -n 'localhost:8080' dotcms-postman/src/main/resources/postman/*.json finds only the out-of-scope collection-variable and Origin header entries.
  • Each affected collection passes when run locally against a stack on port 8080, as before.
  • GraphQLTests.json, and at least one other affected collection, pass when run locally against a stack on a port other than 8080.
Lingua principale
Java
Stelle
972
Fork
489
Merge medio
2g 7h
PR unite (30g)
144

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

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 dotCMS/core

Tutte le issue di dotCMS/core

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.