Skip to content

Commit 905dafb

Browse files
committed
test(tooling): remove delayed activity fixture responses
1 parent 9cc05cc commit 905dafb

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

‎test/scripts/github-activity-helper.test.ts‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const helperPath = path.join(
1313
const { createTempDir } = createScriptTestHarness();
1414

1515
type Fixture = {
16-
blockActivity?: boolean;
16+
timeoutActivity?: boolean;
1717
now?: string;
1818
profile?: unknown;
1919
search?: unknown[];
@@ -57,7 +57,7 @@ if body=$(jq -cn --slurpfile fixtures "$FIXTURE" --slurpfile requests "$REQUEST_
5757
$fixtures[0] as $fixture | $ARGS.positional as $args |
5858
if any($fixture.fail[]?; . as $needle | any($args[]; contains($needle))) then
5959
null | halt_error(1)
60-
elif $fixture.blockActivity and $args[0] == "api" and ($args[1] | startswith("users/") | not) then
60+
elif $fixture.timeoutActivity and $args[0] == "api" and ($args[1] | startswith("users/") | not) then
6161
null | halt_error(124)
6262
elif $args[0] == "api" and ($args[1] | startswith("users/")) then
6363
if $fixture | has("profile") then $fixture.profile else
@@ -90,8 +90,6 @@ if body=$(jq -cn --slurpfile fixtures "$FIXTURE" --slurpfile requests "$REQUEST_
9090
fi
9191
else
9292
response_code=$?
93-
# Bound the blocked-scan reproduction without network or a surviving child process.
94-
if [[ "$response_code" == 124 ]]; then sleep 0.5; fi
9593
exit "$response_code"
9694
fi
9795
`,
@@ -132,8 +130,8 @@ fi
132130
}
133131

134132
describe("openclaw-pr-maintainer github activity helper", () => {
135-
it("prints canonical identity before the first activity request, even when a scan blocks", () => {
136-
const { requests } = runHelper(["alias"], { blockActivity: true });
133+
it("prints canonical identity before the first activity request returns a timeout", () => {
134+
const { requests } = runHelper(["alias"], { timeoutActivity: true });
137135
expect(requiredAt(requests, 0).args[1]).toBe("users/alias");
138136
expect(requiredAt(requests, 1).output).toContain(
139137
"Example Author (@Canonical, User, account created 2010-09-21",

0 commit comments

Comments
 (0)