forked from claude-did-this/claude-hub
- Convert .eslintrc.js to eslint.config.js (ESLint v9 format) - Add global definitions for fetch and URL - Fix unused variables automatically via ESLint auto-fix - Configure proper unused variable detection patterns - All tests passing with good coverage (28 passed, 1 skipped) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
31 lines
940 B
JavaScript
31 lines
940 B
JavaScript
const { execSync } = require('child_process');
|
|
|
|
// Simple test script for Docker container execution
|
|
const containerName = `claude-test-${Date.now()}`;
|
|
|
|
console.log('Running test container...');
|
|
try {
|
|
// Execute a simple echo command in the container
|
|
const dockerCommand = `docker run --rm --name ${containerName} claudecode:latest "echo 'This is a test from container'"`;
|
|
|
|
console.log('Docker command:', dockerCommand);
|
|
|
|
const result = execSync(dockerCommand);
|
|
|
|
console.log('Container output:');
|
|
console.log(result.toString());
|
|
|
|
console.log('Test completed successfully!');
|
|
} catch (error) {
|
|
console.error('Error running container:', error.message);
|
|
if (error.stdout) console.log('stdout:', error.stdout.toString());
|
|
if (error.stderr) console.log('stderr:', error.stderr.toString());
|
|
|
|
// Try to clean up the container
|
|
try {
|
|
execSync(`docker rm ${containerName}`);
|
|
} catch {
|
|
// Ignore cleanup errors
|
|
}
|
|
}
|