Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 3 additions & 27 deletions .github/workflows/tests-rc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,40 +29,16 @@ jobs:
run: npm ci

- name: Install global dependencies
run: npm install --global bee-dev @fairdatasociety/fdp-play @ethersphere/swarm-cli npxie

- name: Clone fdp-play
run: git clone https://github.com/fairDataSociety/fdp-play

- name: Install fdp-play dependencies
run: |
cd fdp-play && npm install
cd orchestrator && npm install

- name: Build fdp-play images
run: |
cd fdp-play/orchestrator
npm run build:env -- --build-base-bee --bee-repository=ethersphere/bee.git

- name: Clean up fdp-play
run: rm -rf fdp-play/test
run: npm install --global bee-dev @ethersphere/bee-factory @ethersphere/swarm-cli npxie

- name: Run bee-dev
run: bee-dev --port 16337 &

- name: Run bee-dev with --no-swap
run: bee-dev --port 16338 --no-swap &

- name: Start fdp-play environment
run: fdp-play start --detach --blockchain-image ethereum/client-go:release-1.13 --bee-version HEAD-commit

- name: Deposit to chequebook
run: |
swarm-cli cheque deposit 10
swarm-cli cheque deposit 10 --bee-api-url http://localhost:11633
swarm-cli cheque deposit 10 --bee-api-url http://localhost:21633
swarm-cli cheque deposit 10 --bee-api-url http://localhost:31633
swarm-cli cheque deposit 10 --bee-api-url http://localhost:41633
- name: Start bee-factory
run: bee-factory start --tag master

- name: Print swarm-cli status
continue-on-error: true
Expand Down
14 changes: 3 additions & 11 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,16 @@ jobs:
run: npm ci

- name: Install global dependencies
run: npm install --global bee-dev @fairdatasociety/fdp-play @ethersphere/swarm-cli npxie
run: npm install --global bee-dev @ethersphere/bee-factory @ethersphere/swarm-cli npxie

- name: Run bee-dev
run: bee-dev --port 16337 &

- name: Run bee-dev with --no-swap
run: bee-dev --port 16338 --no-swap &

- name: Start fdp-play environment
run: fdp-play start --detach --fresh --bee-version d0aa8b9-commit

- name: Deposit to chequebook
run: |
swarm-cli cheque deposit 10
swarm-cli cheque deposit 10 --bee-api-url http://localhost:11633
swarm-cli cheque deposit 10 --bee-api-url http://localhost:21633
swarm-cli cheque deposit 10 --bee-api-url http://localhost:31633
swarm-cli cheque deposit 10 --bee-api-url http://localhost:41633
- name: Start bee-factory
run: bee-factory start --tag v2.8.0

- name: Print swarm-cli status
continue-on-error: true
Expand Down
13 changes: 8 additions & 5 deletions test/command/create-batch.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,25 @@ expect.extend({
toMatchLinesInOrder,
})

const FUNDER_KEY = '0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba'
const JSON_RPC_URL = 'http://localhost:8545'

describeCommand('Test `utility create-batch` command', ({ consoleMessages }) => {
it('should create batch', async () => {
process.env.SWARM_CLI_NETWORK_ID = '4020'
process.env.SWARM_CLI_BZZ_ADDRESS = '0xe78A0F7E598Cc8b0Bb87894B0F60dD2a88d6a8Ab'
process.env.SWARM_CLI_POSTAGE_STAMP_ADDRESS = '0x254dffcd3277C0b1660F6d42EFbB754edaBAbC2B'
process.env.SWARM_CLI_NETWORK_ID = '1337'
process.env.SWARM_CLI_BZZ_ADDRESS = '0x5FbDB2315678afecb367f032d93F642f64180aa3'
process.env.SWARM_CLI_POSTAGE_STAMP_ADDRESS = '0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512'
await invokeTestCli([
'utility',
'create-batch',
'--private-key',
'0x566058308ad5fa3888173c741a1fb902c9f1f19559b11fc2738dfc53637ce4e9',
FUNDER_KEY,
'--depth',
'17',
'--amount',
'10B',
'--json-rpc-url',
'http://localhost:9545',
JSON_RPC_URL,
'--yes',
])
expect(consoleMessages).toMatchLinesInOrder([
Expand Down
8 changes: 4 additions & 4 deletions test/command/redeem.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ expect.extend({
toMatchLinesInOrder,
})

const FUNDER_KEY = '0x566058308ad5fa3888173c741a1fb902c9f1f19559b11fc2738dfc53637ce4e9'
const JSON_RPC_URL = 'http://localhost:9545'
const FUNDER_KEY = '0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba'
const JSON_RPC_URL = 'http://localhost:8545'
const ETH_01 = 100_000_000_000_000_000n.toString()
const BZZ_5 = 50_000_000_000_000_000n.toString()

describeCommand('Test `utility redeem` command', ({ consoleMessages }) => {
it('should redeem funds to target address', async () => {
process.env.SWARM_CLI_NETWORK_ID = '4020'
process.env.SWARM_CLI_BZZ_ADDRESS = '0xe78A0F7E598Cc8b0Bb87894B0F60dD2a88d6a8Ab'
process.env.SWARM_CLI_NETWORK_ID = '1337'
process.env.SWARM_CLI_BZZ_ADDRESS = '0x5FbDB2315678afecb367f032d93F642f64180aa3'

const sourceWallet = Wallet.createRandom()
const targetWallet = Wallet.createRandom()
Expand Down
6 changes: 3 additions & 3 deletions test/command/stamp.spec.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { BatchId, Bee } from '@ethersphere/bee-js'
import { Types } from 'cafe-utility'
import { randomBytes } from 'crypto'
import inquirer from 'inquirer'
import { Buy } from '../../src/command/stamp/buy'
import { toMatchLinesInOrder } from '../custom-matcher'
import { describeCommand, invokeTestCli } from '../utility'
import { BatchId, Bee } from '@ethersphere/bee-js'
import { randomBytes } from 'crypto'

expect.extend({
toMatchLinesInOrder,
Expand Down Expand Up @@ -105,7 +105,7 @@ describeCommand(
})

it('should print custom message when there are no stamps', async () => {
await invokeTestCli(['stamp', 'list', '--bee-api-url', 'http://localhost:11633'])
await invokeTestCli(['stamp', 'list', '--bee-api-url', 'http://localhost:21633'])
expect(getNthLastMessage(4)).toContain('You do not have any stamps.')
})

Expand Down
Loading