Skip to content

Commit

Permalink
change baker whitelist integration test (#4447)
Browse files Browse the repository at this point in the history
  • Loading branch information
hedi-edelbloute authored Aug 23, 2023
1 parent 213b66a commit 3aa1ab0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ tz1V3yg82mcrPJbegqVCPn6bC8w1CSTRp3f8
tz1aRoaRhSpRYvFdyvgWLL6TGyRoGF51wDjM
tz1MQJPGNMijnXnVoBENFz9rUhaPt3S7rWoz
tz1dRKU4FQ9QRRQPdaH4zCR6gmCmXfcvcgtB
tz1aDiEJf9ztRrAJEXZfcG3CKimoKsGhwVAi
tz1axcnVN9tZnCe4sQQhC6f3tfSEXdjPaXPY`.split("\n");
tz1aDiEJf9ztRrAJEXZfcG3CKimoKsGhwVAi`.split("\n");

// we give no ordering preference. it's settled at module load time
whitelist.sort(() => Math.random() - 0.5);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,20 @@ function makeAccount(name, pubkey, address, derivationMode) {
testBridge(dataset);

describe("tezos bakers", () => {
// FIXME Flaky test that will fail every time a Tezos baker is discontinued
test("getting the bakers", async () => {
const list = await listBakers(whitelist);
expect(list.map(o => o.address)).toEqual(whitelist);
test("atleast 10 whitelisted bakers are online", async () => {
const bakers = await listBakers(whitelist);
const retrievedAddresses = bakers.map(o => o.address);
let available = 0;
for (const whitelisted of whitelist) {
if (retrievedAddresses.includes(whitelisted)) {
available++;
} else {
console.warn(`Baker ${whitelisted} no longer online !`);
}
}
expect(available).toBeGreaterThan(10);
});

// TODO we'll need two accounts to test diff cases
test("load account baker info", async () => {
const account = fromAccountRaw(accountTZrevealedDelegating);
Expand Down

2 comments on commit 3aa1ab0

@vercel
Copy link

@vercel vercel bot commented on 3aa1ab0 Aug 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Bot] Testing with 'Nitrogen' 💰 1 miss funds ($0.00) ⏲ 10.5s

💰 1 specs may miss funds: quicksilver

What is the bot and how does it work? Everything is documented here!

⚠️ 1 spec hints
  • Spec quicksilver:
    • There are not enough accounts to cover all mutations. Please increase the account target to at least 7 accounts
Details of the 0 mutations

Spec quicksilver (failed)

Spec quicksilver found 1 Quicksilver accounts (preload: 517ms). Will use Cosmos 2.34.9 on nanoS 2.1.0
Quicksilver 1 cross: 0 QCK (0ops) (quick1rs97j43nfyvc689y5rjvnnhrq3tes6ghscch6l on 44'/118'/0'/0/0) #0 js:2:quicksilver:quick1rs97j43nfyvc689y5rjvnnhrq3tes6ghscch6l:

This SEED does not have Quicksilver. Please send funds to quick1rs97j43nfyvc689y5rjvnnhrq3tes6ghscch6l

Details of the 6 uncovered mutations

Spec quicksilver (6)

  • send some:
  • send max:
  • delegate new validators:
  • undelegate:
  • redelegate:
  • claim rewards:
Portfolio ($0.00) – Details of the 1 currencies
Spec (accounts) State Remaining Runs (est) funds?
quicksilver (1) 0 ops , 0 QCK ($0.00) quick1rs97j43nfyvc689y5rjvnnhrq3tes6ghscch6l
Quicksilver 1 cross: 0 QCK (0ops) (quick1rs97j43nfyvc689y5rjvnnhrq3tes6ghscch6l on 44'/118'/0'/0/0) #0 js:2:quicksilver:quick1rs97j43nfyvc689y5rjvnnhrq3tes6ghscch6l:
Performance ⏲ 10.5s

Time spent for each spec: (total across mutations)

Spec (accounts) preload scan re-sync tx status sign op broadcast test destination test
TOTAL 517ms 3.2s N/A N/A N/A N/A N/A N/A
quicksilver (0) 517ms 3.2s N/A N/A N/A N/A N/A N/A

What is the bot and how does it work? Everything is documented here!

Please sign in to comment.