Skip to content

Commit b2898b6

Browse files
committed
fix: handle CI timing for wallet-health live test
- Fall back on 403 (not just 404) when v2 is disabled in v1-only CI - Move wallet-health test after org creation so the DataLayer wallet exists (Chia auto-creates it on first datalayer interaction)
1 parent af9b167 commit b2898b6

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

.github/workflows/tests.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -406,15 +406,15 @@ jobs:
406406
env:
407407
TEST_API_HOST: 127.0.0.1
408408
run: |
409-
echo "########################################################"
410-
echo "Running wallet health sanity check"
411-
echo "########################################################"
412-
npm run test:v2:live:wallet-health
413409
echo "########################################################"
414410
echo "Running organization creation tests"
415411
echo "########################################################"
416412
npm run test:v2:live:organization:create
417413
echo "########################################################"
414+
echo "Running wallet health sanity check"
415+
echo "########################################################"
416+
npm run test:v2:live:wallet-health
417+
echo "########################################################"
418418
echo "Running data tests"
419419
echo "########################################################"
420420
npm run test:v2:live:data:short
@@ -778,15 +778,15 @@ jobs:
778778
env:
779779
TEST_API_HOST: 127.0.0.1
780780
run: |
781-
echo "########################################################"
782-
echo "Running wallet health sanity check"
783-
echo "########################################################"
784-
npm run test:v2:live:wallet-health
785781
echo "########################################################"
786782
echo "Running V1 organization creation tests"
787783
echo "########################################################"
788784
npm run test:v1:live:organization:create
789785
echo "########################################################"
786+
echo "Running wallet health sanity check"
787+
echo "########################################################"
788+
npm run test:v2:live:wallet-health
789+
echo "########################################################"
790790
echo "Running V1 data tests"
791791
echo "########################################################"
792792
npm run test:v1:live:data:short

tests/v2/live-api/wallet-health.live.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ describe('Wallet Health - Live', function () {
3535

3636
describe('CADT /health/wallet endpoint', function () {
3737
it('should report DataLayer wallet as available', async function () {
38-
// Try v2 first, fall back to v1
38+
// Try v2 first, fall back to v1 (v2 returns 403 or 404 when disabled)
3939
let res = await request.get('/v2/health/wallet');
40-
if (res.status === 404) {
40+
if (res.status === 403 || res.status === 404) {
4141
res = await request.get('/v1/health/wallet');
4242
}
4343
expect(res.status).to.equal(200);

0 commit comments

Comments
 (0)