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';1/* broken by design2import chai from 'chai';2// substrate transactions are sequential, not parallel3import chaiAsPromised from 'chai-as-promised';3// the order of execution is indeterminate4import privateKey from '../substrate/privateKey';45import usingApi, { submitTransactionAsync, submitTransactionExpectFailAsync } from '../substrate/substrate-api';5import { IKeyringPair } from '@polkadot/types/types';6import {6import chai from 'chai';7 createCollectionExpectSuccess,7import chaiAsPromised from 'chai-as-promised';8 normalizeAccountId,8import privateKey from '../substrate/privateKey';9 waitNewBlocks,9import usingApi, { submitTransactionAsync, submitTransactionExpectFailAsync } from '../substrate/substrate-api';10} from '../util/helpers';10import {1111 createCollectionExpectSuccess,12chai.use(chaiAsPromised);12 normalizeAccountId,13const expect = chai.expect;13 waitNewBlocks,14let Alice: IKeyringPair;14} from '../util/helpers';15let Bob: IKeyringPair;1516let Ferdie: IKeyringPair;16chai.use(chaiAsPromised);17let Charlie: IKeyringPair;17const expect = chai.expect;18let Eve: IKeyringPair;18let Alice: IKeyringPair;19let Dave: IKeyringPair;19let Bob: IKeyringPair;2020let Ferdie: IKeyringPair;21before(async () => {21let Charlie: IKeyringPair;22 await usingApi(async () => {22let Eve: IKeyringPair;23 Alice = privateKey('//Alice');23let Dave: IKeyringPair;24 Bob = privateKey('//Bob');2425 Ferdie = privateKey('//Ferdie');25before(async () => {26 Charlie = privateKey('//Charlie');26 await usingApi(async () => {27 Eve = privateKey('//Eve');27 Alice = privateKey('//Alice');28 Dave = privateKey('//Dave');28 Bob = privateKey('//Bob');29 });29 Ferdie = privateKey('//Ferdie');30});30 Charlie = privateKey('//Charlie');3131 Eve = privateKey('//Eve');32describe('Admin limit exceeded collection: ', () => {32 Dave = privateKey('//Dave');33 // tslint:disable-next-line: max-line-length33 });34 it('In one block, the owner and admin add new admins to the collection more than the limit ', async () => {34});35 await usingApi(async (api) => {3536 const collectionId = await createCollectionExpectSuccess();36describe('Admin limit exceeded collection: ', () => {3737 // tslint:disable-next-line: max-line-length38 const chainAdminLimit = (api.consts.nft.collectionAdminsLimit as any).toNumber();38 it('In one block, the owner and admin add new admins to the collection more than the limit ', async () => {39 expect(chainAdminLimit).to.be.equal(5);39 await usingApi(async (api) => {4040 const collectionId = await createCollectionExpectSuccess();41 const changeAdminTx1 = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Eve.address));4142 await submitTransactionAsync(Alice, changeAdminTx1);42 const chainAdminLimit = (api.consts.nft.collectionAdminsLimit as any).toNumber();43 const changeAdminTx2 = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Dave.address));43 expect(chainAdminLimit).to.be.equal(5);44 await submitTransactionAsync(Alice, changeAdminTx2);4445 const changeAdminTx3 = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Bob.address));45 const changeAdminTx1 = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Eve.address));46 await submitTransactionAsync(Alice, changeAdminTx3);46 await submitTransactionAsync(Alice, changeAdminTx1);4747 const changeAdminTx2 = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Dave.address));48 const addAdmOne = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Ferdie.address));48 await submitTransactionAsync(Alice, changeAdminTx2);49 const addAdmTwo = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Charlie.address));49 const changeAdminTx3 = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Bob.address));50 await Promise.all([50 await submitTransactionAsync(Alice, changeAdminTx3);51 addAdmOne.signAndSend(Bob),5152 addAdmTwo.signAndSend(Alice),52 const addAdmOne = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Ferdie.address));53 ]);53 const addAdmTwo = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Charlie.address));54 await waitNewBlocks(2);54 await Promise.all([55 const changeAdminTx4 = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Alice.address));55 addAdmOne.signAndSend(Bob),56 await expect(submitTransactionExpectFailAsync(Alice, changeAdminTx4)).to.be.rejected;56 addAdmTwo.signAndSend(Alice),5757 ]);58 const adminListAfterAddAdmin: any = (await api.query.nft.adminList(collectionId));58 await waitNewBlocks(2);59 expect(adminListAfterAddAdmin).to.be.contains(normalizeAccountId(Eve.address));59 const changeAdminTx4 = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Alice.address));60 expect(adminListAfterAddAdmin).to.be.contains(normalizeAccountId(Ferdie.address));60 await expect(submitTransactionExpectFailAsync(Alice, changeAdminTx4)).to.be.rejected;61 expect(adminListAfterAddAdmin).not.to.be.contains(normalizeAccountId(Alice.address));6162 await waitNewBlocks(2);62 const adminListAfterAddAdmin: any = (await api.query.nft.adminList(collectionId));63 });63 expect(adminListAfterAddAdmin).to.be.contains(normalizeAccountId(Eve.address));64 });64 expect(adminListAfterAddAdmin).to.be.contains(normalizeAccountId(Ferdie.address));65});65 expect(adminListAfterAddAdmin).not.to.be.contains(normalizeAccountId(Alice.address));6666 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