mirror of
https://github.com/luxfi/cli.git
synced 2026-10-30 17:01:20 +00:00
- Add netrunner as dependency - Fix GetOwners signature mismatches (4 return values) - Update EvmGenesis to embed core.Genesis for compatibility - Fix table rendering issues - Add missing constants and type definitions - Update go.mod with local dependencies
152 lines
3.4 KiB
Go
152 lines
3.4 KiB
Go
// Code generated by mockery v2.26.1. DO NOT EDIT.
|
|
|
|
package mocks
|
|
|
|
import mock "github.com/stretchr/testify/mock"
|
|
|
|
// Downloader is an autogenerated mock type for the Downloader type
|
|
type Downloader struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// Download provides a mock function with given fields: url
|
|
func (_m *Downloader) Download(url string) ([]byte, error) {
|
|
ret := _m.Called(url)
|
|
|
|
var r0 []byte
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string) ([]byte, error)); ok {
|
|
return rf(url)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string) []byte); ok {
|
|
r0 = rf(url)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]byte)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string) error); ok {
|
|
r1 = rf(url)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetAllReleasesForRepo provides a mock function with given fields: org, repo
|
|
func (_m *Downloader) GetAllReleasesForRepo(org string, repo string) ([]string, error) {
|
|
ret := _m.Called(org, repo)
|
|
|
|
var r0 []string
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string, string) ([]string, error)); ok {
|
|
return rf(org, repo)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string, string) []string); ok {
|
|
r0 = rf(org, repo)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]string)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
|
r1 = rf(org, repo)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetLatestReleaseVersion provides a mock function with given fields: releaseURL
|
|
func (_m *Downloader) GetLatestReleaseVersion(releaseURL string) (string, error) {
|
|
ret := _m.Called(releaseURL)
|
|
|
|
var r0 string
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string) (string, error)); ok {
|
|
return rf(releaseURL)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string) string); ok {
|
|
r0 = rf(releaseURL)
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string) error); ok {
|
|
r1 = rf(releaseURL)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetLatestPreReleaseVersion provides a mock function with given fields: releaseURL
|
|
func (_m *Downloader) GetLatestPreReleaseVersion(releaseURL string) (string, error) {
|
|
ret := _m.Called(releaseURL)
|
|
|
|
var r0 string
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string) (string, error)); ok {
|
|
return rf(releaseURL)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string) string); ok {
|
|
r0 = rf(releaseURL)
|
|
} else {
|
|
r0 = ret.Get(0).(string)
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string) error); ok {
|
|
r1 = rf(releaseURL)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// DownloadWithTee provides a mock function with given fields: url, filePath
|
|
func (_m *Downloader) DownloadWithTee(url string, filePath string) ([]byte, error) {
|
|
ret := _m.Called(url, filePath)
|
|
|
|
var r0 []byte
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string, string) ([]byte, error)); ok {
|
|
return rf(url, filePath)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string, string) []byte); ok {
|
|
r0 = rf(url, filePath)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]byte)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
|
r1 = rf(url, filePath)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
type mockConstructorTestingTNewDownloader interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}
|
|
|
|
// NewDownloader creates a new instance of Downloader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
|
func NewDownloader(t mockConstructorTestingTNewDownloader) *Downloader {
|
|
mock := &Downloader{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|