Skip to content

Commit

Permalink
conn: add container/podman/docker connection
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrezina committed Jul 11, 2024
1 parent 9582fea commit 765432b
Show file tree
Hide file tree
Showing 2 changed files with 453 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pytest_mh/_private/multihost.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

from ..cli import CLIBuilder
from ..conn import Bash, Connection, Powershell, Process, ProcessError, ProcessInputBuffer, ProcessResult, Shell
from ..conn.container import ContainerClient
from ..conn.ssh import SSHClient
from .artifacts import (
MultihostArtifactsCollector,
Expand Down Expand Up @@ -619,6 +620,8 @@ def get_connection(self, shell: Shell) -> Connection:
match conn_type:
case "ssh":
return SSHClient.from_confdict(self, conn_confdict)
case "podman" | "docker":
return ContainerClient.from_confdict(self, conn_confdict)
case _:
raise ValueError(f"Unknown connection type: {conn_type}!")

Expand Down
Loading

0 comments on commit 765432b

Please sign in to comment.