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

Method AssertOutExactly

pkg/testutil/testutil.go:454–463  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

452}
453
454func (c *Cmd) AssertOutExactly(s string) {
455 c.Base.T.Helper()
456 fn := func(stdout string) error {
457 if stdout != s {
458 return fmt.Errorf("expected %q, got %q", s, stdout)
459 }
460 return nil
461 }
462 c.AssertOutWithFunc(fn)
463}
464
465func (c *Cmd) AssertOutWithFunc(fn func(stdout string) error) {
466 c.Base.T.Helper()

Callers 15

TestRunNetworkHost2613Function · 0.80
assertCatHelperFunction · 0.80
TestRunCustomRootfsFunction · 0.80
TestRunAddHostFunction · 0.80
TestRunUlimitFunction · 0.80
TestRunCgroupV2Function · 0.80
TestRunCgroupV1Function · 0.80
TestRunCgroupConfFunction · 0.80
TestRunVolumeFunction · 0.80

Calls 2

AssertOutWithFuncMethod · 0.95
HelperMethod · 0.65

Tested by 15

TestRunNetworkHost2613Function · 0.64
assertCatHelperFunction · 0.64
TestRunCustomRootfsFunction · 0.64
TestRunAddHostFunction · 0.64
TestRunUlimitFunction · 0.64
TestRunCgroupV2Function · 0.64
TestRunCgroupV1Function · 0.64
TestRunCgroupConfFunction · 0.64
TestRunVolumeFunction · 0.64