mirror of
https://github.com/hanzoai/team.git
synced 2026-09-30 01:57:35 +00:00
* [MM-68988][MM-68989][MM-68990][MM-68991][MM-68997] Session Attributes MVF - Server-work * PR feedback * [MM-68998] Add web app hooks for Desktop App to signal a refresh of attributes/manifest * Fix types * Adjust the test to test the license first * PR feedback * Coderabbit feedback * More tests
120 lines
2.8 KiB
Go
120 lines
2.8 KiB
Go
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
|
|
|
// Regenerate this file using `make store-mocks`.
|
|
|
|
package mocks
|
|
|
|
import mock "github.com/stretchr/testify/mock"
|
|
|
|
// SessionAttributeStore is an autogenerated mock type for the SessionAttributeStore type
|
|
type SessionAttributeStore struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// Clear provides a mock function with no fields
|
|
func (_m *SessionAttributeStore) Clear() error {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Clear")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func() error); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Get provides a mock function with given fields: sessionID
|
|
func (_m *SessionAttributeStore) Get(sessionID string) (map[string]interface{}, map[string]int64, error) {
|
|
ret := _m.Called(sessionID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Get")
|
|
}
|
|
|
|
var r0 map[string]interface{}
|
|
var r1 map[string]int64
|
|
var r2 error
|
|
if rf, ok := ret.Get(0).(func(string) (map[string]interface{}, map[string]int64, error)); ok {
|
|
return rf(sessionID)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string) map[string]interface{}); ok {
|
|
r0 = rf(sessionID)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(map[string]interface{})
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string) map[string]int64); ok {
|
|
r1 = rf(sessionID)
|
|
} else {
|
|
if ret.Get(1) != nil {
|
|
r1 = ret.Get(1).(map[string]int64)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(2).(func(string) error); ok {
|
|
r2 = rf(sessionID)
|
|
} else {
|
|
r2 = ret.Error(2)
|
|
}
|
|
|
|
return r0, r1, r2
|
|
}
|
|
|
|
// Invalidate provides a mock function with given fields: sessionID
|
|
func (_m *SessionAttributeStore) Invalidate(sessionID string) error {
|
|
ret := _m.Called(sessionID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Invalidate")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string) error); ok {
|
|
r0 = rf(sessionID)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Refresh provides a mock function with given fields: sessionID, attrs, updatedAt
|
|
func (_m *SessionAttributeStore) Refresh(sessionID string, attrs map[string]interface{}, updatedAt int64) error {
|
|
ret := _m.Called(sessionID, attrs, updatedAt)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Refresh")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, map[string]interface{}, int64) error); ok {
|
|
r0 = rf(sessionID, attrs, updatedAt)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// NewSessionAttributeStore creates a new instance of SessionAttributeStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
|
// The first argument is typically a *testing.T value.
|
|
func NewSessionAttributeStore(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *SessionAttributeStore {
|
|
mock := &SessionAttributeStore{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|