1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-12 10:55:20 +02:00
sap-jenkins-library/pkg/hadolint/mocks/hadolintPiperFileUtils.go

50 lines
1.1 KiB
Go
Raw Normal View History

refactor(hadolint): implement step in GO (#1169) * initial commit of yaml file * initial commit for HaDoLint in GO * add helper function to load file from url * load config file * write report information to disk * comment the code * refactor groovy code * remove download function from FileUtils * use http.Downloader * rename step files * update generated files * update generated files * remove duplicate commands * add credentials for config url * add generated test file * reuse piperExecuteBin functions * correct step name * update go step * deactivate test * fix import * use differing go step name * rename step * correct result publishing * correct command name * expose tls insecure flag * hand through error * disable tls verification * fix tls disabling * use credentials * mow * reformat * add qgate only if set * correct report name * remove old defaults * add qgate to defaults * handle report name * restore default * remove unused step config * use piperExecuteBin * remove obsolete type * add test cases * remove groovy tests * move client parameter handling to run function * use custom interfaces and mockery * remove commented code * correct struct names * rename parameter dockerfile * add further asserts * cleanup * change file permission to read/write * remove tokenize * add further comments * init http client only if necessary * add todo * Revert "rename parameter dockerfile" This reverts commit 2a570685b89317d20217217894d68242d4620031. * add alias for dockerfile parameter * correct test case * Apply suggestions from code review Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com> * add comment about mock assertions Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
2020-11-16 16:14:54 +02:00
// Code generated by mockery v2.0.0-alpha.13. DO NOT EDIT.
package mocks
import (
os "os"
mock "github.com/stretchr/testify/mock"
)
// HadolintPiperFileUtils is an autogenerated mock type for the HadolintPiperFileUtils type
type HadolintPiperFileUtils struct {
mock.Mock
}
// FileExists provides a mock function with given fields: filename
func (_m *HadolintPiperFileUtils) FileExists(filename string) (bool, error) {
ret := _m.Called(filename)
var r0 bool
if rf, ok := ret.Get(0).(func(string) bool); ok {
r0 = rf(filename)
} else {
r0 = ret.Get(0).(bool)
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(filename)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// FileWrite provides a mock function with given fields: filename, data, perm
func (_m *HadolintPiperFileUtils) FileWrite(filename string, data []byte, perm os.FileMode) error {
ret := _m.Called(filename, data, perm)
var r0 error
if rf, ok := ret.Get(0).(func(string, []byte, os.FileMode) error); ok {
r0 = rf(filename, data, perm)
} else {
r0 = ret.Error(0)
}
return r0
}