File size: 830 Bytes
ea4bb9b e9a73cb ea4bb9b e9a73cb ea4bb9b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | import { startWorkspaceContainer } from './lib/docker/manager';
async function testNativeFallback() {
console.log("--- NATIVE FALLBACK TEST ---");
try {
const result = await startWorkspaceContainer({
id: 'test-id',
userId: 'test-user',
projectName: 'test-project',
onLog: (msg: string) => console.log(`[TEST-LOG] ${msg}`)
});
console.log("Test Result:", JSON.stringify(result, null, 2));
if (result.containerId?.startsWith('native-')) {
console.log("SUCCESS: Fallback to Native Mode detected.");
} else {
console.log("INFO: Docker was available, running in Docker mode.");
}
} catch (error) {
console.error("TEST FAILED:", error);
}
}
testNativeFallback();
|