github.com/juju/juju@v0.0.0-20240430160146-1752b71fcf00/service/systemd/package_mock_test.go (about)

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: github.com/juju/juju/service/systemd (interfaces: DBusAPI,FileSystemOps)
     3  //
     4  // Generated by this command:
     5  //
     6  //	mockgen -package systemd_test -destination package_mock_test.go github.com/juju/juju/service/systemd DBusAPI,FileSystemOps
     7  //
     8  
     9  // Package systemd_test is a generated GoMock package.
    10  package systemd_test
    11  
    12  import (
    13  	fs "io/fs"
    14  	reflect "reflect"
    15  
    16  	dbus "github.com/coreos/go-systemd/v22/dbus"
    17  	gomock "go.uber.org/mock/gomock"
    18  )
    19  
    20  // MockDBusAPI is a mock of DBusAPI interface.
    21  type MockDBusAPI struct {
    22  	ctrl     *gomock.Controller
    23  	recorder *MockDBusAPIMockRecorder
    24  }
    25  
    26  // MockDBusAPIMockRecorder is the mock recorder for MockDBusAPI.
    27  type MockDBusAPIMockRecorder struct {
    28  	mock *MockDBusAPI
    29  }
    30  
    31  // NewMockDBusAPI creates a new mock instance.
    32  func NewMockDBusAPI(ctrl *gomock.Controller) *MockDBusAPI {
    33  	mock := &MockDBusAPI{ctrl: ctrl}
    34  	mock.recorder = &MockDBusAPIMockRecorder{mock}
    35  	return mock
    36  }
    37  
    38  // EXPECT returns an object that allows the caller to indicate expected use.
    39  func (m *MockDBusAPI) EXPECT() *MockDBusAPIMockRecorder {
    40  	return m.recorder
    41  }
    42  
    43  // Close mocks base method.
    44  func (m *MockDBusAPI) Close() {
    45  	m.ctrl.T.Helper()
    46  	m.ctrl.Call(m, "Close")
    47  }
    48  
    49  // Close indicates an expected call of Close.
    50  func (mr *MockDBusAPIMockRecorder) Close() *gomock.Call {
    51  	mr.mock.ctrl.T.Helper()
    52  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockDBusAPI)(nil).Close))
    53  }
    54  
    55  // DisableUnitFiles mocks base method.
    56  func (m *MockDBusAPI) DisableUnitFiles(arg0 []string, arg1 bool) ([]dbus.DisableUnitFileChange, error) {
    57  	m.ctrl.T.Helper()
    58  	ret := m.ctrl.Call(m, "DisableUnitFiles", arg0, arg1)
    59  	ret0, _ := ret[0].([]dbus.DisableUnitFileChange)
    60  	ret1, _ := ret[1].(error)
    61  	return ret0, ret1
    62  }
    63  
    64  // DisableUnitFiles indicates an expected call of DisableUnitFiles.
    65  func (mr *MockDBusAPIMockRecorder) DisableUnitFiles(arg0, arg1 any) *gomock.Call {
    66  	mr.mock.ctrl.T.Helper()
    67  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DisableUnitFiles", reflect.TypeOf((*MockDBusAPI)(nil).DisableUnitFiles), arg0, arg1)
    68  }
    69  
    70  // EnableUnitFiles mocks base method.
    71  func (m *MockDBusAPI) EnableUnitFiles(arg0 []string, arg1, arg2 bool) (bool, []dbus.EnableUnitFileChange, error) {
    72  	m.ctrl.T.Helper()
    73  	ret := m.ctrl.Call(m, "EnableUnitFiles", arg0, arg1, arg2)
    74  	ret0, _ := ret[0].(bool)
    75  	ret1, _ := ret[1].([]dbus.EnableUnitFileChange)
    76  	ret2, _ := ret[2].(error)
    77  	return ret0, ret1, ret2
    78  }
    79  
    80  // EnableUnitFiles indicates an expected call of EnableUnitFiles.
    81  func (mr *MockDBusAPIMockRecorder) EnableUnitFiles(arg0, arg1, arg2 any) *gomock.Call {
    82  	mr.mock.ctrl.T.Helper()
    83  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnableUnitFiles", reflect.TypeOf((*MockDBusAPI)(nil).EnableUnitFiles), arg0, arg1, arg2)
    84  }
    85  
    86  // GetUnitProperties mocks base method.
    87  func (m *MockDBusAPI) GetUnitProperties(arg0 string) (map[string]any, error) {
    88  	m.ctrl.T.Helper()
    89  	ret := m.ctrl.Call(m, "GetUnitProperties", arg0)
    90  	ret0, _ := ret[0].(map[string]any)
    91  	ret1, _ := ret[1].(error)
    92  	return ret0, ret1
    93  }
    94  
    95  // GetUnitProperties indicates an expected call of GetUnitProperties.
    96  func (mr *MockDBusAPIMockRecorder) GetUnitProperties(arg0 any) *gomock.Call {
    97  	mr.mock.ctrl.T.Helper()
    98  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUnitProperties", reflect.TypeOf((*MockDBusAPI)(nil).GetUnitProperties), arg0)
    99  }
   100  
   101  // GetUnitTypeProperties mocks base method.
   102  func (m *MockDBusAPI) GetUnitTypeProperties(arg0, arg1 string) (map[string]any, error) {
   103  	m.ctrl.T.Helper()
   104  	ret := m.ctrl.Call(m, "GetUnitTypeProperties", arg0, arg1)
   105  	ret0, _ := ret[0].(map[string]any)
   106  	ret1, _ := ret[1].(error)
   107  	return ret0, ret1
   108  }
   109  
   110  // GetUnitTypeProperties indicates an expected call of GetUnitTypeProperties.
   111  func (mr *MockDBusAPIMockRecorder) GetUnitTypeProperties(arg0, arg1 any) *gomock.Call {
   112  	mr.mock.ctrl.T.Helper()
   113  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUnitTypeProperties", reflect.TypeOf((*MockDBusAPI)(nil).GetUnitTypeProperties), arg0, arg1)
   114  }
   115  
   116  // LinkUnitFiles mocks base method.
   117  func (m *MockDBusAPI) LinkUnitFiles(arg0 []string, arg1, arg2 bool) ([]dbus.LinkUnitFileChange, error) {
   118  	m.ctrl.T.Helper()
   119  	ret := m.ctrl.Call(m, "LinkUnitFiles", arg0, arg1, arg2)
   120  	ret0, _ := ret[0].([]dbus.LinkUnitFileChange)
   121  	ret1, _ := ret[1].(error)
   122  	return ret0, ret1
   123  }
   124  
   125  // LinkUnitFiles indicates an expected call of LinkUnitFiles.
   126  func (mr *MockDBusAPIMockRecorder) LinkUnitFiles(arg0, arg1, arg2 any) *gomock.Call {
   127  	mr.mock.ctrl.T.Helper()
   128  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LinkUnitFiles", reflect.TypeOf((*MockDBusAPI)(nil).LinkUnitFiles), arg0, arg1, arg2)
   129  }
   130  
   131  // ListUnits mocks base method.
   132  func (m *MockDBusAPI) ListUnits() ([]dbus.UnitStatus, error) {
   133  	m.ctrl.T.Helper()
   134  	ret := m.ctrl.Call(m, "ListUnits")
   135  	ret0, _ := ret[0].([]dbus.UnitStatus)
   136  	ret1, _ := ret[1].(error)
   137  	return ret0, ret1
   138  }
   139  
   140  // ListUnits indicates an expected call of ListUnits.
   141  func (mr *MockDBusAPIMockRecorder) ListUnits() *gomock.Call {
   142  	mr.mock.ctrl.T.Helper()
   143  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListUnits", reflect.TypeOf((*MockDBusAPI)(nil).ListUnits))
   144  }
   145  
   146  // Reload mocks base method.
   147  func (m *MockDBusAPI) Reload() error {
   148  	m.ctrl.T.Helper()
   149  	ret := m.ctrl.Call(m, "Reload")
   150  	ret0, _ := ret[0].(error)
   151  	return ret0
   152  }
   153  
   154  // Reload indicates an expected call of Reload.
   155  func (mr *MockDBusAPIMockRecorder) Reload() *gomock.Call {
   156  	mr.mock.ctrl.T.Helper()
   157  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reload", reflect.TypeOf((*MockDBusAPI)(nil).Reload))
   158  }
   159  
   160  // StartUnit mocks base method.
   161  func (m *MockDBusAPI) StartUnit(arg0, arg1 string, arg2 chan<- string) (int, error) {
   162  	m.ctrl.T.Helper()
   163  	ret := m.ctrl.Call(m, "StartUnit", arg0, arg1, arg2)
   164  	ret0, _ := ret[0].(int)
   165  	ret1, _ := ret[1].(error)
   166  	return ret0, ret1
   167  }
   168  
   169  // StartUnit indicates an expected call of StartUnit.
   170  func (mr *MockDBusAPIMockRecorder) StartUnit(arg0, arg1, arg2 any) *gomock.Call {
   171  	mr.mock.ctrl.T.Helper()
   172  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartUnit", reflect.TypeOf((*MockDBusAPI)(nil).StartUnit), arg0, arg1, arg2)
   173  }
   174  
   175  // StopUnit mocks base method.
   176  func (m *MockDBusAPI) StopUnit(arg0, arg1 string, arg2 chan<- string) (int, error) {
   177  	m.ctrl.T.Helper()
   178  	ret := m.ctrl.Call(m, "StopUnit", arg0, arg1, arg2)
   179  	ret0, _ := ret[0].(int)
   180  	ret1, _ := ret[1].(error)
   181  	return ret0, ret1
   182  }
   183  
   184  // StopUnit indicates an expected call of StopUnit.
   185  func (mr *MockDBusAPIMockRecorder) StopUnit(arg0, arg1, arg2 any) *gomock.Call {
   186  	mr.mock.ctrl.T.Helper()
   187  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopUnit", reflect.TypeOf((*MockDBusAPI)(nil).StopUnit), arg0, arg1, arg2)
   188  }
   189  
   190  // MockFileSystemOps is a mock of FileSystemOps interface.
   191  type MockFileSystemOps struct {
   192  	ctrl     *gomock.Controller
   193  	recorder *MockFileSystemOpsMockRecorder
   194  }
   195  
   196  // MockFileSystemOpsMockRecorder is the mock recorder for MockFileSystemOps.
   197  type MockFileSystemOpsMockRecorder struct {
   198  	mock *MockFileSystemOps
   199  }
   200  
   201  // NewMockFileSystemOps creates a new mock instance.
   202  func NewMockFileSystemOps(ctrl *gomock.Controller) *MockFileSystemOps {
   203  	mock := &MockFileSystemOps{ctrl: ctrl}
   204  	mock.recorder = &MockFileSystemOpsMockRecorder{mock}
   205  	return mock
   206  }
   207  
   208  // EXPECT returns an object that allows the caller to indicate expected use.
   209  func (m *MockFileSystemOps) EXPECT() *MockFileSystemOpsMockRecorder {
   210  	return m.recorder
   211  }
   212  
   213  // Remove mocks base method.
   214  func (m *MockFileSystemOps) Remove(arg0 string) error {
   215  	m.ctrl.T.Helper()
   216  	ret := m.ctrl.Call(m, "Remove", arg0)
   217  	ret0, _ := ret[0].(error)
   218  	return ret0
   219  }
   220  
   221  // Remove indicates an expected call of Remove.
   222  func (mr *MockFileSystemOpsMockRecorder) Remove(arg0 any) *gomock.Call {
   223  	mr.mock.ctrl.T.Helper()
   224  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockFileSystemOps)(nil).Remove), arg0)
   225  }
   226  
   227  // RemoveAll mocks base method.
   228  func (m *MockFileSystemOps) RemoveAll(arg0 string) error {
   229  	m.ctrl.T.Helper()
   230  	ret := m.ctrl.Call(m, "RemoveAll", arg0)
   231  	ret0, _ := ret[0].(error)
   232  	return ret0
   233  }
   234  
   235  // RemoveAll indicates an expected call of RemoveAll.
   236  func (mr *MockFileSystemOpsMockRecorder) RemoveAll(arg0 any) *gomock.Call {
   237  	mr.mock.ctrl.T.Helper()
   238  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAll", reflect.TypeOf((*MockFileSystemOps)(nil).RemoveAll), arg0)
   239  }
   240  
   241  // WriteFile mocks base method.
   242  func (m *MockFileSystemOps) WriteFile(arg0 string, arg1 []byte, arg2 fs.FileMode) error {
   243  	m.ctrl.T.Helper()
   244  	ret := m.ctrl.Call(m, "WriteFile", arg0, arg1, arg2)
   245  	ret0, _ := ret[0].(error)
   246  	return ret0
   247  }
   248  
   249  // WriteFile indicates an expected call of WriteFile.
   250  func (mr *MockFileSystemOpsMockRecorder) WriteFile(arg0, arg1, arg2 any) *gomock.Call {
   251  	mr.mock.ctrl.T.Helper()
   252  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteFile", reflect.TypeOf((*MockFileSystemOps)(nil).WriteFile), arg0, arg1, arg2)
   253  }