(m *testing.M)
| 74 | var buildDir = flag.String("build-dir", "", "Build output directory for containerd binaries") |
| 75 | |
| 76 | func 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. |
| 89 | func ConnectDaemons() error { |
nothing calls this directly
no test coverage detected
searching dependent graphs…