criImageService returns a CRI image client based on the grpc address.
(t *testing.T)
| 901 | |
| 902 | // criImageService returns a CRI image client based on the grpc address. |
| 903 | func (p *ctrdProc) criImageService(t *testing.T) *remote.ImageService { |
| 904 | service, err := remote.NewImageService(p.grpcAddress(), 1*time.Minute) |
| 905 | require.NoError(t, err) |
| 906 | t.Cleanup(func() { |
| 907 | assert.NoError(t, service.Close(context.Background())) |
| 908 | }) |
| 909 | return service |
| 910 | } |
| 911 | |
| 912 | // newCtrdProc is to start containerd process. |
| 913 | func newCtrdProc(t *testing.T, ctrdBin string, ctrdWorkDir string, envs []string) *ctrdProc { |
no test coverage detected