Skip to content

Commit 3d05ecb

Browse files
committed
Update Polkadot relay/AH multisig snapshots
1 parent 7f4518f commit 3d05ecb

File tree

5 files changed

+206
-40
lines changed

5 files changed

+206
-40
lines changed
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
ASSETHUBKUSAMA_BLOCK_NUMBER=11440430
2-
BASILISK_BLOCK_NUMBER=11766570
3-
BRIDGEHUBKUSAMA_BLOCK_NUMBER=6853847
4-
CORETIMEKUSAMA_BLOCK_NUMBER=3797454
5-
ENCOINTERKUSAMA_BLOCK_NUMBER=11282840
6-
INTEGRITEEKUSAMA_BLOCK_NUMBER=8814593
7-
KARURA_BLOCK_NUMBER=10277414
8-
KUSAMA_BLOCK_NUMBER=30742540
9-
MOONRIVER_BLOCK_NUMBER=13730033
10-
PEOPLEKUSAMA_BLOCK_NUMBER=6351475
11-
SHIDEN_BLOCK_NUMBER=12413318
1+
ASSETHUBKUSAMA_BLOCK_NUMBER=11505143
2+
BASILISK_BLOCK_NUMBER=11836812
3+
BRIDGEHUBKUSAMA_BLOCK_NUMBER=6888549
4+
CORETIMEKUSAMA_BLOCK_NUMBER=3829570
5+
ENCOINTERKUSAMA_BLOCK_NUMBER=11340629
6+
INTEGRITEEKUSAMA_BLOCK_NUMBER=8848225
7+
KARURA_BLOCK_NUMBER=10305323
8+
KUSAMA_BLOCK_NUMBER=30813772
9+
MOONRIVER_BLOCK_NUMBER=13795586
10+
PEOPLEKUSAMA_BLOCK_NUMBER=6418356
11+
SHIDEN_BLOCK_NUMBER=12476897
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
ACALA_BLOCK_NUMBER=9758901
2-
ASSETHUBPOLKADOT_BLOCK_NUMBER=10182413
3-
ASTAR_BLOCK_NUMBER=10844357
4-
BRIDGEHUBPOLKADOT_BLOCK_NUMBER=6288286
5-
COLLECTIVESPOLKADOT_BLOCK_NUMBER=7486109
6-
CORETIMEPOLKADOT_BLOCK_NUMBER=2898364
7-
HYDRATION_BLOCK_NUMBER=9861942
8-
INTEGRITEEPOLKADOT_BLOCK_NUMBER=5616683
9-
MOONBEAM_BLOCK_NUMBER=13149240
10-
PEOPLEPOLKADOT_BLOCK_NUMBER=3225266
11-
POLKADOT_BLOCK_NUMBER=28414859
1+
ACALA_BLOCK_NUMBER=9793227
2+
ASSETHUBPOLKADOT_BLOCK_NUMBER=10250780
3+
ASTAR_BLOCK_NUMBER=10915298
4+
BRIDGEHUBPOLKADOT_BLOCK_NUMBER=6321493
5+
COLLECTIVESPOLKADOT_BLOCK_NUMBER=7519386
6+
CORETIMEPOLKADOT_BLOCK_NUMBER=2930818
7+
HYDRATION_BLOCK_NUMBER=9932953
8+
INTEGRITEEPOLKADOT_BLOCK_NUMBER=5638300
9+
MOONBEAM_BLOCK_NUMBER=13211709
10+
PEOPLEPOLKADOT_BLOCK_NUMBER=3257980
11+
POLKADOT_BLOCK_NUMBER=28458722

packages/polkadot/src/__snapshots__/assetHubPolkadot.multisig.proxy.e2e.test.ts.snap

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ exports[`Polkadot AssetHub Multisig Proxy > success tests > 2-of-3 multisig with
9393
"data": {
9494
"approving": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA",
9595
"callHash": "(hash)",
96-
"multisig": "123g6BR5ndKLv82TmeJDTV9eire6XbjFMKAEs89xv8QqQBwH",
96+
"multisig": "165Di6wpt2o9EdqVNcVe6j6AYnejwSsojC1fTSrci7scwGC6",
9797
},
9898
"method": "NewMultisig",
9999
"section": "multisig",
@@ -105,9 +105,9 @@ exports[`Polkadot AssetHub Multisig Proxy > success tests > 2-of-3 multisig with
105105
[
106106
{
107107
"data": {
108-
"approving": "1xaSQU5v7RsZEYHzQHcQZUrCxuJCzxFSmFbPNdcg46haPSh",
108+
"approving": "14oDWsVuZ3p6xtdMyzXj9oNknD98nniLjxWJnc2ejNvggUg1",
109109
"callHash": "(hash)",
110-
"multisig": "123g6BR5ndKLv82TmeJDTV9eire6XbjFMKAEs89xv8QqQBwH",
110+
"multisig": "165Di6wpt2o9EdqVNcVe6j6AYnejwSsojC1fTSrci7scwGC6",
111111
"result": "Ok",
112112
"timepoint": {
113113
"height": "(redacted)",
@@ -126,7 +126,7 @@ exports[`Polkadot AssetHub Multisig Proxy > success tests > 2-of-3 multisig with
126126
"data": {
127127
"approving": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA",
128128
"callHash": "(hash)",
129-
"multisig": "13tWZWfquohsYjqW1uTVTQFK32Xw5EyPWzHJs3dGFMPNwBbV",
129+
"multisig": "13vgDq9rXDQjbyzX59sXVrgUHaEdMoMb3sFJ4Fe5aZJF3r9g",
130130
},
131131
"method": "NewMultisig",
132132
"section": "multisig",
@@ -138,9 +138,9 @@ exports[`Polkadot AssetHub Multisig Proxy > success tests > 2-of-3 multisig with
138138
[
139139
{
140140
"data": {
141-
"approving": "13ujXjiPYAn7WwZ8AzdjspwDxjTpZoPLYFGDbZUkcDF1V6ee",
141+
"approving": "1kvXQbGhPp2m1QteEPVbTBD75roMPxTJgGB2NQKEiAYEdEf",
142142
"callHash": "(hash)",
143-
"multisig": "13tWZWfquohsYjqW1uTVTQFK32Xw5EyPWzHJs3dGFMPNwBbV",
143+
"multisig": "13vgDq9rXDQjbyzX59sXVrgUHaEdMoMb3sFJ4Fe5aZJF3r9g",
144144
"result": "Ok",
145145
"timepoint": {
146146
"height": "(redacted)",
@@ -159,7 +159,7 @@ exports[`Polkadot AssetHub Multisig Proxy > success tests > 2-of-3 multisig with
159159
"data": {
160160
"approving": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA",
161161
"callHash": "(hash)",
162-
"multisig": "12xq4cVMvLkp9Kv7UHNoVZMde3crJHheNpTjbJnQ2Hv1eFsx",
162+
"multisig": "138kRukNneB5vqBDWT8iEP9XNUKzzNXfZQ6HvF4ySv2ZM6j2",
163163
},
164164
"method": "NewMultisig",
165165
"section": "multisig",
@@ -171,9 +171,9 @@ exports[`Polkadot AssetHub Multisig Proxy > success tests > Cancel 2-of-3 multis
171171
[
172172
{
173173
"data": {
174-
"approving": "12ibpuuQ5Ed8EAEx9URDzPejAxJLE3fXYzy3qxVXYVZCgZeQ",
174+
"approving": "12pnwYspiTftxXrNtJHdJJ8VQzDTSxS747ApkHCoKmj8T16q",
175175
"callHash": "(hash)",
176-
"multisig": "14qiJnYBtCLiYjvsTYondSvtHBsMC74Ne4KXzsyVKcVgCqA9",
176+
"multisig": "13ejFAmDX9a17g2Y4SZncqQ3vZ5RDGWNCJy7vnWDc337ggvB",
177177
},
178178
"method": "NewMultisig",
179179
"section": "multisig",

packages/polkadot/src/__snapshots__/polkadot.multisig.proxy.e2e.test.ts.snap

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ exports[`Polkadot Multisig with Proxy > success tests > 2-of-3 multisig with pur
9393
"data": {
9494
"approving": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA",
9595
"callHash": "(hash)",
96-
"multisig": "16NeQbzNHbfmGCVPD6tA3qFsEponYqXpADjv27hwjpsfTaZf",
96+
"multisig": "144t7L22krXWbW3JijPQBaDK5BPwneNX3kuM1hdpXgNVHEM5",
9797
},
9898
"method": "NewMultisig",
9999
"section": "multisig",
@@ -105,9 +105,9 @@ exports[`Polkadot Multisig with Proxy > success tests > 2-of-3 multisig with pur
105105
[
106106
{
107107
"data": {
108-
"approving": "1qJT29288Umo7YdPtWEfVmqxyFMQAC6WPzHHenZrxBonte8",
108+
"approving": "1MAgLAk1E7xgvRCAwCMzbmSt4gnhkKC28VriRTBkjxMw6rg",
109109
"callHash": "(hash)",
110-
"multisig": "16NeQbzNHbfmGCVPD6tA3qFsEponYqXpADjv27hwjpsfTaZf",
110+
"multisig": "144t7L22krXWbW3JijPQBaDK5BPwneNX3kuM1hdpXgNVHEM5",
111111
"result": "Ok",
112112
"timepoint": {
113113
"height": "(redacted)",
@@ -126,7 +126,7 @@ exports[`Polkadot Multisig with Proxy > success tests > 2-of-3 multisig with pur
126126
"data": {
127127
"approving": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA",
128128
"callHash": "(hash)",
129-
"multisig": "12h1G61FWCY59B4APEMYZyuJ7RJ9jDcn21pgr9ZqsiSBmqf",
129+
"multisig": "14SZZsMHhgfizvsfVTH1zGzQ9vv2fGhzYZeK3L1riLGSEexa",
130130
},
131131
"method": "NewMultisig",
132132
"section": "multisig",
@@ -138,9 +138,9 @@ exports[`Polkadot Multisig with Proxy > success tests > 2-of-3 multisig with pur
138138
[
139139
{
140140
"data": {
141-
"approving": "1572j2AQjhbeYrCwJgEMmsCsiAmnh6T2CDAxNvKsCtwybuYg",
141+
"approving": "17tHttYwMwRu1XSyPbTCUnuNAjcWJZidcZoKsD3hCsDF838",
142142
"callHash": "(hash)",
143-
"multisig": "12h1G61FWCY59B4APEMYZyuJ7RJ9jDcn21pgr9ZqsiSBmqf",
143+
"multisig": "14SZZsMHhgfizvsfVTH1zGzQ9vv2fGhzYZeK3L1riLGSEexa",
144144
"result": "Ok",
145145
"timepoint": {
146146
"height": "(redacted)",
@@ -159,7 +159,7 @@ exports[`Polkadot Multisig with Proxy > success tests > 2-of-3 multisig with pur
159159
"data": {
160160
"approving": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA",
161161
"callHash": "(hash)",
162-
"multisig": "14SKBGJrGa1UYSeAU5QSkcZuiVcPZkBsaB2oQMcRxx7WZg3m",
162+
"multisig": "1FckifYfYmY8Ug2mUdSLiQx5CZXyCVAqArU1E4viCQyMr5Q",
163163
},
164164
"method": "NewMultisig",
165165
"section": "multisig",
@@ -171,9 +171,9 @@ exports[`Polkadot Multisig with Proxy > success tests > Cancel 2-of-3 multisig w
171171
[
172172
{
173173
"data": {
174-
"approving": "13URjyjzXwWwJKsnSuDcbdGbsLRwGx14yM2Uc4oArEH4VcH4",
174+
"approving": "14Ahg5xow3FiuY46qFDfHvC4Mtfr4sYLhzyguKeXdsDDWEA6",
175175
"callHash": "(hash)",
176-
"multisig": "1k5776J7i9HPvJwWD8VXnr8Z35WWrx5fGBqxNC6vNWoKC8E",
176+
"multisig": "14ZGJhgW71gHXJTon3d8U9Xnh8bbXDbMUSNhvhWyvDzQjpuc",
177177
},
178178
"method": "NewMultisig",
179179
"section": "multisig",

scripts/print-test-tree.ts

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
#!/usr/bin/env tsx
2+
3+
import { createVitest } from 'vitest/node'
4+
5+
import { readdir } from 'node:fs/promises'
6+
import { join, relative, resolve } from 'node:path'
7+
8+
/**
9+
* Recursively find all test files in a directory
10+
*/
11+
async function findTestFiles(dir: string): Promise<string[]> {
12+
const entries = await readdir(dir, { withFileTypes: true })
13+
const files = await Promise.all(
14+
entries.map(async (entry) => {
15+
const fullPath = join(dir, entry.name)
16+
if (entry.isDirectory() && entry.name !== '__snapshots__' && entry.name !== 'node_modules') {
17+
return findTestFiles(fullPath)
18+
}
19+
if (entry.isFile() && entry.name.endsWith('.test.ts')) {
20+
return [fullPath]
21+
}
22+
return []
23+
}),
24+
)
25+
return files.flat()
26+
}
27+
28+
/**
29+
* Recursively visit and print test collection
30+
*/
31+
function visit(collection: any, indent: string = '', isLast: boolean = true): { tests: number; suites: number } {
32+
let tests = 0
33+
let suites = 0
34+
35+
const tasks = Array.from(collection)
36+
37+
for (let i = 0; i < tasks.length; i++) {
38+
const task = tasks[i]
39+
const isLastTask = i === tasks.length - 1
40+
const connector = isLastTask ? '└─ ' : '├─ '
41+
const nextIndent = indent + (isLastTask ? ' ' : '│ ')
42+
43+
if (task.type === 'suite') {
44+
console.log(`${indent}${connector}📦 ${task.name}`)
45+
suites++
46+
47+
const childCounts = visit(task.children, nextIndent, isLastTask)
48+
tests += childCounts.tests
49+
suites += childCounts.suites
50+
} else if (task.type === 'test') {
51+
console.log(`${indent}${connector}${task.name}`)
52+
tests++
53+
}
54+
}
55+
56+
return { tests, suites }
57+
}
58+
59+
/**
60+
* Main function
61+
*/
62+
async function main() {
63+
const network = process.argv[2]
64+
const chain = process.argv[3]
65+
66+
if (!network) {
67+
console.error('Usage: tsx scripts/print-test-tree.ts <network> [chain]')
68+
console.error('')
69+
console.error('Examples:')
70+
console.error(' tsx scripts/print-test-tree.ts kusama # All Kusama tests')
71+
console.error(' tsx scripts/print-test-tree.ts kusama assetHub # AssetHub Kusama tests only')
72+
console.error(' tsx scripts/print-test-tree.ts kusama kusama # Kusama relay chain only')
73+
console.error(' tsx scripts/print-test-tree.ts polkadot people # People Polkadot tests only')
74+
process.exit(1)
75+
}
76+
77+
try {
78+
const filterInfo = chain ? ` (chain: ${chain})` : ''
79+
console.log(`\n🔍 Collecting tests for network: ${network}${filterInfo}...\n`)
80+
81+
const packagesDir = resolve(process.cwd(), 'packages', network, 'src')
82+
83+
// Find all test files
84+
let testFiles = await findTestFiles(packagesDir)
85+
86+
// Filter by chain if specified
87+
if (chain) {
88+
const chainPattern = chain.charAt(0).toLowerCase() + chain.slice(1)
89+
testFiles = testFiles.filter((file) => {
90+
const fileName = file.split('/').pop() || ''
91+
return fileName.toLowerCase().startsWith(chainPattern.toLowerCase())
92+
})
93+
}
94+
95+
if (testFiles.length === 0) {
96+
console.log('⚠️ No test files found!')
97+
return
98+
}
99+
100+
// Print header
101+
console.log('='.repeat(80))
102+
const title = chain
103+
? `TEST TREE STRUCTURE FOR: ${network.toUpperCase()} - ${chain.toUpperCase()}`
104+
: `TEST TREE STRUCTURE FOR: ${network.toUpperCase()}`
105+
console.log(title)
106+
console.log('='.repeat(80))
107+
108+
let totalTests = 0
109+
let totalSuites = 0
110+
let totalFiles = 0
111+
112+
// Collect and print each file
113+
for (const file of testFiles.sort()) {
114+
const relPath = relative(packagesDir, file)
115+
116+
// Create fresh vitest instance for each file to avoid state accumulation
117+
const vitest = await createVitest('test', {
118+
watch: false,
119+
run: false,
120+
})
121+
122+
// Collect tests from this file
123+
const result = await vitest.collect([file])
124+
125+
// Close immediately after collection
126+
await vitest.close()
127+
128+
if (!result || !result.testModules || result.testModules.length === 0) {
129+
continue
130+
}
131+
132+
console.log(`\n📄 ${relPath}`)
133+
console.log('─'.repeat(80))
134+
135+
// Visit all test modules
136+
const fileCounts = { tests: 0, suites: 0 }
137+
for (const module of result.testModules) {
138+
const counts = visit(module.children, '', true)
139+
fileCounts.tests += counts.tests
140+
fileCounts.suites += counts.suites
141+
}
142+
143+
totalTests += fileCounts.tests
144+
totalSuites += fileCounts.suites
145+
totalFiles++
146+
147+
console.log(`\n Tests: ${fileCounts.tests}, Suites: ${fileCounts.suites}`)
148+
}
149+
150+
console.log(`\n${'='.repeat(80)}`)
151+
console.log('SUMMARY')
152+
console.log('='.repeat(80))
153+
console.log(`Total files: ${totalFiles}`)
154+
console.log(`Total tests: ${totalTests}`)
155+
console.log(`Total suites: ${totalSuites}`)
156+
console.log('='.repeat(80) + '\n')
157+
} catch (error) {
158+
console.error('❌ Error:', error instanceof Error ? error.message : error)
159+
if (error instanceof Error && error.stack) {
160+
console.error(error.stack)
161+
}
162+
process.exit(1)
163+
}
164+
}
165+
166+
main()

0 commit comments

Comments
 (0)