2024-04-15 15:46:44 +00:00
// Code generated by mockery. DO NOT EDIT.
2021-09-28 10:56:59 +00:00
2024-06-25 10:23:07 +00:00
//go:build test
// +build test
2021-09-28 10:56:59 +00:00
package mocks
import (
context "context"
2022-11-06 11:44:04 +00:00
http "net/http"
2022-11-04 23:35:06 +00:00
2021-09-28 10:56:59 +00:00
mock "github.com/stretchr/testify/mock"
2024-12-22 09:44:34 +00:00
model "go.woodpecker-ci.org/woodpecker/v3/server/model"
2022-11-06 11:44:04 +00:00
2024-12-22 09:44:34 +00:00
types "go.woodpecker-ci.org/woodpecker/v3/server/forge/types"
2021-09-28 10:56:59 +00:00
)
2022-11-04 23:35:06 +00:00
// Forge is an autogenerated mock type for the Forge type
type Forge struct {
2021-09-28 10:56:59 +00:00
mock . Mock
}
// Activate provides a mock function with given fields: ctx, u, r, link
2022-11-04 23:35:06 +00:00
func ( _m * Forge ) Activate ( ctx context . Context , u * model . User , r * model . Repo , link string ) error {
2021-09-28 10:56:59 +00:00
ret := _m . Called ( ctx , u , r , link )
2023-12-12 20:30:52 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for Activate" )
}
2021-09-28 10:56:59 +00:00
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * model . User , * model . Repo , string ) error ) ; ok {
r0 = rf ( ctx , u , r , link )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
// Auth provides a mock function with given fields: ctx, token, secret
2023-03-19 21:42:21 +00:00
func ( _m * Forge ) Auth ( ctx context . Context , token string , secret string ) ( string , error ) {
2021-09-28 10:56:59 +00:00
ret := _m . Called ( ctx , token , secret )
2023-12-12 20:30:52 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for Auth" )
}
2021-09-28 10:56:59 +00:00
var r0 string
2023-03-19 09:43:57 +00:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string , string ) ( string , error ) ) ; ok {
return rf ( ctx , token , secret )
}
2021-09-28 10:56:59 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string , string ) string ) ; ok {
r0 = rf ( ctx , token , secret )
} else {
r0 = ret . Get ( 0 ) . ( string )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string , string ) error ) ; ok {
r1 = rf ( ctx , token , secret )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2022-08-31 22:36:32 +00:00
// BranchHead provides a mock function with given fields: ctx, u, r, branch
2024-02-11 09:44:50 +00:00
func ( _m * Forge ) BranchHead ( ctx context . Context , u * model . User , r * model . Repo , branch string ) ( * model . Commit , error ) {
2022-08-31 22:36:32 +00:00
ret := _m . Called ( ctx , u , r , branch )
2023-12-12 20:30:52 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for BranchHead" )
}
2024-02-11 09:44:50 +00:00
var r0 * model . Commit
2023-03-19 09:43:57 +00:00
var r1 error
2024-02-11 09:44:50 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * model . User , * model . Repo , string ) ( * model . Commit , error ) ) ; ok {
2023-03-19 09:43:57 +00:00
return rf ( ctx , u , r , branch )
}
2024-02-11 09:44:50 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * model . User , * model . Repo , string ) * model . Commit ) ; ok {
2022-08-31 22:36:32 +00:00
r0 = rf ( ctx , u , r , branch )
} else {
2024-02-11 09:44:50 +00:00
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( * model . Commit )
}
2022-08-31 22:36:32 +00:00
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , * model . User , * model . Repo , string ) error ) ; ok {
r1 = rf ( ctx , u , r , branch )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2023-04-30 01:40:13 +00:00
// Branches provides a mock function with given fields: ctx, u, r, p
func ( _m * Forge ) Branches ( ctx context . Context , u * model . User , r * model . Repo , p * model . ListOptions ) ( [ ] string , error ) {
ret := _m . Called ( ctx , u , r , p )
2021-10-27 00:47:55 +00:00
2023-12-12 20:30:52 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for Branches" )
}
2021-10-27 00:47:55 +00:00
var r0 [ ] string
2023-03-19 09:43:57 +00:00
var r1 error
2023-04-30 01:40:13 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * model . User , * model . Repo , * model . ListOptions ) ( [ ] string , error ) ) ; ok {
return rf ( ctx , u , r , p )
2023-03-19 09:43:57 +00:00
}
2023-04-30 01:40:13 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * model . User , * model . Repo , * model . ListOptions ) [ ] string ) ; ok {
r0 = rf ( ctx , u , r , p )
2021-10-27 00:47:55 +00:00
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( [ ] string )
}
}
2023-04-30 01:40:13 +00:00
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , * model . User , * model . Repo , * model . ListOptions ) error ) ; ok {
r1 = rf ( ctx , u , r , p )
2021-10-27 00:47:55 +00:00
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2021-09-28 10:56:59 +00:00
// Deactivate provides a mock function with given fields: ctx, u, r, link
2022-11-04 23:35:06 +00:00
func ( _m * Forge ) Deactivate ( ctx context . Context , u * model . User , r * model . Repo , link string ) error {
2021-09-28 10:56:59 +00:00
ret := _m . Called ( ctx , u , r , link )
2023-12-12 20:30:52 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for Deactivate" )
}
2021-09-28 10:56:59 +00:00
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * model . User , * model . Repo , string ) error ) ; ok {
r0 = rf ( ctx , u , r , link )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
// Dir provides a mock function with given fields: ctx, u, r, b, f
2022-11-06 11:44:04 +00:00
func ( _m * Forge ) Dir ( ctx context . Context , u * model . User , r * model . Repo , b * model . Pipeline , f string ) ( [ ] * types . FileMeta , error ) {
2021-09-28 10:56:59 +00:00
ret := _m . Called ( ctx , u , r , b , f )
2023-12-12 20:30:52 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for Dir" )
}
2022-11-06 11:44:04 +00:00
var r0 [ ] * types . FileMeta
2023-03-19 09:43:57 +00:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * model . User , * model . Repo , * model . Pipeline , string ) ( [ ] * types . FileMeta , error ) ) ; ok {
return rf ( ctx , u , r , b , f )
}
2022-11-06 11:44:04 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * model . User , * model . Repo , * model . Pipeline , string ) [ ] * types . FileMeta ) ; ok {
2021-09-28 10:56:59 +00:00
r0 = rf ( ctx , u , r , b , f )
} else {
if ret . Get ( 0 ) != nil {
2022-11-06 11:44:04 +00:00
r0 = ret . Get ( 0 ) . ( [ ] * types . FileMeta )
2021-09-28 10:56:59 +00:00
}
}
2022-10-18 01:24:12 +00:00
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , * model . User , * model . Repo , * model . Pipeline , string ) error ) ; ok {
2021-09-28 10:56:59 +00:00
r1 = rf ( ctx , u , r , b , f )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// File provides a mock function with given fields: ctx, u, r, b, f
2022-11-04 23:35:06 +00:00
func ( _m * Forge ) File ( ctx context . Context , u * model . User , r * model . Repo , b * model . Pipeline , f string ) ( [ ] byte , error ) {
2021-09-28 10:56:59 +00:00
ret := _m . Called ( ctx , u , r , b , f )
2023-12-12 20:30:52 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for File" )
}
2021-09-28 10:56:59 +00:00
var r0 [ ] byte
2023-03-19 09:43:57 +00:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * model . User , * model . Repo , * model . Pipeline , string ) ( [ ] byte , error ) ) ; ok {
return rf ( ctx , u , r , b , f )
}
2022-10-18 01:24:12 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * model . User , * model . Repo , * model . Pipeline , string ) [ ] byte ) ; ok {
2021-09-28 10:56:59 +00:00
r0 = rf ( ctx , u , r , b , f )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( [ ] byte )
}
}
2022-10-18 01:24:12 +00:00
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , * model . User , * model . Repo , * model . Pipeline , string ) error ) ; ok {
2021-09-28 10:56:59 +00:00
r1 = rf ( ctx , u , r , b , f )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2022-01-17 22:46:59 +00:00
// Hook provides a mock function with given fields: ctx, r
2022-11-04 23:35:06 +00:00
func ( _m * Forge ) Hook ( ctx context . Context , r * http . Request ) ( * model . Repo , * model . Pipeline , error ) {
2022-01-17 22:46:59 +00:00
ret := _m . Called ( ctx , r )
2021-09-28 10:56:59 +00:00
2023-12-12 20:30:52 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for Hook" )
}
2021-09-28 10:56:59 +00:00
var r0 * model . Repo
2023-03-19 09:43:57 +00:00
var r1 * model . Pipeline
var r2 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * http . Request ) ( * model . Repo , * model . Pipeline , error ) ) ; ok {
return rf ( ctx , r )
}
2022-01-17 22:46:59 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * http . Request ) * model . Repo ) ; ok {
r0 = rf ( ctx , r )
2021-09-28 10:56:59 +00:00
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( * model . Repo )
}
}
2022-10-18 01:24:12 +00:00
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , * http . Request ) * model . Pipeline ) ; ok {
2022-01-17 22:46:59 +00:00
r1 = rf ( ctx , r )
2021-09-28 10:56:59 +00:00
} else {
if ret . Get ( 1 ) != nil {
2022-10-18 01:24:12 +00:00
r1 = ret . Get ( 1 ) . ( * model . Pipeline )
2021-09-28 10:56:59 +00:00
}
}
2022-01-17 22:46:59 +00:00
if rf , ok := ret . Get ( 2 ) . ( func ( context . Context , * http . Request ) error ) ; ok {
r2 = rf ( ctx , r )
2021-09-28 10:56:59 +00:00
} else {
r2 = ret . Error ( 2 )
}
return r0 , r1 , r2
}
2024-02-13 15:19:02 +00:00
// Login provides a mock function with given fields: ctx, r
func ( _m * Forge ) Login ( ctx context . Context , r * types . OAuthRequest ) ( * model . User , string , error ) {
ret := _m . Called ( ctx , r )
2021-09-28 10:56:59 +00:00
2023-12-12 20:30:52 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for Login" )
}
2021-09-28 10:56:59 +00:00
var r0 * model . User
2024-02-13 15:19:02 +00:00
var r1 string
var r2 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * types . OAuthRequest ) ( * model . User , string , error ) ) ; ok {
return rf ( ctx , r )
2023-03-19 09:43:57 +00:00
}
2024-02-13 15:19:02 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * types . OAuthRequest ) * model . User ) ; ok {
r0 = rf ( ctx , r )
2021-09-28 10:56:59 +00:00
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( * model . User )
}
}
2024-02-13 15:19:02 +00:00
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , * types . OAuthRequest ) string ) ; ok {
r1 = rf ( ctx , r )
2021-09-28 10:56:59 +00:00
} else {
2024-02-13 15:19:02 +00:00
r1 = ret . Get ( 1 ) . ( string )
2021-09-28 10:56:59 +00:00
}
2024-02-13 15:19:02 +00:00
if rf , ok := ret . Get ( 2 ) . ( func ( context . Context , * types . OAuthRequest ) error ) ; ok {
r2 = rf ( ctx , r )
} else {
r2 = ret . Error ( 2 )
}
return r0 , r1 , r2
2021-09-28 10:56:59 +00:00
}
2024-12-18 07:58:08 +00:00
// Name provides a mock function with no fields
2022-11-04 23:35:06 +00:00
func ( _m * Forge ) Name ( ) string {
2022-06-17 18:14:01 +00:00
ret := _m . Called ( )
2023-12-12 20:30:52 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for Name" )
}
2022-06-17 18:14:01 +00:00
var r0 string
if rf , ok := ret . Get ( 0 ) . ( func ( ) string ) ; ok {
r0 = rf ( )
} else {
r0 = ret . Get ( 0 ) . ( string )
}
return r0
}
2021-09-28 10:56:59 +00:00
// Netrc provides a mock function with given fields: u, r
2022-11-04 23:35:06 +00:00
func ( _m * Forge ) Netrc ( u * model . User , r * model . Repo ) ( * model . Netrc , error ) {
2021-09-28 10:56:59 +00:00
ret := _m . Called ( u , r )
2023-12-12 20:30:52 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for Netrc" )
}
2021-09-28 10:56:59 +00:00
var r0 * model . Netrc
2023-03-19 09:43:57 +00:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( * model . User , * model . Repo ) ( * model . Netrc , error ) ) ; ok {
return rf ( u , r )
}
2021-09-28 10:56:59 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( * model . User , * model . Repo ) * model . Netrc ) ; ok {
r0 = rf ( u , r )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( * model . Netrc )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( * model . User , * model . Repo ) error ) ; ok {
r1 = rf ( u , r )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2023-07-21 17:45:32 +00:00
// Org provides a mock function with given fields: ctx, u, org
func ( _m * Forge ) Org ( ctx context . Context , u * model . User , org string ) ( * model . Org , error ) {
ret := _m . Called ( ctx , u , org )
2023-12-12 20:30:52 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for Org" )
}
2023-07-21 17:45:32 +00:00
var r0 * model . Org
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * model . User , string ) ( * model . Org , error ) ) ; ok {
return rf ( ctx , u , org )
}
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * model . User , string ) * model . Org ) ; ok {
r0 = rf ( ctx , u , org )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( * model . Org )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , * model . User , string ) error ) ; ok {
r1 = rf ( ctx , u , org )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// OrgMembership provides a mock function with given fields: ctx, u, org
func ( _m * Forge ) OrgMembership ( ctx context . Context , u * model . User , org string ) ( * model . OrgPerm , error ) {
ret := _m . Called ( ctx , u , org )
2022-07-25 01:09:35 +00:00
2023-12-12 20:30:52 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for OrgMembership" )
}
2022-07-25 01:09:35 +00:00
var r0 * model . OrgPerm
2023-03-19 09:43:57 +00:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * model . User , string ) ( * model . OrgPerm , error ) ) ; ok {
2023-07-21 17:45:32 +00:00
return rf ( ctx , u , org )
2023-03-19 09:43:57 +00:00
}
2022-07-25 01:09:35 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * model . User , string ) * model . OrgPerm ) ; ok {
2023-07-21 17:45:32 +00:00
r0 = rf ( ctx , u , org )
2022-07-25 01:09:35 +00:00
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( * model . OrgPerm )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , * model . User , string ) error ) ; ok {
2023-07-21 17:45:32 +00:00
r1 = rf ( ctx , u , org )
2022-07-25 01:09:35 +00:00
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2023-03-19 09:43:57 +00:00
// PullRequests provides a mock function with given fields: ctx, u, r, p
2023-04-30 01:40:13 +00:00
func ( _m * Forge ) PullRequests ( ctx context . Context , u * model . User , r * model . Repo , p * model . ListOptions ) ( [ ] * model . PullRequest , error ) {
2023-03-19 09:43:57 +00:00
ret := _m . Called ( ctx , u , r , p )
2023-12-12 20:30:52 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for PullRequests" )
}
2023-03-19 09:43:57 +00:00
var r0 [ ] * model . PullRequest
var r1 error
2023-04-30 01:40:13 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * model . User , * model . Repo , * model . ListOptions ) ( [ ] * model . PullRequest , error ) ) ; ok {
2023-03-19 09:43:57 +00:00
return rf ( ctx , u , r , p )
}
2023-04-30 01:40:13 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * model . User , * model . Repo , * model . ListOptions ) [ ] * model . PullRequest ) ; ok {
2023-03-19 09:43:57 +00:00
r0 = rf ( ctx , u , r , p )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( [ ] * model . PullRequest )
}
}
2023-04-30 01:40:13 +00:00
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , * model . User , * model . Repo , * model . ListOptions ) error ) ; ok {
2023-03-19 09:43:57 +00:00
r1 = rf ( ctx , u , r , p )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2022-11-15 14:01:23 +00:00
// Repo provides a mock function with given fields: ctx, u, remoteID, owner, name
2023-03-19 21:42:21 +00:00
func ( _m * Forge ) Repo ( ctx context . Context , u * model . User , remoteID model . ForgeRemoteID , owner string , name string ) ( * model . Repo , error ) {
2022-11-15 14:01:23 +00:00
ret := _m . Called ( ctx , u , remoteID , owner , name )
2021-09-28 10:56:59 +00:00
2023-12-12 20:30:52 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for Repo" )
}
2021-09-28 10:56:59 +00:00
var r0 * model . Repo
2023-03-19 09:43:57 +00:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * model . User , model . ForgeRemoteID , string , string ) ( * model . Repo , error ) ) ; ok {
return rf ( ctx , u , remoteID , owner , name )
}
2022-11-15 14:01:23 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * model . User , model . ForgeRemoteID , string , string ) * model . Repo ) ; ok {
r0 = rf ( ctx , u , remoteID , owner , name )
2021-09-28 10:56:59 +00:00
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( * model . Repo )
}
}
2022-11-15 14:01:23 +00:00
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , * model . User , model . ForgeRemoteID , string , string ) error ) ; ok {
r1 = rf ( ctx , u , remoteID , owner , name )
2021-09-28 10:56:59 +00:00
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// Repos provides a mock function with given fields: ctx, u
2022-11-04 23:35:06 +00:00
func ( _m * Forge ) Repos ( ctx context . Context , u * model . User ) ( [ ] * model . Repo , error ) {
2021-09-28 10:56:59 +00:00
ret := _m . Called ( ctx , u )
2023-12-12 20:30:52 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for Repos" )
}
2021-09-28 10:56:59 +00:00
var r0 [ ] * model . Repo
2023-03-19 09:43:57 +00:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * model . User ) ( [ ] * model . Repo , error ) ) ; ok {
return rf ( ctx , u )
}
2021-09-28 10:56:59 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * model . User ) [ ] * model . Repo ) ; ok {
r0 = rf ( ctx , u )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( [ ] * model . Repo )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , * model . User ) error ) ; ok {
r1 = rf ( ctx , u )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2022-01-03 14:33:36 +00:00
// Status provides a mock function with given fields: ctx, u, r, b, p
2023-06-27 16:01:18 +00:00
func ( _m * Forge ) Status ( ctx context . Context , u * model . User , r * model . Repo , b * model . Pipeline , p * model . Workflow ) error {
2022-01-03 14:33:36 +00:00
ret := _m . Called ( ctx , u , r , b , p )
2021-09-28 10:56:59 +00:00
2023-12-12 20:30:52 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for Status" )
}
2021-09-28 10:56:59 +00:00
var r0 error
2023-06-27 16:01:18 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * model . User , * model . Repo , * model . Pipeline , * model . Workflow ) error ) ; ok {
2022-01-03 14:33:36 +00:00
r0 = rf ( ctx , u , r , b , p )
2021-09-28 10:56:59 +00:00
} else {
r0 = ret . Error ( 0 )
}
return r0
}
// Teams provides a mock function with given fields: ctx, u
2022-11-04 23:35:06 +00:00
func ( _m * Forge ) Teams ( ctx context . Context , u * model . User ) ( [ ] * model . Team , error ) {
2021-09-28 10:56:59 +00:00
ret := _m . Called ( ctx , u )
2023-12-12 20:30:52 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for Teams" )
}
2021-09-28 10:56:59 +00:00
var r0 [ ] * model . Team
2023-03-19 09:43:57 +00:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * model . User ) ( [ ] * model . Team , error ) ) ; ok {
return rf ( ctx , u )
}
2021-09-28 10:56:59 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * model . User ) [ ] * model . Team ) ; ok {
r0 = rf ( ctx , u )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( [ ] * model . Team )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , * model . User ) error ) ; ok {
r1 = rf ( ctx , u )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2022-06-17 18:14:01 +00:00
2024-12-18 07:58:08 +00:00
// URL provides a mock function with no fields
2023-05-31 16:30:41 +00:00
func ( _m * Forge ) URL ( ) string {
ret := _m . Called ( )
2023-12-12 20:30:52 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for URL" )
}
2023-05-31 16:30:41 +00:00
var r0 string
if rf , ok := ret . Get ( 0 ) . ( func ( ) string ) ; ok {
r0 = rf ( )
} else {
r0 = ret . Get ( 0 ) . ( string )
}
return r0
}
2023-07-11 13:53:05 +00:00
// NewForge creates a new instance of Forge. 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 NewForge ( t interface {
2022-06-17 18:14:01 +00:00
mock . TestingT
Cleanup ( func ( ) )
2023-07-11 13:53:05 +00:00
} ) * Forge {
2022-11-04 23:35:06 +00:00
mock := & Forge { }
2022-06-17 18:14:01 +00:00
mock . Mock . Test ( t )
t . Cleanup ( func ( ) { mock . AssertExpectations ( t ) } )
return mock
}