INNER CODE UNIT · Go
TestCreateRuntimeClient_Podman
alexei-led/pumba · cmd/main_test.go:78
func TestCreateRuntimeClient_Podman(t *testing.T) {
restoreFactories(t)
var gotSocket string
sentinel := ctr.NewMockClient(t)
newPodmanClient = func(socket string) (ctr.Client, error) {
gotSocket = socket
return sentinel, nil
}
ctx := newRuntimeTestContext(t, map[string]string{
"runtime": "podman",
"podman-socket": "unix:///tmp/podman.sock",
})
client, err := createRuntimeClient(ctx)
require.NoError(t, err)
assert.Same(t, sentinel, client)