Skip to main content

vedro-logs-checker for the vedro.io framework

Project description

vedro-logs-checker

A plugin for the vedro.io testing framework that inspects Docker container logs during test execution and searches for messages based on specified substrings.

This plugin helps ensure that there are no errors or other message types in running containers during test execution.

Installation:

pip install vedro-logs-checker

Features:

  • Monitors logs of Docker containers during test execution.
  • Detects specific messages by substrings in logs.
  • Skips specific test scenarios based on prefixes in the 'subject' attribute.
  • Could filter the list of containers to check by regex.
  • Marks tests as FAILED (optional) when errors are found in logs.

Configuration (vedro.cfg.py)

The plugin reads its settings from vedro.cfg.py.

Example configuration:

import vedro
from vedro_logs_checker import vedro_logs_checker

class Config(vedro.Config):
    class Plugins:
        class VedroLogsChecker(vedro_logs_checker.VedroLogsChecker):
            enabled = True
            search_for = ["ERROR", "CRITICAL"]  # Substrings to check in logs
            ignore_prefixes = ["try to", "experimental"]  # Scenarios with these prefixes will be ignored
            fail_when_found = True  # If True, test is marked as FAILED when substrings are found
            project_name = "my_project"  # Only check containers with this substring in the name. To check all running containers just don't specify the value
            regex_container_names_to_check = [r"^grpc", "api", r"^e2e"] # Optional way to filter containers by regex. To check all containers with "project_name" in the container name just don't specify the value
            regex_container_names_to_ignore: list[str] = []  # Optional way to ignore containers by regex.
            silent: bool = False  # Hide config message on startup

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vedro_logs_checker-0.0.7.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vedro_logs_checker-0.0.7-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file vedro_logs_checker-0.0.7.tar.gz.

File metadata

  • Download URL: vedro_logs_checker-0.0.7.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for vedro_logs_checker-0.0.7.tar.gz
Algorithm Hash digest
SHA256 f90b8e6f01c7b3a08951e014d10c501d56189b53547c228abbac97ad54bd5a77
MD5 03a936047b9de59a75b43ce9a5b8fb70
BLAKE2b-256 469706a1332aaeaa0a00aa715f42e7c1ea127623ee6a20b596f87e86d9bc23b6

See more details on using hashes here.

File details

Details for the file vedro_logs_checker-0.0.7-py3-none-any.whl.

File metadata

File hashes

Hashes for vedro_logs_checker-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 ca976b606984ac27f0aad4027f21d7ca09b563dffdb871694bb26aaa631772c8
MD5 5e6994672faf646d84d05c730ee4f5d4
BLAKE2b-256 5012a3cd1620893b239e2706c4cefed1ccaee6417f8f0f9672a6858910a31dd6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page