Skip to main content
Glama
deploy.test.ts1.3 kB
// SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors // SPDX-License-Identifier: Apache-2.0 import type { WithId } from '@medplum/core'; import type { Bot } from '@medplum/fhirtypes'; import express from 'express'; import { randomUUID } from 'node:crypto'; import { initApp, shutdownApp } from '../../app'; import { loadTestConfig } from '../../config/loader'; import { deployFissionBot } from './deploy'; describe('Deploy Fission bots', () => { const app = express(); beforeAll(async () => { const config = await loadTestConfig(); config.fission = { namespace: 'default', fieldManager: 'medplum-fission-example', environmentName: 'nodejs', routerHost: 'localhost', routerPort: 31314, }; await initApp(app, config); }); afterAll(async () => { await shutdownApp(); }); afterEach(() => { jest.restoreAllMocks(); }); test('Success', async () => { const bot: WithId<Bot> = { resourceType: 'Bot', id: randomUUID(), name: 'Test Bot', runtimeVersion: 'fission', }; const code = ` export async function handler() { console.log('input', input); return input; } `; await expect(deployFissionBot(bot, code)).resolves.toBeUndefined(); }); });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/medplum/medplum'

If you have feedback or need assistance with the MCP directory API, please join our Discord server