Skip to content

Commit 86f7b8a

Browse files
chore(gemini): replace gemini-mock.sh with inline mock content in setup function
1 parent f1ecaac commit 86f7b8a

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

registry/coder-labs/modules/gemini/main.test.ts

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
} from "bun:test";
99
import { execContainer, readFileContainer, runTerraformInit } from "~test";
1010
import {
11-
loadTestFile,
1211
writeExecutable,
1312
setup as setupUtil,
1413
execModuleScript,
@@ -54,10 +53,24 @@ const setup = async (props?: SetupProps): Promise<{ id: string }> => {
5453
agentapiMockScript: props?.agentapiMockScript,
5554
});
5655
if (!props?.skipGeminiMock) {
56+
const geminiMockContent = `#!/bin/bash
57+
58+
if [[ "$1" == "--version" ]]; then
59+
echo "HELLO: $(bash -c env)"
60+
echo "gemini version v2.5.0"
61+
exit 0
62+
fi
63+
64+
set -e
65+
66+
while true; do
67+
echo "$(date) - gemini-mock"
68+
sleep 15
69+
done`;
5770
await writeExecutable({
5871
containerId: id,
5972
filePath: "/usr/bin/gemini",
60-
content: await loadTestFile(import.meta.dir, "gemini-mock.sh"),
73+
content: geminiMockContent,
6174
});
6275
}
6376
return { id };

registry/coder-labs/modules/gemini/testdata/gemini-mock.sh

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)