(t *testing.T)
| 63 | } |
| 64 | |
| 65 | func TestHookWithExecution(t *testing.T) { |
| 66 | conf := config.NewConfig(map[string]interface{}{}, |
| 67 | map[string]interface{}{}, |
| 68 | &latest.Config{ |
| 69 | Hooks: []*latest.HookConfig{{ |
| 70 | Events: []string{"my-event"}, |
| 71 | Command: "echo", |
| 72 | Args: []string{"hello"}, |
| 73 | }}, |
| 74 | }, |
| 75 | localcache.New(constants.DefaultCacheFolder), |
| 76 | &remotecache.RemoteCache{}, |
| 77 | map[string]interface{}{}, |
| 78 | constants.DefaultConfigPath) |
| 79 | |
| 80 | err := ExecuteHooks(devspacecontext.NewContext(context.Background(), nil, log.Discard).WithConfig(conf), nil) |
| 81 | if err != nil { |
| 82 | t.Fatalf("Failed to execute 1 hook with empty When.After: %v", err) |
| 83 | } |
| 84 | } |
nothing calls this directly
no test coverage detected