github.com/haalcala/mattermost-server-change-repo@v0.0.0-20210713015153-16753fbeee5f/plugin/plugintest/helpers.go (about)

     1  // Code generated by mockery v1.0.0. DO NOT EDIT.
     2  
     3  // Regenerate this file using `make plugin-mocks`.
     4  
     5  package plugintest
     6  
     7  import (
     8  	model "github.com/mattermost/mattermost-server/v5/model"
     9  	plugin "github.com/mattermost/mattermost-server/v5/plugin"
    10  	mock "github.com/stretchr/testify/mock"
    11  )
    12  
    13  // Helpers is an autogenerated mock type for the Helpers type
    14  type Helpers struct {
    15  	mock.Mock
    16  }
    17  
    18  // CheckRequiredServerConfiguration provides a mock function with given fields: req
    19  func (_m *Helpers) CheckRequiredServerConfiguration(req *model.Config) (bool, error) {
    20  	ret := _m.Called(req)
    21  
    22  	var r0 bool
    23  	if rf, ok := ret.Get(0).(func(*model.Config) bool); ok {
    24  		r0 = rf(req)
    25  	} else {
    26  		r0 = ret.Get(0).(bool)
    27  	}
    28  
    29  	var r1 error
    30  	if rf, ok := ret.Get(1).(func(*model.Config) error); ok {
    31  		r1 = rf(req)
    32  	} else {
    33  		r1 = ret.Error(1)
    34  	}
    35  
    36  	return r0, r1
    37  }
    38  
    39  // EnsureBot provides a mock function with given fields: bot, options
    40  func (_m *Helpers) EnsureBot(bot *model.Bot, options ...plugin.EnsureBotOption) (string, error) {
    41  	_va := make([]interface{}, len(options))
    42  	for _i := range options {
    43  		_va[_i] = options[_i]
    44  	}
    45  	var _ca []interface{}
    46  	_ca = append(_ca, bot)
    47  	_ca = append(_ca, _va...)
    48  	ret := _m.Called(_ca...)
    49  
    50  	var r0 string
    51  	if rf, ok := ret.Get(0).(func(*model.Bot, ...plugin.EnsureBotOption) string); ok {
    52  		r0 = rf(bot, options...)
    53  	} else {
    54  		r0 = ret.Get(0).(string)
    55  	}
    56  
    57  	var r1 error
    58  	if rf, ok := ret.Get(1).(func(*model.Bot, ...plugin.EnsureBotOption) error); ok {
    59  		r1 = rf(bot, options...)
    60  	} else {
    61  		r1 = ret.Error(1)
    62  	}
    63  
    64  	return r0, r1
    65  }
    66  
    67  // GetPluginAssetURL provides a mock function with given fields: pluginID, asset
    68  func (_m *Helpers) GetPluginAssetURL(pluginID string, asset string) (string, error) {
    69  	ret := _m.Called(pluginID, asset)
    70  
    71  	var r0 string
    72  	if rf, ok := ret.Get(0).(func(string, string) string); ok {
    73  		r0 = rf(pluginID, asset)
    74  	} else {
    75  		r0 = ret.Get(0).(string)
    76  	}
    77  
    78  	var r1 error
    79  	if rf, ok := ret.Get(1).(func(string, string) error); ok {
    80  		r1 = rf(pluginID, asset)
    81  	} else {
    82  		r1 = ret.Error(1)
    83  	}
    84  
    85  	return r0, r1
    86  }
    87  
    88  // InstallPluginFromURL provides a mock function with given fields: downloadURL, replace
    89  func (_m *Helpers) InstallPluginFromURL(downloadURL string, replace bool) (*model.Manifest, error) {
    90  	ret := _m.Called(downloadURL, replace)
    91  
    92  	var r0 *model.Manifest
    93  	if rf, ok := ret.Get(0).(func(string, bool) *model.Manifest); ok {
    94  		r0 = rf(downloadURL, replace)
    95  	} else {
    96  		if ret.Get(0) != nil {
    97  			r0 = ret.Get(0).(*model.Manifest)
    98  		}
    99  	}
   100  
   101  	var r1 error
   102  	if rf, ok := ret.Get(1).(func(string, bool) error); ok {
   103  		r1 = rf(downloadURL, replace)
   104  	} else {
   105  		r1 = ret.Error(1)
   106  	}
   107  
   108  	return r0, r1
   109  }
   110  
   111  // KVCompareAndDeleteJSON provides a mock function with given fields: key, oldValue
   112  func (_m *Helpers) KVCompareAndDeleteJSON(key string, oldValue interface{}) (bool, error) {
   113  	ret := _m.Called(key, oldValue)
   114  
   115  	var r0 bool
   116  	if rf, ok := ret.Get(0).(func(string, interface{}) bool); ok {
   117  		r0 = rf(key, oldValue)
   118  	} else {
   119  		r0 = ret.Get(0).(bool)
   120  	}
   121  
   122  	var r1 error
   123  	if rf, ok := ret.Get(1).(func(string, interface{}) error); ok {
   124  		r1 = rf(key, oldValue)
   125  	} else {
   126  		r1 = ret.Error(1)
   127  	}
   128  
   129  	return r0, r1
   130  }
   131  
   132  // KVCompareAndSetJSON provides a mock function with given fields: key, oldValue, newValue
   133  func (_m *Helpers) KVCompareAndSetJSON(key string, oldValue interface{}, newValue interface{}) (bool, error) {
   134  	ret := _m.Called(key, oldValue, newValue)
   135  
   136  	var r0 bool
   137  	if rf, ok := ret.Get(0).(func(string, interface{}, interface{}) bool); ok {
   138  		r0 = rf(key, oldValue, newValue)
   139  	} else {
   140  		r0 = ret.Get(0).(bool)
   141  	}
   142  
   143  	var r1 error
   144  	if rf, ok := ret.Get(1).(func(string, interface{}, interface{}) error); ok {
   145  		r1 = rf(key, oldValue, newValue)
   146  	} else {
   147  		r1 = ret.Error(1)
   148  	}
   149  
   150  	return r0, r1
   151  }
   152  
   153  // KVGetJSON provides a mock function with given fields: key, value
   154  func (_m *Helpers) KVGetJSON(key string, value interface{}) (bool, error) {
   155  	ret := _m.Called(key, value)
   156  
   157  	var r0 bool
   158  	if rf, ok := ret.Get(0).(func(string, interface{}) bool); ok {
   159  		r0 = rf(key, value)
   160  	} else {
   161  		r0 = ret.Get(0).(bool)
   162  	}
   163  
   164  	var r1 error
   165  	if rf, ok := ret.Get(1).(func(string, interface{}) error); ok {
   166  		r1 = rf(key, value)
   167  	} else {
   168  		r1 = ret.Error(1)
   169  	}
   170  
   171  	return r0, r1
   172  }
   173  
   174  // KVListWithOptions provides a mock function with given fields: options
   175  func (_m *Helpers) KVListWithOptions(options ...plugin.KVListOption) ([]string, error) {
   176  	_va := make([]interface{}, len(options))
   177  	for _i := range options {
   178  		_va[_i] = options[_i]
   179  	}
   180  	var _ca []interface{}
   181  	_ca = append(_ca, _va...)
   182  	ret := _m.Called(_ca...)
   183  
   184  	var r0 []string
   185  	if rf, ok := ret.Get(0).(func(...plugin.KVListOption) []string); ok {
   186  		r0 = rf(options...)
   187  	} else {
   188  		if ret.Get(0) != nil {
   189  			r0 = ret.Get(0).([]string)
   190  		}
   191  	}
   192  
   193  	var r1 error
   194  	if rf, ok := ret.Get(1).(func(...plugin.KVListOption) error); ok {
   195  		r1 = rf(options...)
   196  	} else {
   197  		r1 = ret.Error(1)
   198  	}
   199  
   200  	return r0, r1
   201  }
   202  
   203  // KVSetJSON provides a mock function with given fields: key, value
   204  func (_m *Helpers) KVSetJSON(key string, value interface{}) error {
   205  	ret := _m.Called(key, value)
   206  
   207  	var r0 error
   208  	if rf, ok := ret.Get(0).(func(string, interface{}) error); ok {
   209  		r0 = rf(key, value)
   210  	} else {
   211  		r0 = ret.Error(0)
   212  	}
   213  
   214  	return r0
   215  }
   216  
   217  // KVSetWithExpiryJSON provides a mock function with given fields: key, value, expireInSeconds
   218  func (_m *Helpers) KVSetWithExpiryJSON(key string, value interface{}, expireInSeconds int64) error {
   219  	ret := _m.Called(key, value, expireInSeconds)
   220  
   221  	var r0 error
   222  	if rf, ok := ret.Get(0).(func(string, interface{}, int64) error); ok {
   223  		r0 = rf(key, value, expireInSeconds)
   224  	} else {
   225  		r0 = ret.Error(0)
   226  	}
   227  
   228  	return r0
   229  }
   230  
   231  // ShouldProcessMessage provides a mock function with given fields: post, options
   232  func (_m *Helpers) ShouldProcessMessage(post *model.Post, options ...plugin.ShouldProcessMessageOption) (bool, error) {
   233  	_va := make([]interface{}, len(options))
   234  	for _i := range options {
   235  		_va[_i] = options[_i]
   236  	}
   237  	var _ca []interface{}
   238  	_ca = append(_ca, post)
   239  	_ca = append(_ca, _va...)
   240  	ret := _m.Called(_ca...)
   241  
   242  	var r0 bool
   243  	if rf, ok := ret.Get(0).(func(*model.Post, ...plugin.ShouldProcessMessageOption) bool); ok {
   244  		r0 = rf(post, options...)
   245  	} else {
   246  		r0 = ret.Get(0).(bool)
   247  	}
   248  
   249  	var r1 error
   250  	if rf, ok := ret.Get(1).(func(*model.Post, ...plugin.ShouldProcessMessageOption) error); ok {
   251  		r1 = rf(post, options...)
   252  	} else {
   253  		r1 = ret.Error(1)
   254  	}
   255  
   256  	return r0, r1
   257  }