Skip to content

Commit e6be0da

Browse files
only21milclaude
andcommitted
test(server): check a glab claim read from cut output
A truncated glab answer that claims the host is still returned, and the next lookup asks glab again. The existing rows only covered a decline. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 6efd664 commit e6be0da

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

‎apps/server/src/sourceControl/SourceControlProviderRegistry.test.ts‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,14 @@ it.effect.each([
859859
},
860860
runs: 2,
861861
},
862-
])("keeps a glab decline only when glab answered in full: $name", (scenario) =>
862+
// A claim read from cut output is still used, and the next lookup asks glab again.
863+
{
864+
name: "this host, in output cut short",
865+
output: { ...signedInGitLab, stdoutTruncated: true },
866+
kind: "gitlab",
867+
runs: 2,
868+
},
869+
])("keeps a glab answer only when glab answered in full: $name", (scenario) =>
863870
Effect.gen(function* () {
864871
const commands: Array<string> = [];
865872
const registry = yield* makeRegistry({
@@ -876,7 +883,7 @@ it.effect.each([
876883
cwd,
877884
context: unknownRemote("https://git.example.internal/team/a.git"),
878885
});
879-
assert.strictEqual(handle.provider.kind, "unknown");
886+
assert.strictEqual(handle.provider.kind, scenario.kind ?? "unknown");
880887
}
881888
assert.strictEqual(commands.length, scenario.runs);
882889
}),

0 commit comments

Comments
 (0)