Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto Apto para principiantes
#38,221 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Ya se ha fusionado un pull request relacionado.

  • #38240 de @swicken — fusionado

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
78/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
java, postman
Área
testing, tooling

Línea de trabajo

Empieza en dotcms-postman/src/main/resources/postman/ y encuentra las 17 URL de solicitudes codificadas directamente como localhost:8080; después, inspecciona JobQueueResourceAPITests.postman_collection.json para localizar referencias a baseUrl en las solicitudes y los scripts. Sustituye esas direcciones por {{serverURL}} del entorno, tal como se describe, y conserva los valores indicados fuera del alcance. Comprueba el criterio de aceptación de grep y ejecuta GraphQLTests.json y otra colección afectada con un puerto distinto de 8080.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
Java
Estrellas
972
Forks
489
Merge medio
2 d 15 h
PR fusionados (30 d)
199

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de dotCMS/core

Todos los issues de dotCMS/core

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.