-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathintegration_test.sh
More file actions
executable file
·48 lines (39 loc) · 1.17 KB
/
integration_test.sh
File metadata and controls
executable file
·48 lines (39 loc) · 1.17 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
# Integration test script for VisualCodex
echo "Running integration tests for VisualCodex..."
# Check if open-codex is installed
if ! command -v open-codex &> /dev/null; then
echo "Warning: open-codex command not found. Integration tests may fail."
echo "Please ensure open-codex is installed and in your PATH."
fi
# Test API key configuration
echo "Testing API key configuration..."
mkdir -p test_output
# Create a test configuration
cat > test_config.json << EOL
{
"apiProviders": {
"OpenAI": "test_key_openai",
"Gemini": "test_key_gemini"
},
"approvalMode": "suggest",
"defaultModel": "gpt-4o"
}
EOL
echo "Test configuration created."
# Test file operations
echo "Testing file operations..."
echo "Test content" > test_file.txt
if [ -f "test_file.txt" ]; then
echo "File creation successful."
else
echo "Error: File creation failed."
exit 1
fi
# Clean up test files
echo "Cleaning up test files..."
rm -f test_file.txt test_config.json
rm -rf test_output
echo "Integration tests completed."
echo "Note: Full integration testing requires running the application."
echo "Please run 'npm start' to manually test the application functionality."