Skip to content

Commit

Permalink
fix: integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eruizgar91 committed Oct 25, 2023
1 parent 4006f6d commit 97e055d
Show file tree
Hide file tree
Showing 28 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions integration/nevermined/AgreementStoreManager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ describe('Agreement Store Manager', () => {

before(async () => {
nevermined = await Nevermined.getInstance(config)
await nevermined.keeper.loadDispenserAndTokenInstances()

// Accounts
;[account1, account2] = await nevermined.accounts.list()
Expand Down
2 changes: 2 additions & 0 deletions integration/nevermined/Assets.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ let ddoBefore: DDO
describe('Assets', () => {
before(async () => {
nevermined = await Nevermined.getInstance(config)
await nevermined.keeper.loadDispenserAndTokenInstances()

// Accounts
;[publisher] = await nevermined.accounts.list()

Expand Down
2 changes: 2 additions & 0 deletions integration/nevermined/AssetsPriceQuery.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ describe('Assets Query by Price', () => {

before(async () => {
nevermined = await Nevermined.getInstance(config)
await nevermined.keeper.loadDispenserAndTokenInstances()

token = await nevermined.contracts.loadErc20(nevermined.utils.token.getAddress())

price1 = parseUnits('2', await token.decimals())
Expand Down
1 change: 1 addition & 0 deletions integration/nevermined/AssetsWithMultipleServices.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const totalAmount2 = '350'
describe('Assets with multiple services', () => {
before(async () => {
nevermined = await Nevermined.getInstance(config)
await nevermined.keeper.loadDispenserAndTokenInstances()
;({ token } = nevermined.keeper)
// Accounts
;[publisher, consumer] = await nevermined.accounts.list()
Expand Down
1 change: 1 addition & 0 deletions integration/nevermined/Bookmarks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ describe('Bookmarks', () => {
config.marketplaceAuthToken = undefined

nevermined = await Nevermined.getInstance(config)
await nevermined.keeper.loadDispenserAndTokenInstances()
;[account1] = await nevermined.accounts.list()

const clientAssertion = await nevermined.utils.jwt.generateClientAssertion(account1)
Expand Down
1 change: 1 addition & 0 deletions integration/nevermined/ConsumeAsset.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ describe('Consume Asset', () => {

before(async () => {
nevermined = await Nevermined.getInstance(config)
await nevermined.keeper.loadDispenserAndTokenInstances()

// Accounts
;[publisher, consumer] = await nevermined.accounts.list()
Expand Down
1 change: 1 addition & 0 deletions integration/nevermined/ContractEvent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ describe('ContractEvent', () => {

before(async () => {
nevermined = await Nevermined.getInstance({ ...config, graphHttpUri: undefined })
await nevermined.keeper.loadDispenserAndTokenInstances()
;[account] = await nevermined.accounts.list()
await nevermined.keeper.loadDispenserAndTokenInstances()

Expand Down
1 change: 1 addition & 0 deletions integration/nevermined/Credits.e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ describe('Credit Subscriptions using NFT ERC-1155 End-to-End', () => {
TestContractHandler.setConfig(config)

nevermined = await Nevermined.getInstance(config)
await nevermined.keeper.loadDispenserAndTokenInstances()
;[, editor, subscriber, , reseller] = await nevermined.accounts.list()

const clientAssertion = await nevermined.utils.jwt.generateClientAssertion(editor)
Expand Down
1 change: 1 addition & 0 deletions integration/nevermined/CreditsWithDuration.e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ describe('Credit and Duration Subscriptions with Multiple services using NFT ERC
TestContractHandler.setConfig(config)

nevermined = await Nevermined.getInstance(config)
await nevermined.keeper.loadDispenserAndTokenInstances()
;[, editor, subscriber, , reseller] = await nevermined.accounts.list()

const clientAssertion = await nevermined.utils.jwt.generateClientAssertion(editor)
Expand Down
1 change: 1 addition & 0 deletions integration/nevermined/CustomToken.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ describe('CustomToken', () => {

before(async () => {
nevermined = await Nevermined.getInstance(config)
await nevermined.keeper.loadDispenserAndTokenInstances()
;[account] = await nevermined.accounts.list()
erc20TokenAddress = process.env.TOKEN_ADDRESS || nevermined.utils.token.getAddress()
})
Expand Down
1 change: 1 addition & 0 deletions integration/nevermined/DDO.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ describe('DDO Tests', () => {

before(async () => {
nevermined = await Nevermined.getInstance(config)
await nevermined.keeper.loadDispenserAndTokenInstances()
;[publisher] = await nevermined.accounts.list()

const clientAssertion = await nevermined.utils.jwt.generateClientAssertion(publisher)
Expand Down
2 changes: 2 additions & 0 deletions integration/nevermined/MetaTx.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ describe.skip('MetaTx test with nfts', () => {

before(async () => {
nevermined = await Nevermined.getInstance(config)
await nevermined.keeper.loadDispenserAndTokenInstances()

wallets = makeAccounts(process.env.SEED_WORDS)

// Accounts
Expand Down
1 change: 1 addition & 0 deletions integration/nevermined/NFT.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ describe('Nfts operations', () => {

before(async () => {
nevermined = await Nevermined.getInstance(config)
await nevermined.keeper.loadDispenserAndTokenInstances()

// Accounts
;[artist, collector] = await nevermined.accounts.list()
Expand Down
1 change: 1 addition & 0 deletions integration/nevermined/NFT1155.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ describe('NFT1155 End-to-End', () => {

before(async () => {
nevermined = await Nevermined.getInstance(config)
await nevermined.keeper.loadDispenserAndTokenInstances()
;[deployer, publisher, someone, minter, ,] = await nevermined.accounts.list()
;({ token, nftUpgradeable } = nevermined.keeper)

Expand Down
1 change: 1 addition & 0 deletions integration/nevermined/NFT1155Api.e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ function makeTest(isCustom) {

before(async () => {
nevermined = await Nevermined.getInstance(config)
await nevermined.keeper.loadDispenserAndTokenInstances()
;[, artist, collector1, collector2, , gallery] = await nevermined.accounts.list()
const clientAssertion = await nevermined.utils.jwt.generateClientAssertion(artist)

Expand Down
1 change: 1 addition & 0 deletions integration/nevermined/NFT721.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ describe('Nfts721 operations', async () => {

before(async () => {
nevermined = await Nevermined.getInstance(config)
await nevermined.keeper.loadDispenserAndTokenInstances()

// Accounts
;[deployer, artist, collector] = await nevermined.accounts.list()
Expand Down
1 change: 1 addition & 0 deletions integration/nevermined/NFT721Api.e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ describe('NFTs721 Api End-to-End', () => {

before(async () => {
nevermined = await Nevermined.getInstance(config)
await nevermined.keeper.loadDispenserAndTokenInstances()
;[, artist, collector1, , gallery] = await nevermined.accounts.list()

const networkName = await nevermined.keeper.getNetworkName()
Expand Down
1 change: 1 addition & 0 deletions integration/nevermined/NFT721Templates.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ describe('NFT721Templates E2E', () => {

before(async () => {
nevermined = await Nevermined.getInstance(config)
await nevermined.keeper.loadDispenserAndTokenInstances()
;[owner, artist, collector1, collector2, gallery] = await nevermined.accounts.list()

const networkName = await nevermined.keeper.getNetworkName()
Expand Down
1 change: 1 addition & 0 deletions integration/nevermined/NFTTemplates.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ describe('NFTTemplates E2E', () => {

before(async () => {
nevermined = await Nevermined.getInstance(config)
await nevermined.keeper.loadDispenserAndTokenInstances()
;[owner, artist, collector1, collector2, gallery] = await nevermined.accounts.list()

receivers = [artist.getId(), gallery.getId()]
Expand Down
1 change: 1 addition & 0 deletions integration/nevermined/NFTTemplatesWithEther.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ describe('NFTTemplates With Ether E2E', async () => {

before(async () => {
nevermined = await Nevermined.getInstance(config)
await nevermined.keeper.loadDispenserAndTokenInstances()
;[sender, artist, collector1, collector2, gallery, , , , , governor] =
await nevermined.accounts.list()

Expand Down
1 change: 1 addition & 0 deletions integration/nevermined/NFTsWithMultipleServices.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const totalAmount2 = '150'
describe('E2E Flow for NFTs with multiple services', () => {
before(async () => {
nevermined = await Nevermined.getInstance(config)
await nevermined.keeper.loadDispenserAndTokenInstances()
;({ token } = nevermined.keeper)
// Accounts
;[publisher, collector1] = await nevermined.accounts.list()
Expand Down
1 change: 1 addition & 0 deletions integration/nevermined/NVMAppFlows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ describe('NVM App main flows using Credit NFTs (ERC-1155)', () => {
TestContractHandler.setConfig(config)

nevermined = await Nevermined.getInstance(config)
await nevermined.keeper.loadDispenserAndTokenInstances()
;[, publisher, subscriber, , reseller] = await nevermined.accounts.list()

const clientAssertion = await nevermined.utils.jwt.generateClientAssertion(publisher)
Expand Down
2 changes: 2 additions & 0 deletions integration/nevermined/Poap.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ describe('POAPs with Assets', () => {

before(async () => {
nevermined = await Nevermined.getInstance(config)
await nevermined.keeper.loadDispenserAndTokenInstances()

gatewayAddress = await nevermined.services.node.getProviderAddress()
;[editor, user] = await nevermined.accounts.list()

Expand Down
1 change: 1 addition & 0 deletions integration/nevermined/RegisterAccessTemplate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ describe('Register Escrow Access Template', () => {

before(async () => {
nevermined = await Nevermined.getInstance(config)
await nevermined.keeper.loadDispenserAndTokenInstances()
;({ keeper } = nevermined)
;({ accessTemplate } = keeper.templates)
;({ token } = keeper)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ describe('Register Escrow Compute Execution Template', () => {

before(async () => {
nevermined = await Nevermined.getInstance(config)
await nevermined.keeper.loadDispenserAndTokenInstances()
;({ keeper } = nevermined)
;({ escrowComputeExecutionTemplate } = keeper.templates)
;({ token } = keeper)
Expand Down
1 change: 1 addition & 0 deletions integration/nevermined/SecondaryMarket.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ describe('Secondary Markets', () => {

before(async () => {
nevermined = await Nevermined.getInstance(config)
await nevermined.keeper.loadDispenserAndTokenInstances()
;[owner, artist, collector1, collector2, gallery] = await nevermined.accounts.list()

receivers = [artist.getId(), gallery.getId()]
Expand Down
1 change: 1 addition & 0 deletions integration/nevermined/SubscriptionDuration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ describe('Subscription Durations', () => {
before(async () => {
TestContractHandler.setConfig(config)
nevermined = await Nevermined.getInstance(config)
await nevermined.keeper.loadDispenserAndTokenInstances()
;[publisher, subscriber] = await nevermined.accounts.list()

const clientAssertion = await nevermined.utils.jwt.generateClientAssertion(publisher)
Expand Down
1 change: 1 addition & 0 deletions integration/nevermined/Subscriptions.e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ describe('Subscriptions using NFT ERC-721 End-to-End', () => {
TestContractHandler.setConfig(config)

nevermined = await Nevermined.getInstance(config)
await nevermined.keeper.loadDispenserAndTokenInstances()
;[, editor, subscriber, , reseller] = await nevermined.accounts.list()

const clientAssertion = await nevermined.utils.jwt.generateClientAssertion(editor)
Expand Down

0 comments on commit 97e055d

Please sign in to comment.