Browse Source

linter and prettier errors fixed

Gleb Urvanov 4 years ago
parent
commit
9e43199508

+ 1 - 1
tests/network-tests/package.json

@@ -7,7 +7,7 @@
     "test": "tap --files ts-node/register src/nicaea/tests/proposals/*Test.ts --files ts-node/register src/nicaea/tests/workingGroup/*Test.ts -T",
     "test-migration-constantinople": "tap --files src/rome/tests/romeRuntimeUpgradeTest.ts --files src/constantinople/tests/electingCouncilTest.ts -T",
     "test-migration-nicaea": "tap --files src/constantinople/tests/proposals/updateRuntimeTest.ts --files src/nicaea/tests/electingCouncilTest.ts -T",
-    "debug": "tap --files src/nicaea/tests/proposals/manageLeaderRole.ts -T",
+    "debug": "tap --files ts-node/register src/nicaea/tests/workingGroup/*Test.ts -T",
     "lint": "eslint . --quiet --ext .ts",
     "checks": "yarn lint && tsc --noEmit --pretty && prettier . --check",
     "format": "prettier ./ --write "

+ 11 - 11
tests/network-tests/src/constantinople/tests/impl/electingCouncil.ts

@@ -13,7 +13,7 @@ export function councilTest(
   m1KeyPairs: KeyringPair[],
   m2KeyPairs: KeyringPair[],
   keyring: Keyring,
-  K: number,
+  k: number,
   sudoUri: string,
   greaterStake: BN,
   lesserStake: BN
@@ -38,8 +38,8 @@ export function councilTest(
 
     // First K members stake more
     await apiWrapper.sudoStartAnnouncingPerion(sudo, now.addn(100))
-    await apiWrapper.batchApplyForCouncilElection(m2KeyPairs.slice(0, K), greaterStake)
-    m2KeyPairs.slice(0, K).forEach((keyPair) =>
+    await apiWrapper.batchApplyForCouncilElection(m2KeyPairs.slice(0, k), greaterStake)
+    m2KeyPairs.slice(0, k).forEach((keyPair) =>
       apiWrapper.getCouncilElectionStake(keyPair.address).then((stake) => {
         assert(
           stake.eq(greaterStake),
@@ -49,8 +49,8 @@ export function councilTest(
     )
 
     // Last members stake less
-    await apiWrapper.batchApplyForCouncilElection(m2KeyPairs.slice(K), lesserStake)
-    m2KeyPairs.slice(K).forEach((keyPair) =>
+    await apiWrapper.batchApplyForCouncilElection(m2KeyPairs.slice(k), lesserStake)
+    m2KeyPairs.slice(k).forEach((keyPair) =>
       apiWrapper.getCouncilElectionStake(keyPair.address).then((stake) => {
         assert(
           stake.eq(lesserStake),
@@ -62,17 +62,17 @@ export function councilTest(
     // Voting
     await apiWrapper.sudoStartVotingPerion(sudo, now.addn(100))
     await apiWrapper.batchVoteForCouncilMember(
-      m1KeyPairs.slice(0, K),
-      m2KeyPairs.slice(0, K),
-      salt.slice(0, K),
+      m1KeyPairs.slice(0, k),
+      m2KeyPairs.slice(0, k),
+      salt.slice(0, k),
       lesserStake
     )
-    await apiWrapper.batchVoteForCouncilMember(m1KeyPairs.slice(K), m2KeyPairs.slice(K), salt.slice(K), greaterStake)
+    await apiWrapper.batchVoteForCouncilMember(m1KeyPairs.slice(k), m2KeyPairs.slice(k), salt.slice(k), greaterStake)
 
     // Revealing
     await apiWrapper.sudoStartRevealingPerion(sudo, now.addn(100))
-    await apiWrapper.batchRevealVote(m1KeyPairs.slice(0, K), m2KeyPairs.slice(0, K), salt.slice(0, K))
-    await apiWrapper.batchRevealVote(m1KeyPairs.slice(K), m2KeyPairs.slice(K), salt.slice(K))
+    await apiWrapper.batchRevealVote(m1KeyPairs.slice(0, k), m2KeyPairs.slice(0, k), salt.slice(0, k))
+    await apiWrapper.batchRevealVote(m1KeyPairs.slice(k), m2KeyPairs.slice(k), salt.slice(k))
     now = await apiWrapper.getBestBlock()
 
     // Resolving election

+ 2 - 2
tests/network-tests/src/constantinople/tests/impl/membershipCreation.ts

@@ -10,7 +10,7 @@ export function membershipTest(
   apiWrapper: ApiWrapper,
   nKeyPairs: KeyringPair[],
   keyring: Keyring,
-  N: number,
+  n: number,
   paidTerms: number,
   sudoUri: string
 ) {
@@ -21,7 +21,7 @@ export function membershipTest(
 
   tap.test('Membership creation test setup', async () => {
     sudo = keyring.addFromUri(sudoUri)
-    for (let i = 0; i < N; i++) {
+    for (let i = 0; i < n; i++) {
       nKeyPairs.push(keyring.addFromUri(i + uuid().substring(0, 8)))
     }
     aKeyPair = keyring.addFromUri(uuid().substring(0, 8))

+ 0 - 1
tests/network-tests/src/nicaea/dto/fillOpeningParameters.ts

@@ -1,5 +1,4 @@
 import BN from 'bn.js'
-import { RewardPolicy } from '@nicaea/types/working-group'
 
 export class FillOpeningParameters {
   private amountPerPayout!: BN

+ 11 - 11
tests/network-tests/src/nicaea/tests/impl/electingCouncil.ts

@@ -13,7 +13,7 @@ export function councilTest(
   m1KeyPairs: KeyringPair[],
   m2KeyPairs: KeyringPair[],
   keyring: Keyring,
-  K: number,
+  k: number,
   sudoUri: string,
   greaterStake: BN,
   lesserStake: BN
@@ -38,8 +38,8 @@ export function councilTest(
 
     // First K members stake more
     await apiWrapper.sudoStartAnnouncingPerion(sudo, now.addn(100))
-    await apiWrapper.batchApplyForCouncilElection(m2KeyPairs.slice(0, K), greaterStake)
-    m2KeyPairs.slice(0, K).forEach((keyPair) =>
+    await apiWrapper.batchApplyForCouncilElection(m2KeyPairs.slice(0, k), greaterStake)
+    m2KeyPairs.slice(0, k).forEach((keyPair) =>
       apiWrapper.getCouncilElectionStake(keyPair.address).then((stake) => {
         assert(
           stake.eq(greaterStake),
@@ -49,8 +49,8 @@ export function councilTest(
     )
 
     // Last members stake less
-    await apiWrapper.batchApplyForCouncilElection(m2KeyPairs.slice(K), lesserStake)
-    m2KeyPairs.slice(K).forEach((keyPair) =>
+    await apiWrapper.batchApplyForCouncilElection(m2KeyPairs.slice(k), lesserStake)
+    m2KeyPairs.slice(k).forEach((keyPair) =>
       apiWrapper.getCouncilElectionStake(keyPair.address).then((stake) => {
         assert(
           stake.eq(lesserStake),
@@ -62,17 +62,17 @@ export function councilTest(
     // Voting
     await apiWrapper.sudoStartVotingPerion(sudo, now.addn(100))
     await apiWrapper.batchVoteForCouncilMember(
-      m1KeyPairs.slice(0, K),
-      m2KeyPairs.slice(0, K),
-      salt.slice(0, K),
+      m1KeyPairs.slice(0, k),
+      m2KeyPairs.slice(0, k),
+      salt.slice(0, k),
       lesserStake
     )
-    await apiWrapper.batchVoteForCouncilMember(m1KeyPairs.slice(K), m2KeyPairs.slice(K), salt.slice(K), greaterStake)
+    await apiWrapper.batchVoteForCouncilMember(m1KeyPairs.slice(k), m2KeyPairs.slice(k), salt.slice(k), greaterStake)
 
     // Revealing
     await apiWrapper.sudoStartRevealingPerion(sudo, now.addn(100))
-    await apiWrapper.batchRevealVote(m1KeyPairs.slice(0, K), m2KeyPairs.slice(0, K), salt.slice(0, K))
-    await apiWrapper.batchRevealVote(m1KeyPairs.slice(K), m2KeyPairs.slice(K), salt.slice(K))
+    await apiWrapper.batchRevealVote(m1KeyPairs.slice(0, k), m2KeyPairs.slice(0, k), salt.slice(0, k))
+    await apiWrapper.batchRevealVote(m1KeyPairs.slice(k), m2KeyPairs.slice(k), salt.slice(k))
     now = await apiWrapper.getBestBlock()
 
     // Resolving election

+ 4 - 4
tests/network-tests/src/nicaea/tests/impl/membershipCreation.ts

@@ -10,7 +10,7 @@ export function membershipTest(
   apiWrapper: ApiWrapper,
   nKeyPairs: KeyringPair[],
   keyring: Keyring,
-  N: number,
+  n: number,
   paidTerms: number,
   sudoUri: string
 ) {
@@ -21,7 +21,7 @@ export function membershipTest(
 
   tap.test('Membership creation test setup', async () => {
     sudo = keyring.addFromUri(sudoUri)
-    for (let i = 0; i < N; i++) {
+    for (let i = 0; i < n; i++) {
       nKeyPairs.push(keyring.addFromUri(i + uuid().substring(0, 8)))
     }
     aKeyPair = keyring.addFromUri(uuid().substring(0, 8))
@@ -77,9 +77,9 @@ export function membershipTest(
   })
 }
 
-export function createKeyPairs(keyring: Keyring, N: number): KeyringPair[] {
+export function createKeyPairs(keyring: Keyring, n: number): KeyringPair[] {
   const nKeyPairs: KeyringPair[] = []
-  for (let i = 0; i < N; i++) {
+  for (let i = 0; i < n; i++) {
     nKeyPairs.push(keyring.addFromUri(i + uuid().substring(0, 8)))
   }
   return nKeyPairs

+ 11 - 11
tests/network-tests/src/nicaea/tests/proposals/manageLeaderRole.ts

@@ -95,7 +95,7 @@ tap.mocha.describe('Set lead proposal scenario', async () => {
         applicationStake,
         roleStake,
         new BN(openingId),
-        WorkingGroups.storageWorkingGroup,
+        WorkingGroups.StorageWorkingGroup,
         false
       )
   )
@@ -129,12 +129,12 @@ tap.mocha.describe('Set lead proposal scenario', async () => {
         rewardInterval,
         payoutAmount,
         new BN(openingId),
-        WorkingGroups.storageWorkingGroup
+        WorkingGroups.StorageWorkingGroup
       ))
   )
   tap.test('Approve fill leader opening', async () => {
     voteForProposal(apiWrapper, m2KeyPairs, sudo, fillLeaderOpeningProposalId)
-    await expectLeaderSet(apiWrapper, leadKeyPair[0].address, WorkingGroups.storageWorkingGroup)
+    await expectLeaderSet(apiWrapper, leadKeyPair[0].address, WorkingGroups.StorageWorkingGroup)
   })
 
   let rewardProposalId: BN
@@ -146,12 +146,12 @@ tap.mocha.describe('Set lead proposal scenario', async () => {
         m1KeyPairs,
         sudo,
         alteredPayoutAmount,
-        WorkingGroups.storageWorkingGroup
+        WorkingGroups.StorageWorkingGroup
       ))
   )
   tap.test('Approve new leader reward', async () => {
     voteForProposal(apiWrapper, m2KeyPairs, sudo, rewardProposalId)
-    await expectLeaderRewardAmountUpdated(apiWrapper, alteredPayoutAmount, WorkingGroups.storageWorkingGroup)
+    await expectLeaderRewardAmountUpdated(apiWrapper, alteredPayoutAmount, WorkingGroups.StorageWorkingGroup)
   })
 
   let decreaseStakeProposalId: BN
@@ -164,13 +164,13 @@ tap.mocha.describe('Set lead proposal scenario', async () => {
         m1KeyPairs,
         sudo,
         stakeDecrement,
-        WorkingGroups.storageWorkingGroup
+        WorkingGroups.StorageWorkingGroup
       ))
   )
   tap.test('Approve decreased leader stake', async () => {
     newStake = applicationStake.sub(stakeDecrement)
     voteForProposal(apiWrapper, m2KeyPairs, sudo, decreaseStakeProposalId)
-    await expectLeaderStakeDecreased(apiWrapper, newStake, WorkingGroups.storageWorkingGroup)
+    await expectLeaderStakeDecreased(apiWrapper, newStake, WorkingGroups.StorageWorkingGroup)
   })
 
   let slashProposalId: BN
@@ -182,13 +182,13 @@ tap.mocha.describe('Set lead proposal scenario', async () => {
         m1KeyPairs,
         sudo,
         slashAmount,
-        WorkingGroups.storageWorkingGroup
+        WorkingGroups.StorageWorkingGroup
       ))
   )
   tap.test('Approve leader slash', async () => {
     newStake = newStake.sub(slashAmount)
     voteForProposal(apiWrapper, m2KeyPairs, sudo, slashProposalId)
-    await expectLeaderSlashed(apiWrapper, newStake, WorkingGroups.storageWorkingGroup)
+    await expectLeaderSlashed(apiWrapper, newStake, WorkingGroups.StorageWorkingGroup)
   })
 
   let terminateLeaderRoleProposalId: BN
@@ -201,12 +201,12 @@ tap.mocha.describe('Set lead proposal scenario', async () => {
         leadKeyPair[0].address,
         sudo,
         false,
-        WorkingGroups.storageWorkingGroup
+        WorkingGroups.StorageWorkingGroup
       ))
   )
   tap.test('Approve leader role termination', async () => {
     voteForProposal(apiWrapper, m2KeyPairs, sudo, terminateLeaderRoleProposalId)
-    await expectLeaderRoleTerminated(apiWrapper, WorkingGroups.storageWorkingGroup)
+    await expectLeaderRoleTerminated(apiWrapper, WorkingGroups.StorageWorkingGroup)
   })
 
   closeApi(apiWrapper)

+ 2 - 2
tests/network-tests/src/nicaea/tests/proposals/workingGroupMintCapacityProposalTest.ts

@@ -40,7 +40,7 @@ tap.mocha.describe('Set storage working group mint capacity scenario', async ()
   councilTest(apiWrapper, m1KeyPairs, m2KeyPairs, keyring, K, sudoUri, greaterStake, lesserStake)
 
   let mintCapacityProposalId: BN
-  const newMintCapacity: BN = (await apiWrapper.getWorkingGroupMintCapacity(WorkingGroups.storageWorkingGroup)).add(
+  const newMintCapacity: BN = (await apiWrapper.getWorkingGroupMintCapacity(WorkingGroups.StorageWorkingGroup)).add(
     mintCapacityIncrement
   )
   tap.test(
@@ -51,7 +51,7 @@ tap.mocha.describe('Set storage working group mint capacity scenario', async ()
         m1KeyPairs,
         sudo,
         newMintCapacity,
-        WorkingGroups.storageWorkingGroup
+        WorkingGroups.StorageWorkingGroup
       ))
   )
   tap.test('Approve mint capacity', async () => {

+ 7 - 7
tests/network-tests/src/nicaea/tests/workingGroup/atLeastValueBugTest.ts

@@ -57,7 +57,7 @@ tap.mocha.describe('Worker application happy case scenario', async () => {
         applicationStake,
         roleStake,
         openingActivationDelay,
-        WorkingGroups.storageWorkingGroup
+        WorkingGroups.StorageWorkingGroup
       ))
   )
   tap.test(
@@ -70,12 +70,12 @@ tap.mocha.describe('Worker application happy case scenario', async () => {
         applicationStake,
         roleStake,
         leadOpenignId,
-        WorkingGroups.storageWorkingGroup,
+        WorkingGroups.StorageWorkingGroup,
         false
       )
   )
   tap.test('Begin lead application review', async () =>
-    beginLeaderApplicationReview(apiWrapper, sudo, leadOpenignId, WorkingGroups.storageWorkingGroup)
+    beginLeaderApplicationReview(apiWrapper, sudo, leadOpenignId, WorkingGroups.StorageWorkingGroup)
   )
   tap.test('Fill lead opening', async () =>
     fillLeaderOpening(
@@ -86,7 +86,7 @@ tap.mocha.describe('Worker application happy case scenario', async () => {
       firstRewardInterval,
       rewardInterval,
       payoutAmount,
-      WorkingGroups.storageWorkingGroup
+      WorkingGroups.StorageWorkingGroup
     )
   )
 
@@ -103,7 +103,7 @@ tap.mocha.describe('Worker application happy case scenario', async () => {
         new BN(0),
         openingActivationDelay,
         unstakingPeriod,
-        WorkingGroups.storageWorkingGroup,
+        WorkingGroups.StorageWorkingGroup,
         true
       ))
   )
@@ -119,12 +119,12 @@ tap.mocha.describe('Worker application happy case scenario', async () => {
         roleStake,
         openingActivationDelay,
         new BN(0),
-        WorkingGroups.storageWorkingGroup,
+        WorkingGroups.StorageWorkingGroup,
         true
       ))
   )
 
-  tap.test('Leaving lead role', async () => leaveRole(apiWrapper, leadKeyPair, sudo, WorkingGroups.storageWorkingGroup))
+  tap.test('Leaving lead role', async () => leaveRole(apiWrapper, leadKeyPair, sudo, WorkingGroups.StorageWorkingGroup))
 
   closeApi(apiWrapper)
 })

+ 18 - 18
tests/network-tests/src/nicaea/tests/workingGroup/manageWorkerAsLeadTest.ts

@@ -62,7 +62,7 @@ tap.mocha.describe('Manage worker as worker scenario', async () => {
         applicationStake,
         roleStake,
         openingActivationDelay,
-        WorkingGroups.storageWorkingGroup
+        WorkingGroups.StorageWorkingGroup
       ))
   )
   tap.test(
@@ -75,12 +75,12 @@ tap.mocha.describe('Manage worker as worker scenario', async () => {
         applicationStake,
         roleStake,
         leadOpenignId,
-        WorkingGroups.storageWorkingGroup,
+        WorkingGroups.StorageWorkingGroup,
         false
       )
   )
   tap.test('Begin lead application review', async () =>
-    beginLeaderApplicationReview(apiWrapper, sudo, leadOpenignId, WorkingGroups.storageWorkingGroup)
+    beginLeaderApplicationReview(apiWrapper, sudo, leadOpenignId, WorkingGroups.StorageWorkingGroup)
   )
   tap.test('Fill lead opening', async () =>
     fillLeaderOpening(
@@ -91,7 +91,7 @@ tap.mocha.describe('Manage worker as worker scenario', async () => {
       firstRewardInterval,
       rewardInterval,
       payoutAmount,
-      WorkingGroups.storageWorkingGroup
+      WorkingGroups.StorageWorkingGroup
     )
   )
 
@@ -108,7 +108,7 @@ tap.mocha.describe('Manage worker as worker scenario', async () => {
         roleStake,
         openingActivationDelay,
         unstakingPeriod,
-        WorkingGroups.storageWorkingGroup,
+        WorkingGroups.StorageWorkingGroup,
         false
       ))
   )
@@ -122,12 +122,12 @@ tap.mocha.describe('Manage worker as worker scenario', async () => {
         applicationStake,
         roleStake,
         openignId,
-        WorkingGroups.storageWorkingGroup,
+        WorkingGroups.StorageWorkingGroup,
         false
       )
   )
   tap.test('Begin application review', async () =>
-    beginApplicationReview(apiWrapper, leadKeyPair[0], sudo, openignId, WorkingGroups.storageWorkingGroup)
+    beginApplicationReview(apiWrapper, leadKeyPair[0], sudo, openignId, WorkingGroups.StorageWorkingGroup)
   )
   tap.test('Fill worker opening', async () =>
     fillOpening(
@@ -139,13 +139,13 @@ tap.mocha.describe('Manage worker as worker scenario', async () => {
       firstRewardInterval,
       rewardInterval,
       payoutAmount,
-      WorkingGroups.storageWorkingGroup
+      WorkingGroups.StorageWorkingGroup
     )
   )
 
-  tap.test('Leaving lead role', async () => leaveRole(apiWrapper, leadKeyPair, sudo, WorkingGroups.storageWorkingGroup))
+  tap.test('Leaving lead role', async () => leaveRole(apiWrapper, leadKeyPair, sudo, WorkingGroups.StorageWorkingGroup))
   tap.test('Decrease worker stake, expect failure', async () =>
-    decreaseStake(apiWrapper, nKeyPairs, leadKeyPair[0], sudo, WorkingGroups.storageWorkingGroup, true)
+    decreaseStake(apiWrapper, nKeyPairs, leadKeyPair[0], sudo, WorkingGroups.StorageWorkingGroup, true)
   )
 
   tap.test(
@@ -158,7 +158,7 @@ tap.mocha.describe('Manage worker as worker scenario', async () => {
         applicationStake,
         roleStake,
         openingActivationDelay,
-        WorkingGroups.storageWorkingGroup
+        WorkingGroups.StorageWorkingGroup
       ))
   )
   tap.test(
@@ -171,12 +171,12 @@ tap.mocha.describe('Manage worker as worker scenario', async () => {
         applicationStake,
         roleStake,
         leadOpenignId,
-        WorkingGroups.storageWorkingGroup,
+        WorkingGroups.StorageWorkingGroup,
         false
       )
   )
   tap.test('Begin lead application review', async () =>
-    beginLeaderApplicationReview(apiWrapper, sudo, leadOpenignId, WorkingGroups.storageWorkingGroup)
+    beginLeaderApplicationReview(apiWrapper, sudo, leadOpenignId, WorkingGroups.StorageWorkingGroup)
   )
   tap.test('Fill lead opening', async () =>
     fillLeaderOpening(
@@ -187,21 +187,21 @@ tap.mocha.describe('Manage worker as worker scenario', async () => {
       firstRewardInterval,
       rewardInterval,
       payoutAmount,
-      WorkingGroups.storageWorkingGroup
+      WorkingGroups.StorageWorkingGroup
     )
   )
 
   tap.test('Decrease worker stake', async () =>
-    decreaseStake(apiWrapper, nKeyPairs, leadKeyPair[0], sudo, WorkingGroups.storageWorkingGroup, false)
+    decreaseStake(apiWrapper, nKeyPairs, leadKeyPair[0], sudo, WorkingGroups.StorageWorkingGroup, false)
   )
   tap.test('Slash worker', async () =>
-    slash(apiWrapper, nKeyPairs, leadKeyPair[0], sudo, WorkingGroups.storageWorkingGroup, false)
+    slash(apiWrapper, nKeyPairs, leadKeyPair[0], sudo, WorkingGroups.StorageWorkingGroup, false)
   )
   tap.test('Terminate worker role', async () =>
-    terminateRole(apiWrapper, nKeyPairs, leadKeyPair[0], sudo, WorkingGroups.storageWorkingGroup, false)
+    terminateRole(apiWrapper, nKeyPairs, leadKeyPair[0], sudo, WorkingGroups.StorageWorkingGroup, false)
   )
 
-  tap.test('Leaving lead role', async () => leaveRole(apiWrapper, leadKeyPair, sudo, WorkingGroups.storageWorkingGroup))
+  tap.test('Leaving lead role', async () => leaveRole(apiWrapper, leadKeyPair, sudo, WorkingGroups.StorageWorkingGroup))
 
   closeApi(apiWrapper)
 })

+ 12 - 12
tests/network-tests/src/nicaea/tests/workingGroup/manageWorkerAsWorkerTest.ts

@@ -62,7 +62,7 @@ tap.mocha.describe('Manage worker as worker scenario', async () => {
         applicationStake,
         roleStake,
         openingActivationDelay,
-        WorkingGroups.storageWorkingGroup
+        WorkingGroups.StorageWorkingGroup
       ))
   )
   tap.test(
@@ -75,12 +75,12 @@ tap.mocha.describe('Manage worker as worker scenario', async () => {
         applicationStake,
         roleStake,
         leadOpenignId,
-        WorkingGroups.storageWorkingGroup,
+        WorkingGroups.StorageWorkingGroup,
         false
       )
   )
   tap.test('Begin lead application review', async () =>
-    beginLeaderApplicationReview(apiWrapper, sudo, leadOpenignId, WorkingGroups.storageWorkingGroup)
+    beginLeaderApplicationReview(apiWrapper, sudo, leadOpenignId, WorkingGroups.StorageWorkingGroup)
   )
   tap.test('Fill lead opening', async () =>
     fillLeaderOpening(
@@ -91,7 +91,7 @@ tap.mocha.describe('Manage worker as worker scenario', async () => {
       firstRewardInterval,
       rewardInterval,
       payoutAmount,
-      WorkingGroups.storageWorkingGroup
+      WorkingGroups.StorageWorkingGroup
     )
   )
 
@@ -108,7 +108,7 @@ tap.mocha.describe('Manage worker as worker scenario', async () => {
         roleStake,
         openingActivationDelay,
         unstakingPeriod,
-        WorkingGroups.storageWorkingGroup,
+        WorkingGroups.StorageWorkingGroup,
         false
       ))
   )
@@ -122,12 +122,12 @@ tap.mocha.describe('Manage worker as worker scenario', async () => {
         applicationStake,
         roleStake,
         openignId,
-        WorkingGroups.storageWorkingGroup,
+        WorkingGroups.StorageWorkingGroup,
         false
       )
   )
   tap.test('Begin application review', async () =>
-    beginApplicationReview(apiWrapper, leadKeyPair[0], sudo, openignId, WorkingGroups.storageWorkingGroup)
+    beginApplicationReview(apiWrapper, leadKeyPair[0], sudo, openignId, WorkingGroups.StorageWorkingGroup)
   )
   tap.test('Fill worker opening', async () =>
     fillOpening(
@@ -139,21 +139,21 @@ tap.mocha.describe('Manage worker as worker scenario', async () => {
       firstRewardInterval,
       rewardInterval,
       payoutAmount,
-      WorkingGroups.storageWorkingGroup
+      WorkingGroups.StorageWorkingGroup
     )
   )
 
   tap.test('Increase worker stake', async () =>
-    increaseStake(apiWrapper, nKeyPairs, sudo, WorkingGroups.storageWorkingGroup)
+    increaseStake(apiWrapper, nKeyPairs, sudo, WorkingGroups.StorageWorkingGroup)
   )
   tap.test('Update reward account', async () =>
-    updateRewardAccount(apiWrapper, nKeyPairs, keyring, sudo, WorkingGroups.storageWorkingGroup)
+    updateRewardAccount(apiWrapper, nKeyPairs, keyring, sudo, WorkingGroups.StorageWorkingGroup)
   )
   tap.test('Update role account', async () =>
-    updateRoleAccount(apiWrapper, nKeyPairs, keyring, sudo, WorkingGroups.storageWorkingGroup)
+    updateRoleAccount(apiWrapper, nKeyPairs, keyring, sudo, WorkingGroups.StorageWorkingGroup)
   )
 
-  tap.test('Leaving lead role', async () => leaveRole(apiWrapper, leadKeyPair, sudo, WorkingGroups.storageWorkingGroup))
+  tap.test('Leaving lead role', async () => leaveRole(apiWrapper, leadKeyPair, sudo, WorkingGroups.StorageWorkingGroup))
 
   closeApi(apiWrapper)
 })

+ 11 - 11
tests/network-tests/src/nicaea/tests/workingGroup/workerApplicationHappyCaseTest.ts

@@ -60,7 +60,7 @@ tap.mocha.describe('Worker application happy case scenario', async () => {
         applicationStake,
         roleStake,
         openingActivationDelay,
-        WorkingGroups.storageWorkingGroup
+        WorkingGroups.StorageWorkingGroup
       ))
   )
   tap.test(
@@ -73,12 +73,12 @@ tap.mocha.describe('Worker application happy case scenario', async () => {
         applicationStake,
         roleStake,
         leadOpenignId,
-        WorkingGroups.storageWorkingGroup,
+        WorkingGroups.StorageWorkingGroup,
         false
       )
   )
   tap.test('Begin lead application review', async () =>
-    beginLeaderApplicationReview(apiWrapper, sudo, leadOpenignId, WorkingGroups.storageWorkingGroup)
+    beginLeaderApplicationReview(apiWrapper, sudo, leadOpenignId, WorkingGroups.StorageWorkingGroup)
   )
   tap.test('Fill lead opening', async () =>
     fillLeaderOpening(
@@ -89,7 +89,7 @@ tap.mocha.describe('Worker application happy case scenario', async () => {
       firstRewardInterval,
       rewardInterval,
       payoutAmount,
-      WorkingGroups.storageWorkingGroup
+      WorkingGroups.StorageWorkingGroup
     )
   )
 
@@ -106,7 +106,7 @@ tap.mocha.describe('Worker application happy case scenario', async () => {
         roleStake,
         openingActivationDelay,
         unstakingPeriod,
-        WorkingGroups.storageWorkingGroup,
+        WorkingGroups.StorageWorkingGroup,
         false
       ))
   )
@@ -118,12 +118,12 @@ tap.mocha.describe('Worker application happy case scenario', async () => {
       applicationStake,
       roleStake,
       workerOpenignId,
-      WorkingGroups.storageWorkingGroup,
+      WorkingGroups.StorageWorkingGroup,
       false
     )
   )
   tap.test('Withdraw worker application', async () =>
-    withdrawApplicaiton(apiWrapper, nKeyPairs, sudo, WorkingGroups.storageWorkingGroup)
+    withdrawApplicaiton(apiWrapper, nKeyPairs, sudo, WorkingGroups.StorageWorkingGroup)
   )
   tap.test('Apply for worker opening', async () =>
     applyForOpening(
@@ -133,12 +133,12 @@ tap.mocha.describe('Worker application happy case scenario', async () => {
       applicationStake,
       roleStake,
       workerOpenignId,
-      WorkingGroups.storageWorkingGroup,
+      WorkingGroups.StorageWorkingGroup,
       false
     )
   )
   tap.test('Begin application review', async () =>
-    beginApplicationReview(apiWrapper, leadKeyPair[0], sudo, workerOpenignId, WorkingGroups.storageWorkingGroup)
+    beginApplicationReview(apiWrapper, leadKeyPair[0], sudo, workerOpenignId, WorkingGroups.StorageWorkingGroup)
   )
   tap.test('Fill worker opening', async () =>
     fillOpening(
@@ -150,11 +150,11 @@ tap.mocha.describe('Worker application happy case scenario', async () => {
       firstRewardInterval,
       rewardInterval,
       payoutAmount,
-      WorkingGroups.storageWorkingGroup
+      WorkingGroups.StorageWorkingGroup
     )
   )
 
-  tap.test('Leaving lead role', async () => leaveRole(apiWrapper, leadKeyPair, sudo, WorkingGroups.storageWorkingGroup))
+  tap.test('Leaving lead role', async () => leaveRole(apiWrapper, leadKeyPair, sudo, WorkingGroups.StorageWorkingGroup))
 
   closeApi(apiWrapper)
 })

+ 11 - 11
tests/network-tests/src/nicaea/tests/workingGroup/workerApplicationRejectionCaseTest.ts

@@ -61,7 +61,7 @@ tap.mocha.describe('Worker application happy case scenario', async () => {
         applicationStake,
         roleStake,
         leadOpeningActivationDelay,
-        WorkingGroups.storageWorkingGroup
+        WorkingGroups.StorageWorkingGroup
       ))
   )
   tap.test(
@@ -74,12 +74,12 @@ tap.mocha.describe('Worker application happy case scenario', async () => {
         applicationStake,
         roleStake,
         leadOpenignId,
-        WorkingGroups.storageWorkingGroup,
+        WorkingGroups.StorageWorkingGroup,
         false
       )
   )
   tap.test('Begin lead application review', async () =>
-    beginLeaderApplicationReview(apiWrapper, sudo, leadOpenignId, WorkingGroups.storageWorkingGroup)
+    beginLeaderApplicationReview(apiWrapper, sudo, leadOpenignId, WorkingGroups.StorageWorkingGroup)
   )
   tap.test('Fill lead opening', async () =>
     fillLeaderOpening(
@@ -90,7 +90,7 @@ tap.mocha.describe('Worker application happy case scenario', async () => {
       firstRewardInterval,
       rewardInterval,
       payoutAmount,
-      WorkingGroups.storageWorkingGroup
+      WorkingGroups.StorageWorkingGroup
     )
   )
 
@@ -107,7 +107,7 @@ tap.mocha.describe('Worker application happy case scenario', async () => {
         roleStake,
         openingActivationDelay,
         unstakingPeriod,
-        WorkingGroups.storageWorkingGroup,
+        WorkingGroups.StorageWorkingGroup,
         false
       ))
   )
@@ -119,12 +119,12 @@ tap.mocha.describe('Worker application happy case scenario', async () => {
       applicationStake,
       roleStake,
       openignId,
-      WorkingGroups.storageWorkingGroup,
+      WorkingGroups.StorageWorkingGroup,
       true
     )
   )
   tap.test('Begin accepting worker applications', async () =>
-    acceptApplications(apiWrapper, leadKeyPair[0], sudo, openignId, WorkingGroups.storageWorkingGroup)
+    acceptApplications(apiWrapper, leadKeyPair[0], sudo, openignId, WorkingGroups.StorageWorkingGroup)
   )
   tap.test('Apply for worker opening as non-member, expect failure', async () =>
     applyForOpening(
@@ -134,7 +134,7 @@ tap.mocha.describe('Worker application happy case scenario', async () => {
       applicationStake,
       roleStake,
       openignId,
-      WorkingGroups.storageWorkingGroup,
+      WorkingGroups.StorageWorkingGroup,
       true
     )
   )
@@ -146,15 +146,15 @@ tap.mocha.describe('Worker application happy case scenario', async () => {
       applicationStake,
       roleStake,
       openignId,
-      WorkingGroups.storageWorkingGroup,
+      WorkingGroups.StorageWorkingGroup,
       false
     )
   )
   tap.test('Terminate worker applicaitons', async () =>
-    terminateApplications(apiWrapper, nKeyPairs, leadKeyPair[0], sudo, WorkingGroups.storageWorkingGroup)
+    terminateApplications(apiWrapper, nKeyPairs, leadKeyPair[0], sudo, WorkingGroups.StorageWorkingGroup)
   )
 
-  tap.test('Leaving lead role', async () => leaveRole(apiWrapper, leadKeyPair, sudo, WorkingGroups.storageWorkingGroup))
+  tap.test('Leaving lead role', async () => leaveRole(apiWrapper, leadKeyPair, sudo, WorkingGroups.StorageWorkingGroup))
 
   closeApi(apiWrapper)
 })

+ 11 - 11
tests/network-tests/src/nicaea/tests/workingGroup/workerPayout.ts

@@ -62,7 +62,7 @@ tap.mocha.describe('Worker application happy case scenario', async () => {
         applicationStake,
         roleStake,
         openingActivationDelay,
-        WorkingGroups.storageWorkingGroup
+        WorkingGroups.StorageWorkingGroup
       ))
   )
   tap.test(
@@ -75,12 +75,12 @@ tap.mocha.describe('Worker application happy case scenario', async () => {
         applicationStake,
         roleStake,
         leadOpenignId,
-        WorkingGroups.storageWorkingGroup,
+        WorkingGroups.StorageWorkingGroup,
         false
       )
   )
   tap.test('Begin lead application review', async () =>
-    beginLeaderApplicationReview(apiWrapper, sudo, leadOpenignId, WorkingGroups.storageWorkingGroup)
+    beginLeaderApplicationReview(apiWrapper, sudo, leadOpenignId, WorkingGroups.StorageWorkingGroup)
   )
   tap.test('Fill lead opening', async () =>
     fillLeaderOpening(
@@ -91,7 +91,7 @@ tap.mocha.describe('Worker application happy case scenario', async () => {
       firstRewardInterval,
       rewardInterval,
       payoutAmount,
-      WorkingGroups.storageWorkingGroup
+      WorkingGroups.StorageWorkingGroup
     )
   )
 
@@ -108,7 +108,7 @@ tap.mocha.describe('Worker application happy case scenario', async () => {
         roleStake,
         openingActivationDelay,
         unstakingPeriod,
-        WorkingGroups.storageWorkingGroup,
+        WorkingGroups.StorageWorkingGroup,
         false
       ))
   )
@@ -120,15 +120,15 @@ tap.mocha.describe('Worker application happy case scenario', async () => {
       applicationStake,
       roleStake,
       workerOpenignId,
-      WorkingGroups.storageWorkingGroup,
+      WorkingGroups.StorageWorkingGroup,
       false
     )
   )
   tap.test('Begin application review', async () =>
-    beginApplicationReview(apiWrapper, leadKeyPair[0], sudo, workerOpenignId, WorkingGroups.storageWorkingGroup)
+    beginApplicationReview(apiWrapper, leadKeyPair[0], sudo, workerOpenignId, WorkingGroups.StorageWorkingGroup)
   )
   tap.test('Set mint capacity', async () =>
-    setMintCapacity(apiWrapper, sudo, mintCapacity, WorkingGroups.storageWorkingGroup)
+    setMintCapacity(apiWrapper, sudo, mintCapacity, WorkingGroups.StorageWorkingGroup)
   )
   tap.test('Fill worker opening', async () =>
     fillOpening(
@@ -140,13 +140,13 @@ tap.mocha.describe('Worker application happy case scenario', async () => {
       firstRewardInterval,
       rewardInterval,
       payoutAmount,
-      WorkingGroups.storageWorkingGroup
+      WorkingGroups.StorageWorkingGroup
     )
   )
 
-  tap.test('Await worker payout', async () => awaitPayout(apiWrapper, nKeyPairs, WorkingGroups.storageWorkingGroup))
+  tap.test('Await worker payout', async () => awaitPayout(apiWrapper, nKeyPairs, WorkingGroups.StorageWorkingGroup))
 
-  tap.test('Leaving lead role', async () => leaveRole(apiWrapper, leadKeyPair, sudo, WorkingGroups.storageWorkingGroup))
+  tap.test('Leaving lead role', async () => leaveRole(apiWrapper, leadKeyPair, sudo, WorkingGroups.StorageWorkingGroup))
 
   closeApi(apiWrapper)
 })

+ 3 - 3
tests/network-tests/src/nicaea/utils/apiWrapper.ts

@@ -20,7 +20,7 @@ import { WorkingGroupOpening } from '../dto/workingGroupOpening'
 import { FillOpeningParameters } from '../dto/fillOpeningParameters'
 
 export enum WorkingGroups {
-  storageWorkingGroup = 'storageWorkingGroup',
+  StorageWorkingGroup = 'storageWorkingGroup',
 }
 
 export class ApiWrapper {
@@ -43,7 +43,7 @@ export class ApiWrapper {
 
   public getWorkingGroupString(workingGroup: WorkingGroups): string {
     switch (workingGroup) {
-      case WorkingGroups.storageWorkingGroup:
+      case WorkingGroups.StorageWorkingGroup:
         return 'Storage'
       default:
         return 'Undefined'
@@ -995,7 +995,7 @@ export class ApiWrapper {
     const storageProviders: Vec<AccountId> = await this.api.query.actors.accountIdsByRole<Vec<AccountId>>(
       'StorageProvider'
     )
-    const accountWorkers: BN = await this.getWorkerIdByRoleAccount(address, WorkingGroups.storageWorkingGroup)
+    const accountWorkers: BN = await this.getWorkerIdByRoleAccount(address, WorkingGroups.StorageWorkingGroup)
     return accountWorkers !== undefined
   }
 

+ 11 - 11
tests/network-tests/src/rome/tests/impl/electingCouncil.ts

@@ -12,7 +12,7 @@ export function councilTest(
   m1KeyPairs: KeyringPair[],
   m2KeyPairs: KeyringPair[],
   keyring: Keyring,
-  K: number,
+  k: number,
   nodeUrl: string,
   sudoUri: string,
   greaterStake: BN,
@@ -45,8 +45,8 @@ export function councilTest(
 
     // First K members stake more
     await apiWrapper.sudoStartAnnouncingPerion(sudo, now.addn(100))
-    await apiWrapper.batchApplyForCouncilElection(m2KeyPairs.slice(0, K), greaterStake)
-    m2KeyPairs.slice(0, K).forEach((keyPair) =>
+    await apiWrapper.batchApplyForCouncilElection(m2KeyPairs.slice(0, k), greaterStake)
+    m2KeyPairs.slice(0, k).forEach((keyPair) =>
       apiWrapper.getCouncilElectionStake(keyPair.address).then((stake) => {
         assert(
           stake.eq(greaterStake),
@@ -56,8 +56,8 @@ export function councilTest(
     )
 
     // Last members stake less
-    await apiWrapper.batchApplyForCouncilElection(m2KeyPairs.slice(K), lesserStake)
-    m2KeyPairs.slice(K).forEach((keyPair) =>
+    await apiWrapper.batchApplyForCouncilElection(m2KeyPairs.slice(k), lesserStake)
+    m2KeyPairs.slice(k).forEach((keyPair) =>
       apiWrapper.getCouncilElectionStake(keyPair.address).then((stake) => {
         assert(
           stake.eq(lesserStake),
@@ -69,17 +69,17 @@ export function councilTest(
     // Voting
     await apiWrapper.sudoStartVotingPerion(sudo, now.addn(100))
     await apiWrapper.batchVoteForCouncilMember(
-      m1KeyPairs.slice(0, K),
-      m2KeyPairs.slice(0, K),
-      salt.slice(0, K),
+      m1KeyPairs.slice(0, k),
+      m2KeyPairs.slice(0, k),
+      salt.slice(0, k),
       lesserStake
     )
-    await apiWrapper.batchVoteForCouncilMember(m1KeyPairs.slice(K), m2KeyPairs.slice(K), salt.slice(K), greaterStake)
+    await apiWrapper.batchVoteForCouncilMember(m1KeyPairs.slice(k), m2KeyPairs.slice(k), salt.slice(k), greaterStake)
 
     // Revealing
     await apiWrapper.sudoStartRevealingPerion(sudo, now.addn(100))
-    await apiWrapper.batchRevealVote(m1KeyPairs.slice(0, K), m2KeyPairs.slice(0, K), salt.slice(0, K))
-    await apiWrapper.batchRevealVote(m1KeyPairs.slice(K), m2KeyPairs.slice(K), salt.slice(K))
+    await apiWrapper.batchRevealVote(m1KeyPairs.slice(0, k), m2KeyPairs.slice(0, k), salt.slice(0, k))
+    await apiWrapper.batchRevealVote(m1KeyPairs.slice(k), m2KeyPairs.slice(k), salt.slice(k))
     now = await apiWrapper.getBestBlock()
 
     // Resolving election

+ 2 - 2
tests/network-tests/src/rome/tests/impl/membershipCreation.ts

@@ -11,7 +11,7 @@ import tap from 'tap'
 export function membershipTest(
   nKeyPairs: KeyringPair[],
   keyring: Keyring,
-  N: number,
+  n: number,
   paidTerms: number,
   nodeUrl: string,
   sudoUri: string
@@ -27,7 +27,7 @@ export function membershipTest(
     const provider = new WsProvider(nodeUrl)
     apiWrapper = await ApiWrapper.create(provider)
     sudo = keyring.addFromUri(sudoUri)
-    for (let i = 0; i < N; i++) {
+    for (let i = 0; i < n; i++) {
       nKeyPairs.push(keyring.addFromUri(i + uuid().substring(0, 8)))
     }
     aKeyPair = keyring.addFromUri(uuid().substring(0, 8))