INNER CODE UNIT · Go

TestCreateRuntimeClient_PodmanError

alexei-led/pumba · cmd/main_test.go:118

func TestCreateRuntimeClient_PodmanError(t *testing.T) {
	restoreFactories(t)

	newPodmanClient = func(string) (ctr.Client, error) {
		return nil, errors.New("boom")
	}

	ctx := newRuntimeTestContext(t, map[string]string{"runtime": "podman"})

	client, err := createRuntimeClient(ctx)
	assert.Nil(t, client)
	require.Error(t, err)
	assert.Contains(t, err.Error(), "could not create podman client")
	assert.Contains(t, err.Error(), "boom")
}

func TestCreateRuntimeClient_Docker(t *testing.T) {
	restoreFactories(t)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…