Skip to content

Commit a896e67

Browse files
committed
ci: scope Cadence tests to mirror tests only (phase 1)
1 parent c96a3e6 commit a896e67

2 files changed

Lines changed: 19 additions & 2 deletions

File tree

cadence/tests/test_helpers.cdc

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,12 @@ access(all) fun deployContracts() {
131131
arguments: []
132132
)
133133
Test.expect(err, Test.beNil())
134-
// TidalYieldClosedBeta deployed only when needed (origin/main)
134+
err = Test.deployContract(
135+
name: "TidalYieldClosedBeta",
136+
path: "../contracts/TidalYieldClosedBeta.cdc",
137+
arguments: []
138+
)
139+
Test.expect(err, Test.beNil())
135140
err = Test.deployContract(
136141
name: "TidalYield",
137142
path: "../contracts/TidalYield.cdc",
@@ -164,6 +169,18 @@ access(all) fun deployContracts() {
164169
setupBetaAccess()
165170
}
166171

172+
access(all)
173+
fun ensurePoolFactoryAndCreatePool(signer: Test.TestAccount, defaultTokenIdentifier: String) {
174+
// TidalProtocol init stores a PoolFactory at the protocol account as part of contract init.
175+
// If for any reason it's missing, no separate tx exists here; we just proceed to create the pool.
176+
let res = _executeTransaction(
177+
"../transactions/tidal-protocol/pool-factory/create_and_store_pool.cdc",
178+
[defaultTokenIdentifier],
179+
signer
180+
)
181+
Test.expect(res, Test.beSucceeded())
182+
}
183+
167184
access(all)
168185
fun setupTidalProtocol(signer: Test.TestAccount) {
169186
let res = _executeTransaction("../transactions/tidal-protocol/create_and_store_pool.cdc",

0 commit comments

Comments
 (0)