ItemBlock model and phase 1 (single-thread) workflow changes

Signed-off-by: Scott Seago <sseago@redhat.com>
This commit is contained in:
Scott Seago
2024-09-03 19:04:18 -04:00
parent 8ae667ef5e
commit 9d6f4d2db5
18 changed files with 1404 additions and 171 deletions
+13
View File
@@ -24,9 +24,22 @@ import (
type MockPodCommandExecutor struct {
mock.Mock
// hook execution order
HookExecutionLog []HookExecutionEntry
}
type HookExecutionEntry struct {
Namespace, Name, HookName string
HookCommand []string
}
func (e *MockPodCommandExecutor) ExecutePodCommand(log logrus.FieldLogger, item map[string]interface{}, namespace, name, hookName string, hook *v1.ExecHook) error {
e.HookExecutionLog = append(e.HookExecutionLog, HookExecutionEntry{
Namespace: namespace,
Name: name,
HookName: hookName,
HookCommand: hook.Command,
})
args := e.Called(log, item, namespace, name, hookName, hook)
return args.Error(0)
}