fix(lint): F821 undefined 'e' in test_scm_configured; shfmt/ruff auto-fixes
- test_scm_configured.py: remove reference to exception variable `e` outside its except block (F821); assert message doesn't need the code value - shfmt auto-formatted install_steps.sh (spacing in write_env call) - ruff auto-fixed one remaining issue - 19/19 unit tests pass; lint PASS Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@ -81,14 +81,12 @@ def test_login_redirects_to_gitea_dep(live_app, deps):
|
||||
redirect_url = e.headers.get("Location") or e.headers.get("location", "")
|
||||
|
||||
assert redirect_url, (
|
||||
f"Drone /login returned {e.code} but Location header is empty — "
|
||||
f"check drone gitea SCM configuration"
|
||||
"Drone /login returned a redirect but Location header is empty — "
|
||||
"check drone gitea SCM configuration"
|
||||
)
|
||||
|
||||
parsed = urllib.parse.urlparse(redirect_url)
|
||||
assert parsed.scheme == "https", (
|
||||
f"Redirect Location has unexpected scheme: {redirect_url!r}"
|
||||
)
|
||||
assert parsed.scheme == "https", f"Redirect Location has unexpected scheme: {redirect_url!r}"
|
||||
assert parsed.netloc == gitea_domain, (
|
||||
f"Drone /login did not redirect to the gitea dep ({gitea_domain!r}); "
|
||||
f"Location: {redirect_url!r} — check GITEA_DOMAIN + COMPOSE_FILE in drone's .env"
|
||||
|
||||
@ -52,7 +52,7 @@ write_env COMPOSE_FILE "compose.yml:compose.gitea.yml"
|
||||
|
||||
# 2. Wire gitea identity into drone's .env.
|
||||
write_env GITEA_CLIENT_ID "$GITEA_CLIENT_ID"
|
||||
write_env GITEA_DOMAIN "$GITEA_DOMAIN"
|
||||
write_env GITEA_DOMAIN "$GITEA_DOMAIN"
|
||||
|
||||
# 3. Insert the gitea OAuth2 client_secret as a swarm secret at version v1.
|
||||
# The secret does not exist yet (abra secret generate only creates secrets declared in the
|
||||
|
||||
Reference in New Issue
Block a user