-
Notifications
You must be signed in to change notification settings - Fork 2
/
command_run_storer_CommandRunStorer.go
75 lines (60 loc) · 1.82 KB
/
command_run_storer_CommandRunStorer.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// Code generated by mockery 2.9.0. DO NOT EDIT.
package mocks
import (
context "context"
models "github.com/krok-o/krok/pkg/models"
mock "github.com/stretchr/testify/mock"
)
// CommandRunStorer is an autogenerated mock type for the CommandRunStorer type
type CommandRunStorer struct {
mock.Mock
}
// CreateRun provides a mock function with given fields: ctx, run
func (_m *CommandRunStorer) CreateRun(ctx context.Context, run *models.CommandRun) (*models.CommandRun, error) {
ret := _m.Called(ctx, run)
var r0 *models.CommandRun
if rf, ok := ret.Get(0).(func(context.Context, *models.CommandRun) *models.CommandRun); ok {
r0 = rf(ctx, run)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*models.CommandRun)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *models.CommandRun) error); ok {
r1 = rf(ctx, run)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Get provides a mock function with given fields: ctx, id
func (_m *CommandRunStorer) Get(ctx context.Context, id int) (*models.CommandRun, error) {
ret := _m.Called(ctx, id)
var r0 *models.CommandRun
if rf, ok := ret.Get(0).(func(context.Context, int) *models.CommandRun); ok {
r0 = rf(ctx, id)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*models.CommandRun)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, int) error); ok {
r1 = rf(ctx, id)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// UpdateRunStatus provides a mock function with given fields: ctx, id, status, outcome
func (_m *CommandRunStorer) UpdateRunStatus(ctx context.Context, id int, status string, outcome string) error {
ret := _m.Called(ctx, id, status, outcome)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, int, string, string) error); ok {
r0 = rf(ctx, id, status, outcome)
} else {
r0 = ret.Error(0)
}
return r0
}