MCPcopy Create free account
hub / github.com/containerd/nerdctl / InspectVolume

Method InspectVolume

pkg/testutil/testutil.go:242–253  ·  view source on GitHub ↗
(name string, args ...string)

Source from the content-addressed store, hash-verified

240}
241
242func (b *Base) InspectVolume(name string, args ...string) native.Volume {
243 cmd := append([]string{"volume", "inspect"}, args...)
244 cmd = append(cmd, name)
245 cmdResult := b.Cmd(cmd...).Run()
246 assert.Equal(b.T, cmdResult.ExitCode, 0)
247 var dc []native.Volume
248 if err := json.Unmarshal([]byte(cmdResult.Stdout()), &dc); err != nil {
249 b.T.Fatal(err)
250 }
251 assert.Equal(b.T, 1, len(dc))
252 return dc[0]
253}
254
255func (b *Base) Info() dockercompat.Info {
256 cmdResult := b.Cmd("info", "--format", "{{ json . }}").Run()

Callers 1

Calls 3

CmdMethod · 0.95
UnmarshalMethod · 0.80
RunMethod · 0.65

Tested by 1