Files
podman/internal/domain/infra/runtime_proxy.go
Nalin Dahyabhai 2e70d4201f System tests: add podman system check tests
Testing `podman system check` requires that we have a way to
intentionally introduce storage corruptions.  Add a hidden `podman
testing` command that provides the necessary internal logic in
subcommands.  Stub out the tunnel implementation for now.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2024-06-04 10:00:37 -04:00

27 lines
724 B
Go

//go:build !remote
package infra
import (
"context"
ientities "github.com/containers/podman/v5/internal/domain/entities"
"github.com/containers/podman/v5/internal/domain/infra/abi"
"github.com/containers/podman/v5/pkg/domain/entities"
"github.com/containers/podman/v5/pkg/domain/infra"
"github.com/containers/storage"
flag "github.com/spf13/pflag"
)
func NewLibpodTestingRuntime(flags *flag.FlagSet, opts *entities.PodmanConfig) (ientities.TestingEngine, error) {
r, err := infra.GetRuntime(context.Background(), flags, opts)
if err != nil {
return nil, err
}
store, err := storage.GetStore(r.StorageConfig())
if err != nil {
return nil, err
}
return &abi.TestingEngine{Libpod: r, Store: store}, nil
}