Skip to content

Commit 4358d02

Browse files
committed
test: hard-fail Sepolia stop-loss test when prereqs missing
Revert the t.Skipf change from the previous commit and additionally convert the existing OWNER_EOA t.Skip to a require.True. Integration tests that cannot run because env vars or wallet funding are missing should fail loudly so the gap gets fixed, not be silently skipped. The testing.Short() guard at the top stays - that is a deliberate fast-mode opt-out, not a missing-prereq skip.
1 parent 88e9139 commit 4358d02

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

core/taskengine/simulate_uniswap_workflow_test.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ func TestSimulateTask_StopLossWorkflow_Sepolia(t *testing.T) {
4545
}
4646

4747
ownerAddr, ok := testutil.MustGetTestOwnerAddress()
48-
if !ok {
49-
t.Skip("OWNER_EOA not set; skipping")
50-
}
48+
require.True(t, ok, "OWNER_EOA must be set to run this Sepolia integration test")
5149
ownerAddress := *ownerAddr
5250

5351
cfg, err := config.NewConfig(testutil.GetConfigPath(testutil.DefaultConfigPath))
@@ -67,9 +65,8 @@ func TestSimulateTask_StopLossWorkflow_Sepolia(t *testing.T) {
6765

6866
usdcBalance := fetchERC20Balance(t, client, SEPOLIA_USDC, smartWalletAddr.Hex())
6967
t.Logf("USDC balance: %s (6 decimals)", usdcBalance.String())
70-
if usdcBalance.Cmp(big.NewInt(2_000_000)) < 0 {
71-
t.Skipf("smart wallet %s must hold at least 2 USDC to run this test", smartWalletAddr.Hex())
72-
}
68+
require.True(t, usdcBalance.Cmp(big.NewInt(2_000_000)) >= 0,
69+
"wallet must hold at least 2 USDC; fund %s", smartWalletAddr.Hex())
7370

7471
db := testutil.TestMustDB()
7572
t.Cleanup(func() { storage.Destroy(db.(*storage.BadgerStorage)) })

0 commit comments

Comments
 (0)