MCPcopy
hub / github.com/containerd/containerd / TestMain

Function TestMain

integration/main_test.go:76–86  ·  view source on GitHub ↗
(m *testing.M)

Source from the content-addressed store, hash-verified

74var buildDir = flag.String("build-dir", "", "Build output directory for containerd binaries")
75
76func TestMain(m *testing.M) {
77 flag.Parse()
78 if err := ConnectDaemons(); err != nil {
79 log.L.WithError(err).Fatalf("Failed to connect daemons")
80 }
81 code := m.Run()
82 if err := DisconnectDaemons(); err != nil {
83 log.L.WithError(err).Error("Failed to disconnect daemons")
84 }
85 os.Exit(code)
86}
87
88// ConnectDaemons connect cri plugin and containerd, and initialize the clients.
89func ConnectDaemons() error {

Callers

nothing calls this directly

Calls 5

ConnectDaemonsFunction · 0.85
DisconnectDaemonsFunction · 0.85
ExitMethod · 0.80
RunMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…