Browse Source

faucet init - no query checks, simplify setupNewChain scenario

Mokhtar Naamani 3 years ago
parent
commit
5d62385135

+ 3 - 14
tests/integration-tests/src/fixtures/workingGroups/SetLeaderInvitationQuotaFixture.ts

@@ -36,25 +36,14 @@ export class SetLeaderInvitationQuotaFixture extends BaseWorkingGroupFixture {
     return await this.api.retrieveMembershipEventDetails(result, 'LeaderInvitationQuotaUpdated')
   }
 
-  protected assertQueryNodeEventIsValid(qEvent: BudgetSetEventFieldsFragment, i: number): void {
-    assert.equal('1', '1')
-  }
-
-  protected assertQueriedGroupIsValid(qGroup: WorkingGroupFieldsFragment | null): void {
-    Utils.assert(qGroup, 'Query node: Working group not found!')
+  protected assertQueryNodeEventIsValid(qEvent: unknown, i: number): void {
+    // TODO: implement
   }
 
   async runQueryNodeChecks(): Promise<void> {
     await super.runQueryNodeChecks()
 
     // Query and check the events
-    await this.query.tryQueryWithTimeout(
-      () => this.query.getBudgetSetEvents(this.events),
-      (qEvents) => this.assertQueryNodeEventsAreValid(qEvents)
-    )
-
-    // Check the group
-    const qGroup = await this.query.getWorkingGroup(this.group)
-    this.assertQueriedGroupIsValid(qGroup)
+    // TODO: implement
   }
 }

+ 4 - 14
tests/integration-tests/src/scenarios/setupNewChain.ts

@@ -1,26 +1,16 @@
-import electCouncil from '../flows/council/elect'
 import leaderSetup from '../flows/working-groups/leadOpening'
-import updateAccountsFlow from '../misc/updateAllWorkerRoleAccountsFlow'
 import initFaucet from '../flows/faucet/initFaucet'
 import initStorage, { singleBucketConfig as defaultStorageConfig } from '../flows/storage/initStorage'
 import initDistribution, { singleBucketConfig as defaultDistributionConfig } from '../flows/storage/initDistribution'
 import { scenario } from '../Scenario'
 
 scenario('Setup new chain', async ({ job }) => {
-  job('Elect Council', electCouncil)
   const leads = job('Set WorkingGroup Leads', leaderSetup)
-  const updateWorkerAccounts = job('Update worker accounts', updateAccountsFlow).after(leads)
 
-  if (!process.env.SKIP_STORAGE_AND_DISTRIBUTION) {
-    job('initialize storage system', initStorage(defaultStorageConfig)).requires(updateWorkerAccounts)
-    job('initialize distribution system', initDistribution(defaultDistributionConfig)).requires(updateWorkerAccounts)
-  }
+  job('Initialize Faucet', initFaucet).requires(leads)
 
-  if (!process.env.SKIP_FAUCET_INIT) {
-    job('Initialize Faucet', initFaucet).requires(leads)
+  if (!process.env.SKIP_STORAGE_AND_DISTRIBUTION) {
+    job('initialize storage system', initStorage(defaultStorageConfig)).requires(leads)
+    job('initialize distribution system', initDistribution(defaultDistributionConfig)).requires(leads)
   }
-
-  // TODO: Mock content
-  // assign members known accounts?
-  // assign council known accounts?
 })