INNER CODE UNIT · Go

TestCreateRuntimeClient_Containerd

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

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

	var gotSocket, gotNamespace string
	sentinel := ctr.NewMockClient(t)
	newContainerdClient = func(socket, namespace string) (ctr.Client, error) {
		gotSocket = socket
		gotNamespace = namespace
		return sentinel, nil
	}

	ctx := newRuntimeTestContext(t, map[string]string{
		"runtime":              "containerd",
		"containerd-socket":    "/tmp/ctr.sock",
		"containerd-namespace": "default",
	})

	client, err := createRuntimeClient(ctx)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…