Browse Source

network-tests: fix council setup code

Mokhtar Naamani 4 years ago
parent
commit
7efe4ec327

+ 8 - 29
tests/network-tests/src/fixtures/councilElectionHappyCase.ts

@@ -1,17 +1,14 @@
 import { Fixture } from '../IFixture'
-import { BuyMembershipHappyCaseFixture } from './membershipModule'
 import { ElectCouncilFixture } from './councilElectionModule'
 import { Api } from '../Api'
 import { KeyringPair } from '@polkadot/keyring/types'
-import { PaidTermId } from '@joystream/types/members'
 import BN from 'bn.js'
 
 export class CouncilElectionHappyCaseFixture implements Fixture {
   private api: Api
   private sudo: KeyringPair
-  private membersKeyPairs: KeyringPair[]
-  private councilKeyPairs: KeyringPair[]
-  private paidTerms: PaidTermId
+  private voterKeyPairs: KeyringPair[]
+  private applicantKeyPairs: KeyringPair[]
   private k: number
   private greaterStake: BN
   private lesserStake: BN
@@ -19,44 +16,26 @@ export class CouncilElectionHappyCaseFixture implements Fixture {
   constructor(
     api: Api,
     sudo: KeyringPair,
-    membersKeyPairs: KeyringPair[],
-    councilKeyPairs: KeyringPair[],
-    paidTerms: PaidTermId,
+    voterKeyPairs: KeyringPair[],
+    applicantKeyPairs: KeyringPair[],
     k: number,
     greaterStake: BN,
     lesserStake: BN
   ) {
     this.api = api
     this.sudo = sudo
-    this.membersKeyPairs = membersKeyPairs
-    this.councilKeyPairs = councilKeyPairs
-    this.paidTerms = paidTerms
+    this.voterKeyPairs = voterKeyPairs
+    this.applicantKeyPairs = applicantKeyPairs
     this.k = k
     this.greaterStake = greaterStake
     this.lesserStake = lesserStake
   }
 
   public async runner(expectFailure: boolean): Promise<void> {
-    const firstMemberSetFixture: BuyMembershipHappyCaseFixture = new BuyMembershipHappyCaseFixture(
-      this.api,
-      this.sudo,
-      this.membersKeyPairs,
-      this.paidTerms
-    )
-    await firstMemberSetFixture.runner(false)
-
-    const secondMemberSetFixture: BuyMembershipHappyCaseFixture = new BuyMembershipHappyCaseFixture(
-      this.api,
-      this.sudo,
-      this.councilKeyPairs,
-      this.paidTerms
-    )
-    await secondMemberSetFixture.runner(false)
-
     const electCouncilFixture: ElectCouncilFixture = new ElectCouncilFixture(
       this.api,
-      this.membersKeyPairs,
-      this.councilKeyPairs,
+      this.voterKeyPairs,
+      this.applicantKeyPairs,
       this.k,
       this.sudo,
       this.greaterStake,

+ 35 - 35
tests/network-tests/src/fixtures/councilElectionModule.ts

@@ -9,8 +9,8 @@ import { Fixture } from '../IFixture'
 
 export class ElectCouncilFixture implements Fixture {
   private api: Api
-  private membersKeyPairs: KeyringPair[]
-  private councilKeyPairs: KeyringPair[]
+  private voterKeyPairs: KeyringPair[]
+  private applicantKeyPairs: KeyringPair[]
   private k: number
   private sudo: KeyringPair
   private greaterStake: BN
@@ -18,16 +18,16 @@ export class ElectCouncilFixture implements Fixture {
 
   public constructor(
     api: Api,
-    membersKeyPairs: KeyringPair[],
-    councilKeyPairs: KeyringPair[],
+    voterKeyPairs: KeyringPair[],
+    applicantKeyPairs: KeyringPair[],
     k: number,
     sudo: KeyringPair,
     greaterStake: BN,
     lesserStake: BN
   ) {
     this.api = api
-    this.membersKeyPairs = membersKeyPairs
-    this.councilKeyPairs = councilKeyPairs
+    this.voterKeyPairs = voterKeyPairs
+    this.applicantKeyPairs = applicantKeyPairs
     this.k = k
     this.sudo = sudo
     this.greaterStake = greaterStake
@@ -35,6 +35,9 @@ export class ElectCouncilFixture implements Fixture {
   }
 
   public async runner(expectFailure: boolean): Promise<void> {
+    // Assert no council exists
+    assert((await this.api.getCouncil()).length === 0)
+
     let now = await this.api.getBestBlock()
     const applyForCouncilFee: BN = this.api.estimateApplyForCouncilFee(this.greaterStake)
     const voteForCouncilFee: BN = this.api.estimateVoteForCouncilFee(
@@ -43,23 +46,27 @@ export class ElectCouncilFixture implements Fixture {
       this.greaterStake
     )
     const salt: string[] = []
-    this.membersKeyPairs.forEach(() => {
+    this.voterKeyPairs.forEach(() => {
       salt.push(''.concat(uuid().replace(/-/g, '')))
     })
     const revealVoteFee: BN = this.api.estimateRevealVoteFee(this.sudo.address, salt[0])
 
     // Topping the balances
-    await this.api.transferBalanceToAccounts(this.sudo, this.councilKeyPairs, applyForCouncilFee.add(this.greaterStake))
     await this.api.transferBalanceToAccounts(
       this.sudo,
-      this.membersKeyPairs,
+      this.applicantKeyPairs,
+      applyForCouncilFee.add(this.greaterStake)
+    )
+    await this.api.transferBalanceToAccounts(
+      this.sudo,
+      this.voterKeyPairs,
       voteForCouncilFee.add(revealVoteFee).add(this.greaterStake)
     )
 
     // First K members stake more
     await this.api.sudoStartAnnouncingPeriod(this.sudo, now.addn(100))
-    await this.api.batchApplyForCouncilElection(this.councilKeyPairs.slice(0, this.k), this.greaterStake)
-    this.councilKeyPairs.slice(0, this.k).forEach((keyPair) =>
+    await this.api.batchApplyForCouncilElection(this.applicantKeyPairs.slice(0, this.k), this.greaterStake)
+    this.applicantKeyPairs.slice(0, this.k).forEach((keyPair) =>
       this.api.getCouncilElectionStake(keyPair.address).then((stake) => {
         assert(
           stake.eq(this.greaterStake),
@@ -69,8 +76,8 @@ export class ElectCouncilFixture implements Fixture {
     )
 
     // Last members stake less
-    await this.api.batchApplyForCouncilElection(this.councilKeyPairs.slice(this.k), this.lesserStake)
-    this.councilKeyPairs.slice(this.k).forEach((keyPair) =>
+    await this.api.batchApplyForCouncilElection(this.applicantKeyPairs.slice(this.k), this.lesserStake)
+    this.applicantKeyPairs.slice(this.k).forEach((keyPair) =>
       this.api.getCouncilElectionStake(keyPair.address).then((stake) => {
         assert(
           stake.eq(this.lesserStake),
@@ -82,14 +89,14 @@ export class ElectCouncilFixture implements Fixture {
     // Voting
     await this.api.sudoStartVotingPeriod(this.sudo, now.addn(100))
     await this.api.batchVoteForCouncilMember(
-      this.membersKeyPairs.slice(0, this.k),
-      this.councilKeyPairs.slice(0, this.k),
+      this.voterKeyPairs.slice(0, this.k),
+      this.applicantKeyPairs.slice(0, this.k),
       salt.slice(0, this.k),
       this.lesserStake
     )
     await this.api.batchVoteForCouncilMember(
-      this.membersKeyPairs.slice(this.k),
-      this.councilKeyPairs.slice(this.k),
+      this.voterKeyPairs.slice(this.k),
+      this.applicantKeyPairs.slice(this.k),
       salt.slice(this.k),
       this.greaterStake
     )
@@ -97,13 +104,13 @@ export class ElectCouncilFixture implements Fixture {
     // Revealing
     await this.api.sudoStartRevealingPeriod(this.sudo, now.addn(100))
     await this.api.batchRevealVote(
-      this.membersKeyPairs.slice(0, this.k),
-      this.councilKeyPairs.slice(0, this.k),
+      this.voterKeyPairs.slice(0, this.k),
+      this.applicantKeyPairs.slice(0, this.k),
       salt.slice(0, this.k)
     )
     await this.api.batchRevealVote(
-      this.membersKeyPairs.slice(this.k),
-      this.councilKeyPairs.slice(this.k),
+      this.voterKeyPairs.slice(this.k),
+      this.applicantKeyPairs.slice(this.k),
       salt.slice(this.k)
     )
     now = await this.api.getBestBlock()
@@ -114,21 +121,14 @@ export class ElectCouncilFixture implements Fixture {
     await Utils.wait(this.api.getBlockDuration().muln(2.5).toNumber())
     const seats: Seat[] = await this.api.getCouncil()
 
-    // Preparing collections to increase assertion readability
-    const councilAddresses: string[] = this.councilKeyPairs.map((keyPair) => keyPair.address)
-    const membersAddresses: string[] = this.membersKeyPairs.map((keyPair) => keyPair.address)
-    const members: string[] = seats.map((seat) => seat.member.toString())
-    const bakers: string[] = seats.map((seat) => seat.backers.map((baker) => baker.member.toString())).flat()
+    // Assert a council was created
+    assert(seats.length)
+
+    // const applicantAddresses: string[] = this.applicantKeyPairs.map((keyPair) => keyPair.address)
+    // const voterAddresses: string[] = this.voterKeyPairs.map((keyPair) => keyPair.address)
+    // const councilMembers: string[] = seats.map((seat) => seat.member.toString())
+    // const backers: string[] = seats.map((seat) => seat.backers.map((backer) => backer.member.toString())).flat()
 
-    // Assertions
-    councilAddresses.forEach((address) => assert(members.includes(address), `Account ${address} is not in the council`))
-    membersAddresses.forEach((address) => assert(bakers.includes(address), `Account ${address} is not in the voters`))
-    seats.forEach((seat) =>
-      assert(
-        Utils.getTotalStake(seat).eq(this.greaterStake.add(this.lesserStake)),
-        `Member ${seat.member} has unexpected stake ${Utils.getTotalStake(seat)}`
-      )
-    )
     if (expectFailure) {
       throw new Error('Successful fixture run while expecting failure')
     }

+ 2 - 2
tests/network-tests/src/fixtures/membershipModule.ts

@@ -34,8 +34,8 @@ export class BuyMembershipHappyCaseFixture implements Fixture {
 
     // Buying membership
     await Promise.all(
-      this.keyPairs.map(async (keyPair, index) => {
-        await this.api.buyMembership(keyPair, this.paidTerms, `new_member_${index}${keyPair.address.substring(0, 8)}`)
+      this.keyPairs.map(async (keyPair) => {
+        await this.api.buyMembership(keyPair, this.paidTerms, `member${keyPair.address.substring(0, 14)}`)
       })
     )
 

+ 33 - 57
tests/network-tests/src/fixtures/leaderHiringHappyCase.ts → tests/network-tests/src/fixtures/sudoHireLead.ts

@@ -12,11 +12,10 @@ import { KeyringPair } from '@polkadot/keyring/types'
 import { PaidTermId } from '@joystream/types/members'
 import BN from 'bn.js'
 
-export class LeaderHiringHappyCaseFixture implements Fixture {
+export class SudoHireLeadFixture implements Fixture {
   private api: Api
   private sudo: KeyringPair
-  private nKeyPairs: KeyringPair[]
-  private leadKeyPair: KeyringPair[]
+  private leadKeyPair: KeyringPair
   private paidTerms: PaidTermId
   private applicationStake: BN
   private roleStake: BN
@@ -29,8 +28,7 @@ export class LeaderHiringHappyCaseFixture implements Fixture {
   constructor(
     api: Api,
     sudo: KeyringPair,
-    nKeyPairs: KeyringPair[],
-    leadKeyPair: KeyringPair[],
+    leadKeyPair: KeyringPair,
     paidTerms: PaidTermId,
     applicationStake: BN,
     roleStake: BN,
@@ -42,7 +40,6 @@ export class LeaderHiringHappyCaseFixture implements Fixture {
   ) {
     this.api = api
     this.sudo = sudo
-    this.nKeyPairs = nKeyPairs
     this.leadKeyPair = leadKeyPair
     this.paidTerms = paidTerms
     this.applicationStake = applicationStake
@@ -55,19 +52,10 @@ export class LeaderHiringHappyCaseFixture implements Fixture {
   }
 
   public async runner(expectFailure: boolean): Promise<void> {
-    const happyCaseFixture: BuyMembershipHappyCaseFixture = new BuyMembershipHappyCaseFixture(
-      this.api,
-      this.sudo,
-      this.nKeyPairs,
-      this.paidTerms
-    )
-    // Creating a set of members
-    await happyCaseFixture.runner(false)
-
     const leaderHappyCaseFixture: BuyMembershipHappyCaseFixture = new BuyMembershipHappyCaseFixture(
       this.api,
       this.sudo,
-      this.leadKeyPair,
+      [this.leadKeyPair],
       this.paidTerms
     )
     // Buying membership for leader account
@@ -75,7 +63,7 @@ export class LeaderHiringHappyCaseFixture implements Fixture {
 
     const addLeaderOpeningFixture: AddLeaderOpeningFixture = new AddLeaderOpeningFixture(
       this.api,
-      this.nKeyPairs,
+      [this.leadKeyPair],
       this.sudo,
       this.applicationStake,
       this.roleStake,
@@ -85,47 +73,35 @@ export class LeaderHiringHappyCaseFixture implements Fixture {
     // Add lead opening
     await addLeaderOpeningFixture.runner(false)
 
-    let applyForLeaderOpeningFixture: ApplyForOpeningFixture
-    // Apply for lead opening
-    await (async () => {
-      applyForLeaderOpeningFixture = new ApplyForOpeningFixture(
-        this.api,
-        this.leadKeyPair,
-        this.sudo,
-        this.applicationStake,
-        this.roleStake,
-        addLeaderOpeningFixture.getCreatedOpeningId() as OpeningId,
-        this.workingGroup
-      )
-      await applyForLeaderOpeningFixture.runner(false)
-    })()
+    const applyForLeaderOpeningFixture = new ApplyForOpeningFixture(
+      this.api,
+      [this.leadKeyPair],
+      this.sudo,
+      this.applicationStake,
+      this.roleStake,
+      addLeaderOpeningFixture.getCreatedOpeningId() as OpeningId,
+      this.workingGroup
+    )
+    await applyForLeaderOpeningFixture.runner(false)
 
-    let beginLeaderApplicationReviewFixture: BeginLeaderApplicationReviewFixture
-    // Begin lead application review
-    await (async () => {
-      beginLeaderApplicationReviewFixture = new BeginLeaderApplicationReviewFixture(
-        this.api,
-        this.sudo,
-        addLeaderOpeningFixture.getCreatedOpeningId() as OpeningId,
-        this.workingGroup
-      )
-      await beginLeaderApplicationReviewFixture.runner(false)
-    })()
+    const beginLeaderApplicationReviewFixture = new BeginLeaderApplicationReviewFixture(
+      this.api,
+      this.sudo,
+      addLeaderOpeningFixture.getCreatedOpeningId() as OpeningId,
+      this.workingGroup
+    )
+    await beginLeaderApplicationReviewFixture.runner(false)
 
-    let fillLeaderOpeningFixture: FillLeaderOpeningFixture
-    // Fill lead opening
-    await (async () => {
-      fillLeaderOpeningFixture = new FillLeaderOpeningFixture(
-        this.api,
-        this.leadKeyPair,
-        this.sudo,
-        addLeaderOpeningFixture.getCreatedOpeningId() as OpeningId,
-        this.firstRewardInterval,
-        this.rewardInterval,
-        this.payoutAmount,
-        this.workingGroup
-      )
-      await fillLeaderOpeningFixture.runner(false)
-    })()
+    const fillLeaderOpeningFixture = new FillLeaderOpeningFixture(
+      this.api,
+      [this.leadKeyPair],
+      this.sudo,
+      addLeaderOpeningFixture.getCreatedOpeningId() as OpeningId,
+      this.firstRewardInterval,
+      this.rewardInterval,
+      this.payoutAmount,
+      this.workingGroup
+    )
+    await fillLeaderOpeningFixture.runner(false)
   }
 }

+ 17 - 13
tests/network-tests/src/flows/councilSetup.ts

@@ -7,40 +7,44 @@ import { DbService } from '../DbService'
 import { Api } from '../Api'
 import { Utils } from '../utils'
 import { CouncilElectionHappyCaseFixture } from '../fixtures/councilElectionHappyCase'
+import { BuyMembershipHappyCaseFixture } from '../fixtures/membershipModule'
 
 // Electing council scenario
 export default async function councilSetup(api: Api, env: NodeJS.ProcessEnv, db: DbService) {
-  const sudoUri: string = env.SUDO_ACCOUNT_URI!
-  const keyring = new Keyring({ type: 'sr25519' })
   if (db.hasCouncil()) {
     return
   }
 
+  const sudoUri: string = env.SUDO_ACCOUNT_URI!
+  const keyring = new Keyring({ type: 'sr25519' })
   const sudo: KeyringPair = keyring.addFromUri(sudoUri)
-
-  const N: number = +env.MEMBERSHIP_CREATION_N!
-  const m1KeyPairs: KeyringPair[] = Utils.createKeyPairs(keyring, N)
-  const m2KeyPairs: KeyringPair[] = Utils.createKeyPairs(keyring, N)
+  const voters: KeyringPair[] = Utils.createKeyPairs(keyring, 5)
+  const applicants: KeyringPair[] = Utils.createKeyPairs(keyring, 8)
   const paidTerms: PaidTermId = api.createPaidTermId(new BN(+env.MEMBERSHIP_PAID_TERMS!))
   const K: number = +env.COUNCIL_ELECTION_K!
   const greaterStake: BN = new BN(+env.COUNCIL_STAKE_GREATER_AMOUNT!)
   const lesserStake: BN = new BN(+env.COUNCIL_STAKE_LESSER_AMOUNT!)
 
-  // const durationInBlocks = 25
-  // setTestTimeout(api, durationInBlocks)
+  const createMembersFixture = new BuyMembershipHappyCaseFixture(api, sudo, [...voters, ...applicants], paidTerms)
+  await createMembersFixture.runner(false)
 
+  // The fixture moves manually with sudo the election stages, so proper processing
+  // that normally occurs during stage transitions does not happen. This can lead to a council
+  // that is smaller than the council size if not enough members apply.
   const councilElectionHappyCaseFixture = new CouncilElectionHappyCaseFixture(
     api,
     sudo,
-    m1KeyPairs,
-    m2KeyPairs,
-    paidTerms,
+    voters,
+    applicants,
     K,
     greaterStake,
     lesserStake
   )
   await councilElectionHappyCaseFixture.runner(false)
 
-  db.setMembers(m1KeyPairs)
-  db.setCouncil(m2KeyPairs)
+  db.setMembers([...voters, ...applicants])
+
+  const councilMemberAddresses = (await api.getCouncil()).map((seat) => seat.member.toString())
+  const councilKeyPairs = applicants.filter((keyPair) => councilMemberAddresses.includes(keyPair.address))
+  db.setCouncil(councilKeyPairs)
 }

+ 7 - 12
tests/network-tests/src/flows/leaderSetup.ts

@@ -5,19 +5,18 @@ import BN from 'bn.js'
 import { Utils } from '../utils'
 import { PaidTermId } from '@joystream/types/members'
 import { DbService } from '../DbService'
-import { LeaderHiringHappyCaseFixture } from '../fixtures/leaderHiringHappyCase'
+import { SudoHireLeadFixture } from '../fixtures/sudoHireLead'
 
 // Worker application happy case scenario
 export default async function leaderSetup(api: Api, env: NodeJS.ProcessEnv, db: DbService, group: WorkingGroups) {
-  const sudoUri: string = env.SUDO_ACCOUNT_URI!
-  const keyring = new Keyring({ type: 'sr25519' })
-  if (db.hasLeader(api.getWorkingGroupString(WorkingGroups.StorageWorkingGroup))) {
+  if (db.hasLeader(api.getWorkingGroupString(group))) {
     return
   }
 
+  const sudoUri: string = env.SUDO_ACCOUNT_URI!
+  const keyring = new Keyring({ type: 'sr25519' })
   const sudo: KeyringPair = keyring.addFromUri(sudoUri)
-  const leadKeyPair: KeyringPair[] = Utils.createKeyPairs(keyring, 1)
-
+  const leadKeyPair = Utils.createKeyPairs(keyring, 1)[0]
   const paidTerms: PaidTermId = api.createPaidTermId(new BN(+env.MEMBERSHIP_PAID_TERMS!))
   const applicationStake: BN = new BN(env.WORKING_GROUP_APPLICATION_STAKE!)
   const roleStake: BN = new BN(env.WORKING_GROUP_ROLE_STAKE!)
@@ -26,13 +25,9 @@ export default async function leaderSetup(api: Api, env: NodeJS.ProcessEnv, db:
   const payoutAmount: BN = new BN(env.PAYOUT_AMOUNT!)
   const openingActivationDelay: BN = new BN(0)
 
-  // Pre-conditions: some members, why? Will be hired by sudo
-  const nKeyPairs = db.getMembers()
-
-  const leaderHiringHappyCaseFixture: LeaderHiringHappyCaseFixture = new LeaderHiringHappyCaseFixture(
+  const leaderHiringHappyCaseFixture = new SudoHireLeadFixture(
     api,
     sudo,
-    nKeyPairs,
     leadKeyPair,
     paidTerms,
     applicationStake,
@@ -45,7 +40,7 @@ export default async function leaderSetup(api: Api, env: NodeJS.ProcessEnv, db:
   )
   await leaderHiringHappyCaseFixture.runner(false)
 
-  db.setLeader(leadKeyPair[0], api.getWorkingGroupString(group))
+  db.setLeader(leadKeyPair, api.getWorkingGroupString(group))
 }
 
 /* 

+ 4 - 8
tests/network-tests/src/flows/proposals/electionParametersProposal.ts

@@ -1,9 +1,9 @@
 import { KeyringPair } from '@polkadot/keyring/types'
 import { Keyring } from '@polkadot/api'
 import { Api } from '../../Api'
-import { Utils } from '../../utils'
 import { ElectionParametersProposalFixture } from '../../fixtures/proposalsModule'
 import { DbService } from '../../DbService'
+import { assert } from 'chai'
 
 // Election parameters proposal scenario
 export default async function electionParametersProposal(api: Api, env: NodeJS.ProcessEnv, db: DbService) {
@@ -11,14 +11,10 @@ export default async function electionParametersProposal(api: Api, env: NodeJS.P
   const keyring = new Keyring({ type: 'sr25519' })
   const sudo: KeyringPair = keyring.addFromUri(sudoUri)
 
-  const N: number = +env.MEMBERSHIP_CREATION_N!
-  let m1KeyPairs: KeyringPair[] = Utils.createKeyPairs(keyring, N)
-  let m2KeyPairs: KeyringPair[] = Utils.createKeyPairs(keyring, N)
-
   // Pre-Conditions: some members and an elected council
-  // if (!db.hasCouncil() { }
-  m1KeyPairs = db.getMembers()
-  m2KeyPairs = db.getCouncil()
+  assert(db.hasCouncil())
+  const m1KeyPairs = db.getMembers()
+  const m2KeyPairs = db.getCouncil()
 
   const electionParametersProposalFixture: ElectionParametersProposalFixture = new ElectionParametersProposalFixture(
     api,

+ 1 - 1
tests/network-tests/src/flows/workingGroup/atLeastValueBug.ts

@@ -24,7 +24,7 @@ export default async function zeroAtLeastValueBug(api: Api, env: NodeJS.ProcessE
 
   // Pre-conditions
   // some members and a hired lead
-  assert(db.hasLeader(WorkingGroups.StorageWorkingGroup))
+  assert(db.hasLeader(api.getWorkingGroupString(WorkingGroups.StorageWorkingGroup)))
   const nKeyPairs = db.getMembers()
   leadKeyPair[0] = db.getLeader(api.getWorkingGroupString(WorkingGroups.StorageWorkingGroup))
 

+ 4 - 3
tests/network-tests/src/scenarios/full.ts

@@ -62,7 +62,8 @@ const scenario = async () => {
   debug('Working Group (Content) Mint Capacity Proposal')
   await workingGroupMintCapacityProposal(api, env, db, WorkingGroups.ContentDirectoryWorkingGroup)
 
-  // Leads are fired at the end of the scenarios
+  // Test hiring and firing leads by the council throuh proposals
+  // Leads are fired at the end of the flows
   debug('Lead Role (Storage) Proposals')
   await manageLeaderRole(api, env, db, WorkingGroups.StorageWorkingGroup)
   debug('Lead Role (Content) Proposals')
@@ -70,7 +71,7 @@ const scenario = async () => {
 
   /* workers tests */
 
-  debug('Lead Setup (Storage)')
+  debug('Sudo Hiring Lead (Storage)')
   await leaderSetup(api, env, db, WorkingGroups.StorageWorkingGroup)
   await atLeastValueBug(api, env, db)
 
@@ -81,7 +82,7 @@ const scenario = async () => {
   await workerApplicationRejectionCase(api, env, db, WorkingGroups.StorageWorkingGroup)
   await workerPayout(api, env, db, WorkingGroups.StorageWorkingGroup)
 
-  debug('Lead Setup (Content)')
+  debug('Sudo Hiring Lead (Content)')
   await leaderSetup(api, env, db, WorkingGroups.ContentDirectoryWorkingGroup)
 
   debug('Content Worker Tests')