 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- type StepAnalyticsTrackerMock
- func (mock *StepAnalyticsTrackerMock) LogDerivedDataDownloaded(duration time.Duration, stats kv.DownloadFilesStats)
- func (mock *StepAnalyticsTrackerMock) LogDerivedDataDownloadedCalls() []struct{ ... }
- func (mock *StepAnalyticsTrackerMock) LogDerivedDataUploaded(duration time.Duration, stats kv.UploadFilesStats)
- func (mock *StepAnalyticsTrackerMock) LogDerivedDataUploadedCalls() []struct{ ... }
- func (mock *StepAnalyticsTrackerMock) LogMetadataLoaded(duration time.Duration, cacheKeyType string, totalFileCount int, ...)
- func (mock *StepAnalyticsTrackerMock) LogMetadataLoadedCalls() []struct{ ... }
- func (mock *StepAnalyticsTrackerMock) LogMetadataSaved(duration time.Duration, fileCount int, size int64)
- func (mock *StepAnalyticsTrackerMock) LogMetadataSavedCalls() []struct{ ... }
- func (mock *StepAnalyticsTrackerMock) LogRestoreFinished(totalDuration time.Duration, err error)
- func (mock *StepAnalyticsTrackerMock) LogRestoreFinishedCalls() []struct{ ... }
- func (mock *StepAnalyticsTrackerMock) LogSaveFinished(totalDuration time.Duration, err error)
- func (mock *StepAnalyticsTrackerMock) LogSaveFinishedCalls() []struct{ ... }
- func (mock *StepAnalyticsTrackerMock) Wait()
- func (mock *StepAnalyticsTrackerMock) WaitCalls() []struct{}
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StepAnalyticsTrackerMock ¶
type StepAnalyticsTrackerMock struct {
	// LogDerivedDataDownloadedFunc mocks the LogDerivedDataDownloaded method.
	LogDerivedDataDownloadedFunc func(duration time.Duration, stats kv.DownloadFilesStats)
	// LogDerivedDataUploadedFunc mocks the LogDerivedDataUploaded method.
	LogDerivedDataUploadedFunc func(duration time.Duration, stats kv.UploadFilesStats)
	// LogMetadataLoadedFunc mocks the LogMetadataLoaded method.
	LogMetadataLoadedFunc func(duration time.Duration, cacheKeyType string, totalFileCount int, restoredFileCount int, size int64)
	// LogMetadataSavedFunc mocks the LogMetadataSaved method.
	LogMetadataSavedFunc func(duration time.Duration, fileCount int, size int64)
	// LogRestoreFinishedFunc mocks the LogRestoreFinished method.
	LogRestoreFinishedFunc func(totalDuration time.Duration, err error)
	// LogSaveFinishedFunc mocks the LogSaveFinished method.
	LogSaveFinishedFunc func(totalDuration time.Duration, err error)
	// WaitFunc mocks the Wait method.
	WaitFunc func()
	// contains filtered or unexported fields
}
    StepAnalyticsTrackerMock is a mock implementation of deriveddata.StepAnalyticsTracker.
func TestSomethingThatUsesStepAnalyticsTracker(t *testing.T) {
	// make and configure a mocked deriveddata.StepAnalyticsTracker
	mockedStepAnalyticsTracker := &StepAnalyticsTrackerMock{
		LogDerivedDataDownloadedFunc: func(duration time.Duration, stats kv.DownloadFilesStats)  {
			panic("mock out the LogDerivedDataDownloaded method")
		},
		LogDerivedDataUploadedFunc: func(duration time.Duration, stats kv.UploadFilesStats)  {
			panic("mock out the LogDerivedDataUploaded method")
		},
		LogMetadataLoadedFunc: func(duration time.Duration, cacheKeyType string, totalFileCount int, restoredFileCount int, size int64)  {
			panic("mock out the LogMetadataLoaded method")
		},
		LogMetadataSavedFunc: func(duration time.Duration, fileCount int, size int64)  {
			panic("mock out the LogMetadataSaved method")
		},
		LogRestoreFinishedFunc: func(totalDuration time.Duration, err error)  {
			panic("mock out the LogRestoreFinished method")
		},
		LogSaveFinishedFunc: func(totalDuration time.Duration, err error)  {
			panic("mock out the LogSaveFinished method")
		},
		WaitFunc: func()  {
			panic("mock out the Wait method")
		},
	}
	// use mockedStepAnalyticsTracker in code that requires deriveddata.StepAnalyticsTracker
	// and then make assertions.
}
func (*StepAnalyticsTrackerMock) LogDerivedDataDownloaded ¶
func (mock *StepAnalyticsTrackerMock) LogDerivedDataDownloaded(duration time.Duration, stats kv.DownloadFilesStats)
LogDerivedDataDownloaded calls LogDerivedDataDownloadedFunc.
func (*StepAnalyticsTrackerMock) LogDerivedDataDownloadedCalls ¶
func (mock *StepAnalyticsTrackerMock) LogDerivedDataDownloadedCalls() []struct { Duration time.Duration Stats kv.DownloadFilesStats }
LogDerivedDataDownloadedCalls gets all the calls that were made to LogDerivedDataDownloaded. Check the length with:
len(mockedStepAnalyticsTracker.LogDerivedDataDownloadedCalls())
func (*StepAnalyticsTrackerMock) LogDerivedDataUploaded ¶
func (mock *StepAnalyticsTrackerMock) LogDerivedDataUploaded(duration time.Duration, stats kv.UploadFilesStats)
LogDerivedDataUploaded calls LogDerivedDataUploadedFunc.
func (*StepAnalyticsTrackerMock) LogDerivedDataUploadedCalls ¶
func (mock *StepAnalyticsTrackerMock) LogDerivedDataUploadedCalls() []struct { Duration time.Duration Stats kv.UploadFilesStats }
LogDerivedDataUploadedCalls gets all the calls that were made to LogDerivedDataUploaded. Check the length with:
len(mockedStepAnalyticsTracker.LogDerivedDataUploadedCalls())
func (*StepAnalyticsTrackerMock) LogMetadataLoaded ¶
func (mock *StepAnalyticsTrackerMock) LogMetadataLoaded(duration time.Duration, cacheKeyType string, totalFileCount int, restoredFileCount int, size int64)
LogMetadataLoaded calls LogMetadataLoadedFunc.
func (*StepAnalyticsTrackerMock) LogMetadataLoadedCalls ¶
func (mock *StepAnalyticsTrackerMock) LogMetadataLoadedCalls() []struct { Duration time.Duration CacheKeyType string TotalFileCount int RestoredFileCount int Size int64 }
LogMetadataLoadedCalls gets all the calls that were made to LogMetadataLoaded. Check the length with:
len(mockedStepAnalyticsTracker.LogMetadataLoadedCalls())
func (*StepAnalyticsTrackerMock) LogMetadataSaved ¶
func (mock *StepAnalyticsTrackerMock) LogMetadataSaved(duration time.Duration, fileCount int, size int64)
LogMetadataSaved calls LogMetadataSavedFunc.
func (*StepAnalyticsTrackerMock) LogMetadataSavedCalls ¶
func (mock *StepAnalyticsTrackerMock) LogMetadataSavedCalls() []struct { Duration time.Duration FileCount int Size int64 }
LogMetadataSavedCalls gets all the calls that were made to LogMetadataSaved. Check the length with:
len(mockedStepAnalyticsTracker.LogMetadataSavedCalls())
func (*StepAnalyticsTrackerMock) LogRestoreFinished ¶
func (mock *StepAnalyticsTrackerMock) LogRestoreFinished(totalDuration time.Duration, err error)
LogRestoreFinished calls LogRestoreFinishedFunc.
func (*StepAnalyticsTrackerMock) LogRestoreFinishedCalls ¶
func (mock *StepAnalyticsTrackerMock) LogRestoreFinishedCalls() []struct { TotalDuration time.Duration Err error }
LogRestoreFinishedCalls gets all the calls that were made to LogRestoreFinished. Check the length with:
len(mockedStepAnalyticsTracker.LogRestoreFinishedCalls())
func (*StepAnalyticsTrackerMock) LogSaveFinished ¶
func (mock *StepAnalyticsTrackerMock) LogSaveFinished(totalDuration time.Duration, err error)
LogSaveFinished calls LogSaveFinishedFunc.
func (*StepAnalyticsTrackerMock) LogSaveFinishedCalls ¶
func (mock *StepAnalyticsTrackerMock) LogSaveFinishedCalls() []struct { TotalDuration time.Duration Err error }
LogSaveFinishedCalls gets all the calls that were made to LogSaveFinished. Check the length with:
len(mockedStepAnalyticsTracker.LogSaveFinishedCalls())
func (*StepAnalyticsTrackerMock) Wait ¶
func (mock *StepAnalyticsTrackerMock) Wait()
Wait calls WaitFunc.
func (*StepAnalyticsTrackerMock) WaitCalls ¶
func (mock *StepAnalyticsTrackerMock) WaitCalls() []struct { }
WaitCalls gets all the calls that were made to Wait. Check the length with:
len(mockedStepAnalyticsTracker.WaitCalls())