forked from claude-did-this/claude-hub
- Fix JSON parsing error handling in Express middleware test - Remove brittle test case that relied on unrealistic sync throw behavior - Update Jest config to handle ES modules from Octokit dependencies - Align Docker image naming to use claudecode:latest consistently - Add tsconfig.test.json for proper test TypeScript configuration - Clean up duplicate and meaningless test cases for better maintainability All tests now pass (344 passing, 27 skipped, 0 failing) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
16 lines
830 B
JavaScript
16 lines
830 B
JavaScript
const { execSync } = require('child_process');
|
|
|
|
// Test running the Docker container directly
|
|
try {
|
|
const command = `docker run --rm -v ${process.env.HOME}/.aws:/home/node/.aws:ro -e AWS_PROFILE="claude-webhook" -e AWS_REGION="us-east-2" -e CLAUDE_CODE_USE_BEDROCK="1" -e ANTHROPIC_MODEL="us.anthropic.claude-3-7-sonnet-20250219-v1:0" claudecode:latest /bin/bash -c "cat /home/node/.aws/credentials | grep claude-webhook"`;
|
|
|
|
console.log('Testing Docker container AWS credentials access...');
|
|
const result = execSync(command, { encoding: 'utf8' });
|
|
console.log('✓ Container can access AWS credentials');
|
|
console.log('Output:', result);
|
|
} catch (error) {
|
|
console.error('✗ Container failed to access AWS credentials');
|
|
console.error('Error:', error.message);
|
|
console.error('Stderr:', error.stderr?.toString());
|
|
}
|