git.delta.rocks / unique-network / refs/commits / 9ddec87093e6

difftreelog

turn off collision-tests

Igor Kozyrev2021-11-08parent: #b1a1af7.patch.diff
in: master

10 files changed

modifiedtests/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
modifiedtests/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
modifiedtests/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
modifiedtests/src/collision-tests/adminDestroyCollection.test.tsdiffbeforeafterboth
1import { IKeyringPair } from '@polkadot/types/types';1/* broken by design
2import chai from 'chai';2// substrate transactions are sequential, not parallel
3import chaiAsPromised from 'chai-as-promised';3// the order of execution is indeterminate
4import privateKey from '../substrate/privateKey';4
5import usingApi, { submitTransactionAsync } 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 } 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;15
16let Ferdie: IKeyringPair;16chai.use(chaiAsPromised);
1717const expect = chai.expect;
18before(async () => {18let Alice: IKeyringPair;
19 await usingApi(async () => {19let Bob: IKeyringPair;
20 Alice = privateKey('//Alice');20let Ferdie: IKeyringPair;
21 Bob = privateKey('//Bob');21
22 Ferdie = privateKey('//Ferdie');22before(async () => {
23 });23 await usingApi(async () => {
24});24 Alice = privateKey('//Alice');
2525 Bob = privateKey('//Bob');
26describe('Deleting a collection while add address to whitelist: ', () => {26 Ferdie = privateKey('//Ferdie');
27 // tslint:disable-next-line: max-line-length27 });
28 it('Adding an address to the collection whitelist in a block by the admin, and deleting the collection by the owner ', async () => {28});
29 await usingApi(async (api) => {29
30 const collectionId = await createCollectionExpectSuccess();30describe('Deleting a collection while add address to whitelist: ', () => {
31 const changeAdminTx = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Bob.address));31 // tslint:disable-next-line: max-line-length
32 await submitTransactionAsync(Alice, changeAdminTx);32 it('Adding an address to the collection whitelist in a block by the admin, and deleting the collection by the owner ', async () => {
33 await waitNewBlocks(1);33 await usingApi(async (api) => {
34 //34 const collectionId = await createCollectionExpectSuccess();
35 const addWhitelistAdm = api.tx.nft.addToWhiteList(collectionId, normalizeAccountId(Ferdie.address));35 const changeAdminTx = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Bob.address));
36 const destroyCollection = api.tx.nft.destroyCollection(collectionId);36 await submitTransactionAsync(Alice, changeAdminTx);
37 await Promise.all([37 await waitNewBlocks(1);
38 addWhitelistAdm.signAndSend(Bob),38 //
39 destroyCollection.signAndSend(Alice),39 const addWhitelistAdm = api.tx.nft.addToWhiteList(collectionId, normalizeAccountId(Ferdie.address));
40 ]);40 const destroyCollection = api.tx.nft.destroyCollection(collectionId);
41 await waitNewBlocks(1);41 await Promise.all([
42 let whiteList = false;42 addWhitelistAdm.signAndSend(Bob),
43 whiteList = (await api.query.nft.whiteList(collectionId, Ferdie.address)).toJSON() as boolean;43 destroyCollection.signAndSend(Alice),
44 // tslint:disable-next-line: no-unused-expression44 ]);
45 expect(whiteList).to.be.false;45 await waitNewBlocks(1);
46 await waitNewBlocks(2);46 let whiteList = false;
47 });47 whiteList = (await api.query.nft.whiteList(collectionId, Ferdie.address)).toJSON() as boolean;
48 });48 // tslint:disable-next-line: no-unused-expression
49});49 expect(whiteList).to.be.false;
5050 await waitNewBlocks(2);
51 });
52 });
53});
54*/
modifiedtests/src/collision-tests/adminLimitsOff.test.tsdiffbeforeafterboth
--- a/tests/src/collision-tests/adminLimitsOff.test.ts
+++ b/tests/src/collision-tests/adminLimitsOff.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';
@@ -63,3 +67,4 @@
     });
   });
 });
+*/
\ No newline at end of file
modifiedtests/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
modifiedtests/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
modifiedtests/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
modifiedtests/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';
modifiedtests/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