Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Siegrift committed Oct 2, 2023
1 parent 517c63d commit 12919eb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,22 @@ jobs:
with:
node-version: '18.x'
cache: 'pnpm'
- name: Install Dependencies
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm run build
- name: Build Docker Images
- name: Build Docker images
run: pnpm run docker:build
- name: Start Services
- name: Start services
# Start the e2e services in the background and wait a small amount of time for them to start.
run: |
pnpm run start:data-provider-api &
pnpm run start:signed-api &
pnpm run start:pusher &
pnpm run --recursive --filter e2e start:data-provider-api &
pnpm run --recursive --filter e2e start:signed-api &
pnpm run --recursive --filter e2e start:pusher &
sleep 5
- name: Run E2E Tests
run: pnpm run test:e2e
- name: Run e2e tests
run: pnpm run --recursive --filter e2e test:e2e

required-checks-passed:
name: All required checks passed
Expand Down
1 change: 0 additions & 1 deletion packages/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"start:pusher": "docker run -it --init --volume $(pwd)/src/pusher:/app/config --env-file ./src/pusher/.env --rm --memory=256m pusher:latest",
"start:signed-api": "docker run --publish 8090:8090 -it --init --volume $(pwd)/src/signed-api:/app/config --env-file ./src/signed-api/.env --rm --memory=256m api:latest",
"start:user": "ts-node src/user.ts",
"test": "jest --passWithNoTests",
"test:e2e": "jest",
"tsc": "tsc --project ."
},
Expand Down
3 changes: 2 additions & 1 deletion packages/pusher/src/api-requests/signed-api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ describe(postSignedApiData.name, () => {

expect(response).toEqual({ success: false });
expect(logger.warn).toHaveBeenCalledWith('Failed to make update signed API request.', {
error: new Error('simulated-network-error'),
errorMessage: 'simulated-network-error',
axiosResponse: {},
signedApiName: 'localhost',
updateDelay: 5,
});
Expand Down

0 comments on commit 12919eb

Please sign in to comment.