This directory contains test files and examples for testing SheLLama functionality. The structure is organized into subdirectories based on the type of operations being tested.
/test_markdown/
├── file_operations/ # For testing file handling functions
├── git_operations/ # For testing Git functionality
├── shell_commands/ # For testing shell command execution
└── devops_tools/ # For testing DevOps tools integration
This test markdown directory serves several purposes:
- Testing Environment: Provides a controlled environment with example files for testing SheLLama API endpoints
- Documentation: Demonstrates the capabilities and expected behavior of SheLLama
- Development: Supports development of new features with realistic test cases
- Ansible Tests: Used by the Ansible test suite to verify SheLLama functionality
The file_operations directory contains files for testing basic file system operations:
- File creation, reading, updating, and deletion
- File renaming and permission changes
- Content searching and manipulation
- Different file types (text, markdown, JSON, Python)
- Performance testing with larger files
The git_operations directory contains files for testing Git-related functionality:
- Repository initialization and status checking
- Adding and committing changes
- Branch creation, checkout, and merging
- Handling merge conflicts
- Viewing commit history
The shell_commands directory contains scripts for testing shell command execution:
- Basic command execution and output capturing
- Environment variable handling
- Error handling and reporting
- Command chaining and piping
- Process management
The devops_tools directory contains configuration files for testing integration with DevOps tools:
- Docker and Docker Compose
- Ansible
- Terraform
- Kubernetes
- CI/CD tools (Jenkins, GitHub Actions)
You can use these files for manual testing of SheLLama functionality:
# Example: Test file reading
curl -X POST http://localhost:5000/api/shellama/file/read \
-H "Content-Type: application/json" \
-d '{"path": "/path/to/test_markdown/file_operations/simple_text.txt"}'
# Example: Test Git status
curl -X POST http://localhost:5000/api/shellama/git/status \
-H "Content-Type: application/json" \
-d '{"directory": "/path/to/test_markdown/git_operations"}'
# Example: Test shell command execution
curl -X POST http://localhost:5000/api/shellama/shell/exec \
-H "Content-Type: application/json" \
-d '{"command": "ls -la", "cwd": "/path/to/test_markdown"}'These files are used by the Ansible test suite to verify SheLLama functionality:
# Run all Ansible tests
make ansible-test
# Run specific test categories
make ansible-test-file # Test file operations
make ansible-test-git # Test Git operations
make ansible-test-shell # Test shell operationsTo add new test files:
- Identify the appropriate category (file, git, shell, devops)
- Add your test files to the corresponding directory
- Update the README.md in that directory to document the new test files
- If necessary, update the Ansible test playbooks to include tests for the new files
A Docker testing environment is available for testing SheLLama with these test files. See the DOCKER_TESTING.md file for more information.