difftreelog
turn off collision-tests
in: master
10 files changed
tests/src/collision-tests/admVsOwnerChanges.test.tsdiffbeforeafterboth--- a/tests/src/collision-tests/admVsOwnerChanges.test.ts
+++ b/tests/src/collision-tests/admVsOwnerChanges.test.ts
@@ -1,3 +1,7 @@
+/* broken by design
+// substrate transactions are sequential, not parallel
+// the order of execution is indeterminate
+
import { IKeyringPair } from '@polkadot/types/types';
import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
@@ -50,3 +54,4 @@
});
});
});
+*/
\ No newline at end of file
tests/src/collision-tests/admVsOwnerData.test.tsdiffbeforeafterboth--- a/tests/src/collision-tests/admVsOwnerData.test.ts
+++ b/tests/src/collision-tests/admVsOwnerData.test.ts
@@ -1,3 +1,7 @@
+/* broken by design
+// substrate transactions are sequential, not parallel
+// the order of execution is indeterminate
+
import { IKeyringPair } from '@polkadot/types/types';
import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
@@ -46,3 +50,4 @@
});
});
});
+*/
\ No newline at end of file
tests/src/collision-tests/admVsOwnerTake.test.tsdiffbeforeafterboth--- a/tests/src/collision-tests/admVsOwnerTake.test.ts
+++ b/tests/src/collision-tests/admVsOwnerTake.test.ts
@@ -1,3 +1,7 @@
+/* broken by design
+// substrate transactions are sequential, not parallel
+// the order of execution is indeterminate
+
import { IKeyringPair } from '@polkadot/types/types';
import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
@@ -48,3 +52,4 @@
});
});
});
+*/
\ No newline at end of file
tests/src/collision-tests/adminDestroyCollection.test.tsdiffbeforeafterboth--- a/tests/src/collision-tests/adminDestroyCollection.test.ts
+++ b/tests/src/collision-tests/adminDestroyCollection.test.ts
@@ -1,3 +1,7 @@
+/* broken by design
+// substrate transactions are sequential, not parallel
+// the order of execution is indeterminate
+
import { IKeyringPair } from '@polkadot/types/types';
import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
@@ -47,3 +51,4 @@
});
});
});
+*/
\ No newline at end of file
tests/src/collision-tests/adminLimitsOff.test.tsdiffbeforeafterboth1import { IKeyringPair } from '@polkadot/types/types';2import chai from 'chai';3import chaiAsPromised from 'chai-as-promised';4import privateKey from '../substrate/privateKey';5import usingApi, { submitTransactionAsync, submitTransactionExpectFailAsync } from '../substrate/substrate-api';6import {7 createCollectionExpectSuccess,8 normalizeAccountId,9 waitNewBlocks,10} from '../util/helpers';1112chai.use(chaiAsPromised);13const expect = chai.expect;14let Alice: IKeyringPair;15let Bob: IKeyringPair;16let Ferdie: IKeyringPair;17let Charlie: IKeyringPair;18let Eve: IKeyringPair;19let Dave: IKeyringPair;2021before(async () => {22 await usingApi(async () => {23 Alice = privateKey('//Alice');24 Bob = privateKey('//Bob');25 Ferdie = privateKey('//Ferdie');26 Charlie = privateKey('//Charlie');27 Eve = privateKey('//Eve');28 Dave = privateKey('//Dave');29 });30});3132describe('Admin limit exceeded collection: ', () => {33 // tslint:disable-next-line: max-line-length34 it('In one block, the owner and admin add new admins to the collection more than the limit ', async () => {35 await usingApi(async (api) => {36 const collectionId = await createCollectionExpectSuccess();3738 const chainAdminLimit = (api.consts.nft.collectionAdminsLimit as any).toNumber();39 expect(chainAdminLimit).to.be.equal(5);4041 const changeAdminTx1 = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Eve.address));42 await submitTransactionAsync(Alice, changeAdminTx1);43 const changeAdminTx2 = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Dave.address));44 await submitTransactionAsync(Alice, changeAdminTx2);45 const changeAdminTx3 = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Bob.address));46 await submitTransactionAsync(Alice, changeAdminTx3);4748 const addAdmOne = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Ferdie.address));49 const addAdmTwo = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Charlie.address));50 await Promise.all([51 addAdmOne.signAndSend(Bob),52 addAdmTwo.signAndSend(Alice),53 ]);54 await waitNewBlocks(2);55 const changeAdminTx4 = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Alice.address));56 await expect(submitTransactionExpectFailAsync(Alice, changeAdminTx4)).to.be.rejected;5758 const adminListAfterAddAdmin: any = (await api.query.nft.adminList(collectionId));59 expect(adminListAfterAddAdmin).to.be.contains(normalizeAccountId(Eve.address));60 expect(adminListAfterAddAdmin).to.be.contains(normalizeAccountId(Ferdie.address));61 expect(adminListAfterAddAdmin).not.to.be.contains(normalizeAccountId(Alice.address));62 await waitNewBlocks(2);63 });64 });65});1/* broken by design2// substrate transactions are sequential, not parallel3// the order of execution is indeterminate45import { IKeyringPair } from '@polkadot/types/types';6import chai from 'chai';7import chaiAsPromised from 'chai-as-promised';8import privateKey from '../substrate/privateKey';9import usingApi, { submitTransactionAsync, submitTransactionExpectFailAsync } from '../substrate/substrate-api';10import {11 createCollectionExpectSuccess,12 normalizeAccountId,13 waitNewBlocks,14} from '../util/helpers';1516chai.use(chaiAsPromised);17const expect = chai.expect;18let Alice: IKeyringPair;19let Bob: IKeyringPair;20let Ferdie: IKeyringPair;21let Charlie: IKeyringPair;22let Eve: IKeyringPair;23let Dave: IKeyringPair;2425before(async () => {26 await usingApi(async () => {27 Alice = privateKey('//Alice');28 Bob = privateKey('//Bob');29 Ferdie = privateKey('//Ferdie');30 Charlie = privateKey('//Charlie');31 Eve = privateKey('//Eve');32 Dave = privateKey('//Dave');33 });34});3536describe('Admin limit exceeded collection: ', () => {37 // tslint:disable-next-line: max-line-length38 it('In one block, the owner and admin add new admins to the collection more than the limit ', async () => {39 await usingApi(async (api) => {40 const collectionId = await createCollectionExpectSuccess();4142 const chainAdminLimit = (api.consts.nft.collectionAdminsLimit as any).toNumber();43 expect(chainAdminLimit).to.be.equal(5);4445 const changeAdminTx1 = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Eve.address));46 await submitTransactionAsync(Alice, changeAdminTx1);47 const changeAdminTx2 = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Dave.address));48 await submitTransactionAsync(Alice, changeAdminTx2);49 const changeAdminTx3 = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Bob.address));50 await submitTransactionAsync(Alice, changeAdminTx3);5152 const addAdmOne = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Ferdie.address));53 const addAdmTwo = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Charlie.address));54 await Promise.all([55 addAdmOne.signAndSend(Bob),56 addAdmTwo.signAndSend(Alice),57 ]);58 await waitNewBlocks(2);59 const changeAdminTx4 = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Alice.address));60 await expect(submitTransactionExpectFailAsync(Alice, changeAdminTx4)).to.be.rejected;6162 const adminListAfterAddAdmin: any = (await api.query.nft.adminList(collectionId));63 expect(adminListAfterAddAdmin).to.be.contains(normalizeAccountId(Eve.address));64 expect(adminListAfterAddAdmin).to.be.contains(normalizeAccountId(Ferdie.address));65 expect(adminListAfterAddAdmin).not.to.be.contains(normalizeAccountId(Alice.address));66 await waitNewBlocks(2);67 });68 });69});70*/tests/src/collision-tests/adminRightsOff.test.tsdiffbeforeafterboth--- a/tests/src/collision-tests/adminRightsOff.test.ts
+++ b/tests/src/collision-tests/adminRightsOff.test.ts
@@ -1,4 +1,6 @@
-/* obsolete
+/* broken by design
+// substrate transactions are sequential, not parallel
+// the order of execution is indeterminate
import { IKeyringPair } from '@polkadot/types/types';
import BN from 'bn.js';
@@ -48,5 +50,4 @@
});
});
});
-
*/
\ No newline at end of file
tests/src/collision-tests/setSponsorNewOwner.test.tsdiffbeforeafterboth--- a/tests/src/collision-tests/setSponsorNewOwner.test.ts
+++ b/tests/src/collision-tests/setSponsorNewOwner.test.ts
@@ -1,3 +1,7 @@
+/* broken by design
+// substrate transactions are sequential, not parallel
+// the order of execution is indeterminate
+
import { IKeyringPair } from '@polkadot/types/types';
import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
@@ -44,3 +48,4 @@
});
});
});
+*/
\ No newline at end of file
tests/src/collision-tests/sponsorPayments.test.tsdiffbeforeafterboth--- a/tests/src/collision-tests/sponsorPayments.test.ts
+++ b/tests/src/collision-tests/sponsorPayments.test.ts
@@ -1,3 +1,7 @@
+/* broken by design
+// substrate transactions are sequential, not parallel
+// the order of execution is indeterminate
+
import { IKeyringPair } from '@polkadot/types/types';
import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
@@ -53,3 +57,4 @@
});
});
});
+*/
\ No newline at end of file
tests/src/collision-tests/tokenLimitsOff.test.tsdiffbeforeafterboth--- a/tests/src/collision-tests/tokenLimitsOff.test.ts
+++ b/tests/src/collision-tests/tokenLimitsOff.test.ts
@@ -1,4 +1,7 @@
-/* obsolete
+/* broken by design
+// substrate transactions are sequential, not parallel
+// the order of execution is indeterminate
+
import { IKeyringPair } from '@polkadot/types/types';
import BN from 'bn.js';
import chai from 'chai';
tests/src/collision-tests/turnsOffMinting.test.tsdiffbeforeafterboth--- a/tests/src/collision-tests/turnsOffMinting.test.ts
+++ b/tests/src/collision-tests/turnsOffMinting.test.ts
@@ -1,3 +1,7 @@
+/* broken by design
+// substrate transactions are sequential, not parallel
+// the order of execution is indeterminate
+
import { IKeyringPair } from '@polkadot/types/types';
import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
@@ -45,3 +49,4 @@
});
});
});
+*/
\ No newline at end of file