🤖 stabilize gateway tests + cache-only targets
What: - bypass DNS lookup in SSRF resolver when MOLTBOT_DNS_BYPASS=1 - set DNS bypass env vars for gateway tests - update cache-only workflow to moltbot package names Why: - fix Garnix gateway-tests in no-DNS environments - keep cache-only checks aligned with renamed packages Tests: - not run (CI/Garnix)
This commit is contained in:
parent
d4e65b3c8b
commit
c47927fdb3
14
.github/workflows/cache-only.yml
vendored
14
.github/workflows/cache-only.yml
vendored
@ -51,13 +51,13 @@ jobs:
|
||||
fallback = false
|
||||
run: |
|
||||
nix build --no-link --accept-flake-config \
|
||||
.#packages.aarch64-darwin.clawdbot \
|
||||
.#packages.aarch64-darwin.clawdbot-gateway \
|
||||
.#packages.aarch64-darwin.clawdbot-tools \
|
||||
.#packages.aarch64-darwin.clawdbot-app \
|
||||
.#packages.x86_64-linux.clawdbot \
|
||||
.#packages.x86_64-linux.clawdbot-gateway \
|
||||
.#packages.x86_64-linux.clawdbot-tools \
|
||||
.#packages.aarch64-darwin.moltbot \
|
||||
.#packages.aarch64-darwin.moltbot-gateway \
|
||||
.#packages.aarch64-darwin.moltbot-tools \
|
||||
.#packages.aarch64-darwin.moltbot-app \
|
||||
.#packages.x86_64-linux.moltbot \
|
||||
.#packages.x86_64-linux.moltbot-gateway \
|
||||
.#packages.x86_64-linux.moltbot-tools \
|
||||
.#checks.aarch64-darwin.gateway \
|
||||
.#checks.x86_64-linux.gateway \
|
||||
.#checks.x86_64-linux.gateway-tests \
|
||||
|
||||
@ -32,6 +32,25 @@ if [ -f src/agents/shell-utils.ts ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -f src/infra/net/ssrf.ts ]; then
|
||||
if ! grep -q "MOLTBOT_DNS_BYPASS" src/infra/net/ssrf.ts; then
|
||||
awk '
|
||||
/const results = await lookupFn/ {
|
||||
print " if (process.env.MOLTBOT_DNS_BYPASS === \"1\") {";
|
||||
print " const address = (process.env.MOLTBOT_DNS_BYPASS_IP ?? \"\").trim() || \"93.184.216.34\";";
|
||||
print " return {";
|
||||
print " hostname: normalized,";
|
||||
print " addresses: [address],";
|
||||
print " lookup: createPinnedLookup({ hostname: normalized, addresses: [address] }),";
|
||||
print " };";
|
||||
print " }";
|
||||
}
|
||||
{ print }
|
||||
' src/infra/net/ssrf.ts > src/infra/net/ssrf.ts.next
|
||||
mv src/infra/net/ssrf.ts.next src/infra/net/ssrf.ts
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -f src/docker-setup.test.ts ]; then
|
||||
if ! grep -q "#!/bin/sh" src/docker-setup.test.ts; then
|
||||
sed -i 's|#!/usr/bin/env bash|#!/bin/sh|' src/docker-setup.test.ts
|
||||
|
||||
@ -22,5 +22,7 @@ export VITEST_MIN_THREADS="1"
|
||||
export VITEST_MAX_THREADS="1"
|
||||
export VITEST_MIN_WORKERS="1"
|
||||
export VITEST_MAX_WORKERS="1"
|
||||
export MOLTBOT_DNS_BYPASS="1"
|
||||
export MOLTBOT_DNS_BYPASS_IP="93.184.216.34"
|
||||
|
||||
pnpm test -- --testTimeout=20000
|
||||
|
||||
Loading…
Reference in New Issue
Block a user