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

Specifying collection & environment via Postman API GUID not working #52

Open
capelio opened this issue Apr 19, 2022 · 5 comments
Open

Comments

@capelio
Copy link

capelio commented Apr 19, 2022

When running the following job:

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: matt-ball/newman-action@v1.0.4
        with:
          apiKey: ${{ secrets.POSTMAN_API_KEY }}
          collection: 2d8b8a29-29a7-4a70-8db7-615ad8e44874
          environment: 3d1532d7-22bd-4d50-99ea-4e66144530fd

I'm seeing the following error:

Newman run failed! Error: collection could not be loaded
  unable to read data from file "2d8b8a29-29a7-4a70-8db7-615ad8e44874"
  ENOENT: no such file or directory, open '2d8b8a29-29a7-4a70-8db7-615ad8e44874'

Any thoughts on why Newman's interpreting the GUIDs as file paths?

@matt-ball
Copy link
Owner

Looks like you might have the ID rather than UID - how are you retrieving it? The info tab in the Postman app is one place to grab it.

@capelio
Copy link
Author

capelio commented Apr 22, 2022

Odd, I grabbed them using calls to the Postman API with curl as the README suggested, but you're right. When I compare the API-returned values to what's in the info tab in the UI, the values are different. I'll try the new values and see if they work.

@capelio
Copy link
Author

capelio commented Apr 22, 2022

Ok, so I found the root of the problem. When using the API to get the IDs, there are two ID fields: id and uid. Once I used jq to pretty-print the API response, I noticed the two right away.

I'll open a quick PR against the README to add another sentence or two calling out the distinction.

@capelio
Copy link
Author

capelio commented Apr 22, 2022

#53

@matt-ball
Copy link
Owner

Looks good - thanks. Let me just check we can't make this work with either option, as then it'd be super straight-forward for everyone. I might've made things too specific.

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

2 participants