Skip to content

Commit

Permalink
fix: update test
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-bisonai committed Dec 6, 2023
1 parent 1ed122a commit a0255a0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/cli.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,31 @@ jobs:
timeout-minutes: 3

services:
postgres:
postgres-api:
image: postgres
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: orakl-test
POSTGRES_DB: orakl-test-api
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
postgres-delegator:
image: postgres
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: orakl-test-delegator
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5433:5432


steps:
- uses: actions/checkout@v3
Expand All @@ -36,18 +49,20 @@ jobs:
run: yarn install
- name: Run api
run: |
yarn api build
yarn api prisma-migrate dev --name init
yarn api start &
env:
DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/orakl-test?schema=orakl"
DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/orakl-test-api?schema=public"
ENCRYPT_PASSWORD: "abc123"
APP_PORT: "3000"
- name: Run delegator
run: |
yarn delegator build
yarn delegator prisma-migrate dev --name init
yarn delegator start &
env:
DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/orakl-test?schema=delegator"
DATABASE_URL: "postgresql://postgres:postgres@localhost:5433/orakl-test-delegator?schema=public"
PROVIDER_URL: "https://api.baobab.klaytn.net:8651"
APP_PORT: "3002"
DELEGATOR_FEEPAYER_PK: ${{ secrets.DELEGATOR_FEEPAYER_PK}}
Expand Down
2 changes: 1 addition & 1 deletion cli/test/delegator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const contractAddress = '0x93120927379723583c7a0dd2236fcb255e96949f'
const functionName = 'increment()'

describe('CLI Aggregator', function () {
test('Test Organization', async function () {
test('Test Aggregator', async function () {
// Insert Organization
const organization = await organizationInsertHandler()({ name: organizationName })
expect(organization.name).toBe(organizationName)
Expand Down

0 comments on commit a0255a0

Please sign in to comment.