Skip to content

Postman tests running against localhost only and not Netlify preview deploy #23

@ivelin

Description

@ivelin

Describe the bug
CI flow has a bug. It waits for netlify preview deployment, but does not use it for test run.

- name: Wait for successful preview deployment

      - name: Wait for successful preview deployment
        if: ${{ github.event_name == 'pull_request' }}
        uses: jakepartusch/wait-for-netlify-action@v1
        id: get-netlify-url
        with:
          site_name: "ambianic-serverless"
          max_timeout: 60

      - name: Run tests against deployed preview
        if: ${{ github.event_name == 'pull_request' }}
        run:  npm run test:postman
        env:
          FUNCTION_URL: http://127.0.0.1:4010

Expected behavior
Inspect closely the ambianc-ui flow to understand how netlify wait assigns an environment variable which is then passed on to the test step.

FUNCTION_URL: http://127.0.0.1:4010

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions