Skip to content

Improvements for the mock provision plugin #4097

@psss

Description

@psss

Follow-up improvements suggested in #4034.

  1. I would start mirroring the functionality found in Command.run. There are a few questions related to dry run for example. Whether we should actually enter mock and run echo $command or just print the cmd.
  2. I agree that the logging as written by me was quite ad-hoc and more for development. It does need to be unified with the rest of the sources.
  3. I noticed that I had to write:
stdout = MockShell.Stream(lambda text: output_logger("out", text, 'yellow', level = 0))
stderr = MockShell.Stream(lambda text: output_logger("err", text, 'yellow', level = 0))

to get any output, I know that for example the container provision uses level=2, but I could not see the logs even when running tmt -vvv.

Originally posted by @happz in #4034 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    plugin | mockRelated to mock provision pluginstep | provisionStuff related to the provision step

    Projects

    Status

    backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions