Skip to content

Is there a way to check tolerance against read_pod_logs? #95

@myroslavrozum

Description

@myroslavrozum

Hello,
I wanted to check logs returned by read_pod_logs with regex but getting the error: "return rx.search(value) is not None".
My probe was similar to:

{
   "name": "read-microservices-logs",
   "type": "probe",
   "tolerance": {
      "type": "regex,",
      "pattern": "UP"
   },
   "provider": {
      "func": "read_pod_logs",
      "arguments": {
         "label_selector": "app.kubernetes.io/name=ui",
         "ns": "dev",
         "container_name": "ui"
      },
      "module": "chaosk8s.probes",
      "type": "python"
   }
}

But got an error:
File "/opt/hostedtoolcache/Python/3.8.1/x64/lib/python3.8/site-packages/chaoslib/hypothesis.py", line 304, in _ return rx.search(value) is not None TypeError: expected string or bytes-like object

Can it be caused by function returning dictionary instead of string?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions