Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン 初心者向け
#38,221 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

関連するプルリクエストがすでにマージされています。

  • #38240 @swicken による — マージ済み

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
java, postman
領域
testing, tooling

調査の方向性

dotcms-postman/src/main/resources/postman/から始めて、localhost:8080がハードコードされた17個のリクエストURLを見つけます。次に、JobQueueResourceAPITests.postman_collection.jsonを調べ、リクエストとスクリプト内のbaseUrl参照を確認します。説明に従ってこれらのアドレスを環境の{{serverURL}}に置き換え、対象外として列挙された値はそのままにします。grepの受け入れ基準を確認し、GraphQLTests.jsonと、影響を受ける別のcollectionを8080以外のポートで実行します。

索引モデルが issue の本文から書いたものです。

説明

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.
主要言語
Java
スター
972
フォーク
489
平均マージ
2日 12時間
マージ済み PR(30日)
188

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

dotCMS/core のほかの issue

dotCMS/core の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。