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 and/or by @skip_logs_check decorator.
  • 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: = []  # 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-1.0.0.tar.gz (5.6 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-1.0.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vedro_logs_checker-1.0.0.tar.gz
  • Upload date:
  • Size: 5.6 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-1.0.0.tar.gz
Algorithm Hash digest
SHA256 35ecc2b3a677a7076a56c8e6e45c7d872d3fee0c97cb98bb425cdca7239a4025
MD5 16640eeb21c8b15dcfa4ad23804aaf20
BLAKE2b-256 0ad33d880f942f3b9c077238640bad8872869c6bce3186eb3385a13a10586552

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vedro_logs_checker-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b4126d09c20bad875ca81a2da0ecb6bc85401c4239b88fc4a1310bd10c7c509e
MD5 4334801a08425e2d698dbb0c15b8aa80
BLAKE2b-256 298771b1aef86b86b29ace94703f69c99486b21d4475c447b95acaae8ebb3aaa

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