Tests
MockWriter
Mock Writer functionality for Tests integration.
View module source on GitHub
Mock writer for testing purposes.
This module provides a mock implementation of LogWriter that captures
logs in memory for testing purposes.
Mock implementation of LogWriter for testing.
This class captures all logs and commands in memory, allowing tests
to verify what was logged without making actual API calls.
Initialize a MockLogWriter instance.
Arguments:
Get the repository ID.
Mock commit that stores the log instead of queuing it.
Arguments:
Mock flush that moves queued logs to flushed logs.
Arguments:
Mock flush for commit logs only.
Mock flush for upload attachment logs only.
Mock cleanup that flushes remaining logs.
Arguments:
Get all logs (committed, flushed, and uploaded).
Get only committed logs.
Get only flushed logs.
Get only uploaded attachment logs.
Get logs filtered by action type.
Get logs filtered by entity and action type.
Get logs filtered by entity type.
Get logs filtered by entity and action type.
Get logs filtered by entity ID.
Clear all stored logs.
Assert the total number of logs.
Assert the number of logs for a specific entity and action.
Assert the number of logs for a specific action.
Assert the number of logs for a specific entity.
Print a summary of all captured logs for debugging.