(t *testing.T)
| 343 | } |
| 344 | |
| 345 | func TestInvokeAndCollectHooksNoPlugins(t *testing.T) { |
| 346 | cfg := configfile.New("") |
| 347 | root := &cobra.Command{Use: "docker"} |
| 348 | sub := &cobra.Command{Use: "build"} |
| 349 | root.AddCommand(sub) |
| 350 | |
| 351 | result := invokeAndCollectHooks( |
| 352 | context.Background(), cfg, root, sub, |
| 353 | "build", map[string]string{}, "some error", |
| 354 | ) |
| 355 | assert.Check(t, is.Len(result, 0)) |
| 356 | } |
| 357 | |
| 358 | func TestInvokeAndCollectHooksCancelledContext(t *testing.T) { |
| 359 | cfg := configfile.New("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…