Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing problem with external test because contracts permissions missing #607

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1310,7 +1310,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

> 2 May 2022

- add aave service agreement to ddo when creating nft721 asset [`#248`](https://github.com/nevermined-io/sdk-js/pull/248)
- add aave service agreement to ddo when creating nft721 asset [`#248`](https://github.com/nevermined-io/sdk-js/pull/248)
- Adding v0.19.21 Changelog updates [`c93cdc5`](https://github.com/nevermined-io/sdk-js/commit/c93cdc55f139a43db4130ccb0f80924d2645a931)

#### [v0.19.21](https://github.com/nevermined-io/sdk-js/compare/v0.19.20...v0.19.21)
Expand Down Expand Up @@ -1573,7 +1573,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

> 18 January 2022

- Removing not used parameter [`#186`](https://github.com/nevermined-io/sdk-js/pull/186)
- Removing not used parameter [`#186`](https://github.com/nevermined-io/sdk-js/pull/186)
- [wip] Create agreement+pay in one transaction [`#183`](https://github.com/nevermined-io/sdk-js/pull/183)
- Adapting to contracts `v1.3.3` [`#177`](https://github.com/nevermined-io/sdk-js/pull/177)
- Adding v0.17.2 Changelog updates [`5eddda4`](https://github.com/nevermined-io/sdk-js/commit/5eddda43954e013e6e6f7344c9a877d801aacb5c)
Expand Down Expand Up @@ -2079,7 +2079,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- Feature/sync develop [`#268`](https://github.com/nevermined-io/sdk-js/pull/268)
- Quick fix for non-eip1559 networks [`#266`](https://github.com/nevermined-io/sdk-js/pull/266)
- integrate Permissions and refactor search query [`#264`](https://github.com/nevermined-io/sdk-js/pull/264)
- add aave service agreement to ddo when creating nft721 asset [`#248`](https://github.com/nevermined-io/sdk-js/pull/248)
- add aave service agreement to ddo when creating nft721 asset [`#248`](https://github.com/nevermined-io/sdk-js/pull/248)
- Get the keeper version from the artifacts instead of package version [`#244`](https://github.com/nevermined-io/sdk-js/pull/244)
- replace `metadata-api` url by `marketplace-api` and sort type [`#243`](https://github.com/nevermined-io/sdk-js/pull/243)
- fixing issues with BigNumbers [`#246`](https://github.com/nevermined-io/sdk-js/pull/246)
Expand Down Expand Up @@ -2118,7 +2118,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- Feature/190 add did to sec markets [`#191`](https://github.com/nevermined-io/sdk-js/pull/191)
- Adding utility methods for getting nft token uri [`#189`](https://github.com/nevermined-io/sdk-js/pull/189)
- Lint ... [`#187`](https://github.com/nevermined-io/sdk-js/pull/187)
- Removing not used parameter [`#186`](https://github.com/nevermined-io/sdk-js/pull/186)
- Removing not used parameter [`#186`](https://github.com/nevermined-io/sdk-js/pull/186)
- [wip] Create agreement+pay in one transaction [`#183`](https://github.com/nevermined-io/sdk-js/pull/183)
- Adapting to contracts `v1.3.3` [`#177`](https://github.com/nevermined-io/sdk-js/pull/177)
- Correct typo in route [`#184`](https://github.com/nevermined-io/sdk-js/pull/184)
Expand Down
6 changes: 6 additions & 0 deletions integration/external/Services_NFT1155.e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ describe('Gate-keeping of Web Services using NFT ERC-1155 End-to-End', () => {
console.log(` AUTHORIZATION_PASSWORD=${AUTHORIZATION_PASSWORD}`)
}
console.log(` REQUEST_DATA=${process.env.REQUEST_DATA}`)
console.log(` NODE_ADDRESS=${neverminedNodeAddress}`)
console.log(` PUBLISHER_ADDRESS=${publisher.getId()}`)
console.log(` SUBSCRIBER_ADDRESS=${subscriber.getId()}`)
})

describe('As Subscriber I want to get access to a web service I am not subscribed', () => {
Expand Down Expand Up @@ -202,6 +205,7 @@ describe('Gate-keeping of Web Services using NFT ERC-1155 End-to-End', () => {
await nevermined.contracts.loadNft1155(subscriptionNFT.address)

await subscriptionNFT.grantOperatorRole(transferNftCondition.address, publisher)
await subscriptionNFT.grantOperatorRole(neverminedNodeAddress, publisher)

const isOperator = await subscriptionNFT.getContract.isOperator(transferNftCondition.address)
assert.isTrue(isOperator)
Expand Down Expand Up @@ -537,6 +541,7 @@ describe('Gate-keeping of Web Services using NFT ERC-1155 End-to-End', () => {
it('should be able to retrieve services associated with a subscription filtering by endpoints', async () => {
const result = await nevermined.search.servicesBySubscription(
subscriptionDDO.id,
NeverminedNFT1155Type.nft1155Credit,
endpointsFilter,
)
assert.equal(result.totalResults.value, 1)
Expand All @@ -553,6 +558,7 @@ describe('Gate-keeping of Web Services using NFT ERC-1155 End-to-End', () => {
it('should not be able to retrieve any services associated with a subscription filtering by endpoints which do not exist', async () => {
const result = await nevermined.search.servicesBySubscription(
subscriptionDDO.id,
NeverminedNFT1155Type.nft1155Credit,
endpointsFilter2,
)
assert.equal(result.totalResults.value, 0)
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"integration:e2e:mumbai": "export NETWORK_NAME=mumbai; yarn integration:e2e",
"integration:compute": "mocha --config integration/.mocharc.json ./integration/compute/Compute*.test.ts",
"integration:external": "mocha --config integration/.mocharc.json ./integration/external/*.test.ts",
"integration:external-services": "mocha --config integration/.mocharc.json integration/external/Services_NFT1155.e2e.test.ts",
"clean": "rm -rf ./dist/ ./doc/ ./.nyc_output",
"lint": "eslint ./",
"lint:fix": "eslint ./ --fix",
Expand Down
Loading