Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option "--global-var" unknown when running newman as a Docker container #3249

Open
nicolasduminil opened this issue Jul 9, 2024 · 1 comment

Comments

@nicolasduminil
Copy link

  1. Newman Version (can be found via newman -v): postman/newman:latest
  2. OS details (type, version, and architecture): Ubuntu 22.04.4 LTS
  3. Are you using Newman as a library, or via the CLI? As a docker image
  4. Did you encounter this recently, or has this bug always been there: recently
  5. Expected behavior:

For e2e testing, I'm running a postman/newman:latest image with testcontainers. When I execute the test with JUnit, the container doesn't start and raises the following exception:

2024-07-09 18:54:01,718 ERROR [tc.postman/newman:latest] (main) Log output from the failed container:
error: unknown option '--global-var base_uri=localhost:8081'

What seems to happen is that the option "--global-var" isn't recognized as valid. Running the same command as the one in JUnit but using command line (docker run), works as expected.

Steps to reproduce the problem:

  1. $ git clone https://github.com/nicolasduminil/quarkus-test-case.git
  2. $ cd quarkus-test-case
  3. $ mvn verify
  4. ./run.sh

Three test are executed by mvn verify: an unit, an integration and an e2e one. The first two works as expected, the third one fails with the mentioned exception. The script run.sh executes exactly the same command as the e2e test but using the docker run shell command and, this time, everything works as expected.

So, my conclusion is that the same newman command works when executed via the shell but fails while executed via postman/newman image in testcontainers.

Could anyone please help to fix this issue ?

Many thank in advance.

@nicolasduminil
Copy link
Author

Is there anyone concerned down there ?

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

No branches or pull requests

1 participant