fix: rewrite smoke-init.sh for mock Forgejo + restore pipeline #143
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The current
tests/smoke-init.shis the old version designed for real Forgejo (checks forsetup-adminbootstrap user, usesMOCK_STATE). It needs to be rewritten for the mock Forgejo server (tests/mock-forgejo.py).What to do
1. Replace
tests/smoke-init.shentirelyDelete the current content and write a new test. The test must:
Step 1 — Verify mock is ready:
${FORGE_URL}/api/v1/versionuntil it responds (max 30s)Step 2 — Set up mock binaries:
/tmp/smoke-mock-bin/dockermock script (see below)/tmp/smoke-mock-bin/claudemock (echo auth success)/tmp/smoke-mock-bin/tmuxmock (exit 0)export PATH="/tmp/smoke-mock-bin:$PATH"PASS: Mock binaries installedStep 3 — Run disinto init:
USER=$(whoami)thenexport USER(two lines — SC2155)git config --global user.email/namebash bin/disinto init smoke-org/smoke-repo --bare --yes --forge-url "$FORGE_URL" --repo-root /tmp/smoke-test-repoStep 4 — Verify Forgejo state:
GET /api/v1/users/disinto-adminexistsGET /api/v1/users/dev-botexistsGET /api/v1/users/review-botexistssmoke-org/smoke-repo,dev-bot/smoke-repo,disinto-admin/smoke-repo)Step 5 — Verify local state:
projects/smoke-repo.tomlexists and hasname = "smoke-repo".envcontainsFORGE_TOKEN=.envcontainsFORGE_REVIEW_TOKEN=/tmp/smoke-test-repo/.gitexistsStep 6 — Verify cron:
crontab -lcontainsdev-poll.shcrontab -lcontainsreview-poll.shcrontab -lcontainsgardener-run.shNO setup-admin, NO MOCK_STATE, NO bootstrap credentials. The mock accepts all API calls without pre-existing users.
Docker mock script
The docker mock intercepts
docker execcalls thatdisinto init --baremakes to the Forgejo CLI:2. Create
.woodpecker/smoke-init.ymlAffected files
tests/smoke-init.sh(full rewrite — delete and recreate).woodpecker/smoke-init.yml(new)Acceptance criteria
setup-adminorMOCK_STATEor bootstrap credentialsdocker execcalls init makesUSER=$(whoami); export USER(two lines)FORGE_REVIEW_TOKEN(notFORGE_TOKEN_2)Dependencies
Depends on #145 (env_file bug must be fixed first — init will fail without it).
Blocked — issue #143
ci_exhausted2026-04-02T11:21:38Z🚧 Dev-agent: Unmet dependency
Blocked by open issues
This issue depends on #145, which is not yet closed.
Suggestion: Work on #145 first.
Automated assessment by dev-agent · 2026-04-02 11:41 UTC
Blocked — issue #143
ci_exhausted_poll (3 attempts, PR #144)2026-04-02T11:57:07Z