@realeng/maestro
Version:
Easy setup and management for local MCP servers
58 lines • 2.35 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const youtrack_1 = require("../servers/youtrack");
describe('Integration Tests', () => {
describe('Server Command and Config Generation', () => {
it('should generate identical commands for both run and mcp-config for YouTrack', () => {
const config = {
type: 'youtrack',
enabled: true,
auth: {
url: 'https://example.youtrack.cloud',
token: 'test-token-123',
isCloud: 'Y'
},
settings: {}
};
// This is what gets used by `maestro run`
const runCommand = youtrack_1.youtrackServer.command(config);
// This is what gets output by `maestro mcp-config`
const expectedConfigCommand = [
'docker',
'run',
'-i',
'--rm',
'--pull=always',
'-e',
'YOUTRACK_URL=https://example.youtrack.cloud',
'-e',
'YOUTRACK_API_TOKEN=test-token-123',
'-e',
'YOUTRACK_CLOUD=true',
'tonyzorin/youtrack-mcp:latest'
];
expect(runCommand).toEqual(expectedConfigCommand);
});
});
describe('Environment variable handling', () => {
it('should properly pass environment variables to Docker for YouTrack', () => {
const config = {
type: 'youtrack',
enabled: true,
auth: {
url: 'https://test.youtrack.cloud',
token: 'secret-token',
isCloud: 'Y'
},
settings: {}
};
const command = youtrack_1.youtrackServer.command(config);
const envVars = youtrack_1.youtrackServer.env(config);
// Verify environment variables are in the command
expect(command).toContain(`YOUTRACK_URL=${envVars.YOUTRACK_URL}`);
expect(command).toContain(`YOUTRACK_API_TOKEN=${envVars.YOUTRACK_API_TOKEN}`);
expect(command).toContain(`YOUTRACK_CLOUD=${envVars.YOUTRACK_CLOUD}`);
});
});
});
//# sourceMappingURL=integration.test.js.map