Skip to content

Conversation

@gleb-urvanov
Copy link
Contributor

PR for #1005

@gleb-urvanov gleb-urvanov added iznik-release network-integration-test End-to-end full network integration test labels Jul 29, 2020
@gleb-urvanov gleb-urvanov requested a review from mnaamani July 29, 2020 11:49
@gleb-urvanov gleb-urvanov changed the base branch from nicaea to iznik July 30, 2020 10:52
true
)

// Assertions
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For these assertions to really be useful, I think we should have also checked the same at the start of the runner.

@mnaamani
Copy link
Member

mnaamani commented Aug 4, 2020

Nice work with this refactoring.
Some general points about the Fixtures.
Sometimes we pass the sudo keypair which is only used as a source of funds. In other cases we need to actually execute a sudo transaction. It might be better for clarity to give a better name to the arguments to reflect the actual use case.
The arguments m1Keys and m2Keys is loosing its meaning inside the fixture, maybe it would be better to give them better names like councilMemberKeys, otherMemberKeys. Sometimes you don't even need to send all keypairs depending on the fixture. Try to send as few arguments as possible really.
The getResult() method on the fixtures is very general, it might be better to give a name like getCreatedProposalId() for example for fixtures that create a proposal, which gives more clarity in the code of the Tests.

I tried running the test: yarn debug but got:

MokoBook:network-tests mokhtar$ yarn debug
yarn run v1.22.4
$ tap --files src/iznik/tests/workingGroup/*Test.ts -T
Error: EACCES: permission denied, unlink '/Users/mokhtar/joystream/joystream/tests/network-tests/.nyc_output/29dc554b-bc22-4202-a783-3b9faafd7bb8.json'
    at Object.unlinkSync (fs.js:1136:3)

Could you merge iznik again into your branch again.

@mnaamani
Copy link
Member

mnaamani commented Aug 5, 2020

I had to delete the .nyc_output with sudo permissions because it was leftover from last run using ansible

But now I get error running tests:

yarn run v1.22.4
$ tap --files src/iznik/tests/workingGroup/*Test.ts -T
src/iznik/tests/workingGroup/manageWorkerAsLeadTest.ts 2> Unknown types found, no types for Membership
 FAIL  src/iznik/tests/workingGroup/manageWorkerAsLeadTest.ts
 ✖ terms.unwrap is not a function

import { ApiPromise, WsProvider } from '@polkadot/api'
import { Option, Vec, Bytes, u32 } from '@polkadot/types'
import { Codec } from '@polkadot/types/types'

  test: Creating a set of members
  stack: >
    src/iznik/utils/apiWrapper.ts:1:55554

    BuyMembershipHappyCaseFixture.runner (src/iznik/tests/fixtures/membershipModule.ts:2:43)
  at:
    line: 1
    column: 55554
    file: src/iznik/utils/apiWrapper.ts
  type: TypeError
  tapCaught: returnedPromiseRejection

@mnaamani
Copy link
Member

mnaamani commented Aug 5, 2020

I had to delete the .nyc_output with sudo permissions because it was leftover from last run using ansible

But now I get error running tests:

yarn run v1.22.4
$ tap --files src/iznik/tests/workingGroup/*Test.ts -T
src/iznik/tests/workingGroup/manageWorkerAsLeadTest.ts 2> Unknown types found, no types for Membership
 FAIL  src/iznik/tests/workingGroup/manageWorkerAsLeadTest.ts
 ✖ terms.unwrap is not a function

import { ApiPromise, WsProvider } from '@polkadot/api'
import { Option, Vec, Bytes, u32 } from '@polkadot/types'
import { Codec } from '@polkadot/types/types'

  test: Creating a set of members
  stack: >
    src/iznik/utils/apiWrapper.ts:1:55554

    BuyMembershipHappyCaseFixture.runner (src/iznik/tests/fixtures/membershipModule.ts:2:43)
  at:
    line: 1
    column: 55554
    file: src/iznik/utils/apiWrapper.ts
  type: TypeError
  tapCaught: returnedPromiseRejection

My bad, was running latest runtime with modified runtime membership module..

@mnaamani
Copy link
Member

mnaamani commented Aug 6, 2020

The work in this PR is included in #1091. If so we can close it. @gleb-urvanov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

network-integration-test End-to-end full network integration test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants