mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-07-28 22:28:25 +00:00
Update pegomock
This commit is contained in:
@@ -18,37 +18,25 @@ We take security issues seriously. Please email us directly at security [at] run
|
||||
open your browser to http://localhost:8080.
|
||||
* The website will be regenerated when your pull request is merged to master.
|
||||
|
||||
|
||||
# Developing
|
||||
|
||||
## Running Atlantis Locally
|
||||
Get the source code:
|
||||
```
|
||||
go get github.com/runatlantis/atlantis
|
||||
```
|
||||
This will clone Atlantis into `$GOPATH/src/github.com/runatlantis/atlantis` (where `$GOPATH` defaults to `~/go`).
|
||||
* Clone the repo from https://github.com/runatlantis/atlantis/
|
||||
* Compile Atlantis:
|
||||
```
|
||||
go install
|
||||
```
|
||||
* Run Atlantis:
|
||||
```
|
||||
atlantis server --gh-user <your username> --gh-token <your token> --repo-whitelist <your repo> --gh-webhook-secret <your webhook secret> --log-level debug
|
||||
```
|
||||
If you get an error like `command not found: atlantis`, ensure that `$GOPATH/bin` is in your `$PATH`.
|
||||
|
||||
Go to that directory:
|
||||
```
|
||||
cd $GOPATH/src/github.com/runatlantis/atlantis
|
||||
```
|
||||
|
||||
Compile Atlantis:
|
||||
```
|
||||
go install
|
||||
```
|
||||
|
||||
Run Atlantis:
|
||||
```
|
||||
atlantis server --gh-user <your username> --gh-token <your token> --repo-whitelist <your repo> --gh-webhook-secret <your webhook secret> --log-level debug
|
||||
```
|
||||
If you get an error like `command not found: atlantis`, ensure that `$GOPATH/bin` is in your `$PATH`.
|
||||
|
||||
Running Tests Locally:
|
||||
## Running Tests Locally:
|
||||
|
||||
`make test`. If you want to run the integration tests that actually run real `terraform` commands, run `make test-all`.
|
||||
|
||||
Running Tests In Docker:
|
||||
## Running Tests In Docker:
|
||||
```
|
||||
docker run --rm -v $(pwd):/go/src/github.com/runatlantis/atlantis -w /go/src/github.com/runatlantis/atlantis runatlantis/testing-env make test
|
||||
```
|
||||
@@ -102,6 +90,39 @@ This is easier to read and more consistent
|
||||
- if you need to test internally i.e. access non-exported stuff, call the file `{file under test}_internal_test.go`
|
||||
- use our testing utility for easier-to-read assertions: `import . "github.com/runatlantis/atlantis/testing"` and then use `Assert()`, `Equals()` and `Ok()`
|
||||
|
||||
### Mocks
|
||||
We use [pegomock](https://github.com/petergtz/pegomock) for mocking. If you're
|
||||
modifying any interfaces that are mocked, you'll need to regen the mocks for that
|
||||
interface.
|
||||
|
||||
If you see errors like:
|
||||
```
|
||||
# github.com/runatlantis/atlantis/server/events [github.com/runatlantis/atlantis/server/events.test]
|
||||
server/events/project_command_builder_internal_test.go:567:5: cannot use workingDir (type *MockWorkingDir) as type WorkingDir in field value:
|
||||
*MockWorkingDir does not implement WorkingDir (missing ListAllFiles method)
|
||||
```
|
||||
|
||||
Then you've likely modified an interface and now need to update the mocks.
|
||||
|
||||
Each interface that is mocked has a `go:generate` command above it, e.g.
|
||||
```go
|
||||
//go:generate pegomock generate -m --use-experimental-model-gen --package mocks -o mocks/mock_project_command_builder.go ProjectCommandBuilder
|
||||
|
||||
type ProjectCommandBuilder interface {
|
||||
BuildAutoplanCommands(ctx *CommandContext) ([]models.ProjectCommandContext, error)
|
||||
}
|
||||
```
|
||||
|
||||
To regen the mock, run `go generate` on that file, e.g.
|
||||
```sh
|
||||
go generate server/events/project_command_builder.go
|
||||
```
|
||||
|
||||
If you get an error about `pegomock` not being available, install it:
|
||||
```sh
|
||||
go get github.com/petergtz/pegomock/...
|
||||
```
|
||||
|
||||
# Creating a New Release
|
||||
1. Update version number in `main.go`.
|
||||
1. Update image tag version in the [kustomize/bundle.yaml](kustomize/bundle.yaml).
|
||||
|
||||
4
Makefile
4
Makefile
@@ -28,8 +28,8 @@ go-generate: ## Run go generate in all packages
|
||||
regen-mocks: ## Delete all mocks and matchers and then run go generate to regen them.
|
||||
find . -type f | grep mocks/mock_ | grep -v vendor | xargs rm
|
||||
find . -type f | grep mocks/matchers | grep -v vendor | xargs rm
|
||||
@# not using $(PKG) here because that it includes directories that have now
|
||||
@# been deleted, causing go generate to fail.
|
||||
@# not using $(PKG) here because that includes directories that have now
|
||||
@# been made empty, causing go generate to fail.
|
||||
go list ./... | grep -v e2e | grep -v vendor | grep -v static | xargs go generate
|
||||
|
||||
test: ## Run tests
|
||||
|
||||
1
go.sum
1
go.sum
@@ -292,6 +292,7 @@ golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3
|
||||
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0 h1:Dh6fw+p6FyRl5x/FvNswO1ji0lIGzm3KP8Y9VkS9PTE=
|
||||
golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
|
||||
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
|
||||
|
||||
@@ -19,6 +19,7 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/runatlantis/atlantis/server/events/db"
|
||||
"github.com/runatlantis/atlantis/server/logging"
|
||||
|
||||
"github.com/google/go-github/v28/github"
|
||||
@@ -200,6 +201,11 @@ func TestRunCommentCommand_ClosedPull(t *testing.T) {
|
||||
// we delete the plans.
|
||||
func TestRunAutoplanCommand_DeletePlans(t *testing.T) {
|
||||
setup(t)
|
||||
tmp, cleanup := TempDir(t)
|
||||
defer cleanup()
|
||||
boltDB, err := db.New(tmp)
|
||||
Ok(t, err)
|
||||
ch.DB = boltDB
|
||||
ch.GlobalAutomerge = true
|
||||
defer func() { ch.GlobalAutomerge = false }()
|
||||
|
||||
@@ -226,8 +232,6 @@ func TestRunAutoplanCommand_DeletePlans(t *testing.T) {
|
||||
},
|
||||
}
|
||||
})
|
||||
tmp, cleanup := TempDir(t)
|
||||
defer cleanup()
|
||||
|
||||
When(workingDir.GetPullDir(matchers.AnyModelsRepo(), matchers.AnyModelsPullRequest())).
|
||||
ThenReturn(tmp, nil)
|
||||
|
||||
@@ -180,7 +180,7 @@ func (c *MockBackend_TryLock_OngoingVerification) GetCapturedArguments() models.
|
||||
func (c *MockBackend_TryLock_OngoingVerification) GetAllCapturedArguments() (_param0 []models.ProjectLock) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.ProjectLock, len(params[0]))
|
||||
_param0 = make([]models.ProjectLock, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.ProjectLock)
|
||||
}
|
||||
@@ -207,11 +207,11 @@ func (c *MockBackend_Unlock_OngoingVerification) GetCapturedArguments() (models.
|
||||
func (c *MockBackend_Unlock_OngoingVerification) GetAllCapturedArguments() (_param0 []models.Project, _param1 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.Project, len(params[0]))
|
||||
_param0 = make([]models.Project, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.Project)
|
||||
}
|
||||
_param1 = make([]string, len(params[1]))
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(string)
|
||||
}
|
||||
@@ -255,11 +255,11 @@ func (c *MockBackend_GetLock_OngoingVerification) GetCapturedArguments() (models
|
||||
func (c *MockBackend_GetLock_OngoingVerification) GetAllCapturedArguments() (_param0 []models.Project, _param1 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.Project, len(params[0]))
|
||||
_param0 = make([]models.Project, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.Project)
|
||||
}
|
||||
_param1 = make([]string, len(params[1]))
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(string)
|
||||
}
|
||||
@@ -286,11 +286,11 @@ func (c *MockBackend_UnlockByPull_OngoingVerification) GetCapturedArguments() (s
|
||||
func (c *MockBackend_UnlockByPull_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 []int) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(params[0]))
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
_param1 = make([]int, len(params[1]))
|
||||
_param1 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(int)
|
||||
}
|
||||
|
||||
@@ -177,19 +177,19 @@ func (c *MockLocker_TryLock_OngoingVerification) GetCapturedArguments() (models.
|
||||
func (c *MockLocker_TryLock_OngoingVerification) GetAllCapturedArguments() (_param0 []models.Project, _param1 []string, _param2 []models.PullRequest, _param3 []models.User) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.Project, len(params[0]))
|
||||
_param0 = make([]models.Project, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.Project)
|
||||
}
|
||||
_param1 = make([]string, len(params[1]))
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(string)
|
||||
}
|
||||
_param2 = make([]models.PullRequest, len(params[2]))
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
}
|
||||
_param3 = make([]models.User, len(params[3]))
|
||||
_param3 = make([]models.User, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(models.User)
|
||||
}
|
||||
@@ -216,7 +216,7 @@ func (c *MockLocker_Unlock_OngoingVerification) GetCapturedArguments() string {
|
||||
func (c *MockLocker_Unlock_OngoingVerification) GetAllCapturedArguments() (_param0 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(params[0]))
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
@@ -260,11 +260,11 @@ func (c *MockLocker_UnlockByPull_OngoingVerification) GetCapturedArguments() (st
|
||||
func (c *MockLocker_UnlockByPull_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 []int) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(params[0]))
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
_param1 = make([]int, len(params[1]))
|
||||
_param1 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(int)
|
||||
}
|
||||
@@ -291,7 +291,7 @@ func (c *MockLocker_GetLock_OngoingVerification) GetCapturedArguments() string {
|
||||
func (c *MockLocker_GetLock_OngoingVerification) GetAllCapturedArguments() (_param0 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(params[0]))
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ package matchers
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
"github.com/petergtz/pegomock"
|
||||
models "github.com/runatlantis/atlantis/server/events/models"
|
||||
)
|
||||
|
||||
@@ -3,7 +3,6 @@ package matchers
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
"github.com/petergtz/pegomock"
|
||||
models "github.com/runatlantis/atlantis/server/events/models"
|
||||
)
|
||||
|
||||
@@ -3,7 +3,6 @@ package matchers
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
"github.com/petergtz/pegomock"
|
||||
logging "github.com/runatlantis/atlantis/server/logging"
|
||||
)
|
||||
|
||||
@@ -4,12 +4,11 @@
|
||||
package events
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"time"
|
||||
|
||||
pegomock "github.com/petergtz/pegomock"
|
||||
models "github.com/runatlantis/atlantis/server/events/models"
|
||||
logging "github.com/runatlantis/atlantis/server/logging"
|
||||
"reflect"
|
||||
"time"
|
||||
)
|
||||
|
||||
type MockWorkingDir struct {
|
||||
@@ -32,18 +31,22 @@ func (mock *MockWorkingDir) Clone(log *logging.SimpleLogger, baseRepo models.Rep
|
||||
panic("mock must not be nil. Use myMock := NewMockWorkingDir().")
|
||||
}
|
||||
params := []pegomock.Param{log, baseRepo, headRepo, p, workspace}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Clone", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Clone", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*bool)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 string
|
||||
var ret1 error
|
||||
var ret1 bool
|
||||
var ret2 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
ret1 = result[1].(bool)
|
||||
}
|
||||
if result[2] != nil {
|
||||
ret2 = result[2].(error)
|
||||
}
|
||||
}
|
||||
return ret0, false, ret1
|
||||
return ret0, ret1, ret2
|
||||
}
|
||||
|
||||
func (mock *MockWorkingDir) GetWorkingDir(r models.Repo, p models.PullRequest, workspace string) (string, error) {
|
||||
@@ -170,23 +173,23 @@ func (c *MockWorkingDir_Clone_OngoingVerification) GetCapturedArguments() (*logg
|
||||
func (c *MockWorkingDir_Clone_OngoingVerification) GetAllCapturedArguments() (_param0 []*logging.SimpleLogger, _param1 []models.Repo, _param2 []models.Repo, _param3 []models.PullRequest, _param4 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*logging.SimpleLogger, len(params[0]))
|
||||
_param0 = make([]*logging.SimpleLogger, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*logging.SimpleLogger)
|
||||
}
|
||||
_param1 = make([]models.Repo, len(params[1]))
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
}
|
||||
_param2 = make([]models.Repo, len(params[2]))
|
||||
_param2 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(models.Repo)
|
||||
}
|
||||
_param3 = make([]models.PullRequest, len(params[3]))
|
||||
_param3 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(models.PullRequest)
|
||||
}
|
||||
_param4 = make([]string, len(params[4]))
|
||||
_param4 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[4] {
|
||||
_param4[u] = param.(string)
|
||||
}
|
||||
@@ -213,15 +216,15 @@ func (c *MockWorkingDir_GetWorkingDir_OngoingVerification) GetCapturedArguments(
|
||||
func (c *MockWorkingDir_GetWorkingDir_OngoingVerification) GetAllCapturedArguments() (_param0 []models.Repo, _param1 []models.PullRequest, _param2 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.Repo, len(params[0]))
|
||||
_param0 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.Repo)
|
||||
}
|
||||
_param1 = make([]models.PullRequest, len(params[1]))
|
||||
_param1 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.PullRequest)
|
||||
}
|
||||
_param2 = make([]string, len(params[2]))
|
||||
_param2 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(string)
|
||||
}
|
||||
@@ -248,11 +251,11 @@ func (c *MockWorkingDir_GetPullDir_OngoingVerification) GetCapturedArguments() (
|
||||
func (c *MockWorkingDir_GetPullDir_OngoingVerification) GetAllCapturedArguments() (_param0 []models.Repo, _param1 []models.PullRequest) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.Repo, len(params[0]))
|
||||
_param0 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.Repo)
|
||||
}
|
||||
_param1 = make([]models.PullRequest, len(params[1]))
|
||||
_param1 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.PullRequest)
|
||||
}
|
||||
@@ -279,11 +282,11 @@ func (c *MockWorkingDir_Delete_OngoingVerification) GetCapturedArguments() (mode
|
||||
func (c *MockWorkingDir_Delete_OngoingVerification) GetAllCapturedArguments() (_param0 []models.Repo, _param1 []models.PullRequest) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.Repo, len(params[0]))
|
||||
_param0 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.Repo)
|
||||
}
|
||||
_param1 = make([]models.PullRequest, len(params[1]))
|
||||
_param1 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.PullRequest)
|
||||
}
|
||||
@@ -310,15 +313,15 @@ func (c *MockWorkingDir_DeleteForWorkspace_OngoingVerification) GetCapturedArgum
|
||||
func (c *MockWorkingDir_DeleteForWorkspace_OngoingVerification) GetAllCapturedArguments() (_param0 []models.Repo, _param1 []models.PullRequest, _param2 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.Repo, len(params[0]))
|
||||
_param0 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.Repo)
|
||||
}
|
||||
_param1 = make([]models.PullRequest, len(params[1]))
|
||||
_param1 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.PullRequest)
|
||||
}
|
||||
_param2 = make([]string, len(params[2]))
|
||||
_param2 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(string)
|
||||
}
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
package matchers
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"github.com/petergtz/pegomock"
|
||||
go_gitlab "github.com/xanzy/go-gitlab"
|
||||
"reflect"
|
||||
)
|
||||
|
||||
func AnyGoGitlabMergeCommentEvent() go_gitlab.MergeCommentEvent {
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
package matchers
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"github.com/petergtz/pegomock"
|
||||
go_gitlab "github.com/xanzy/go-gitlab"
|
||||
"reflect"
|
||||
)
|
||||
|
||||
func AnyGoGitlabMergeEvent() go_gitlab.MergeEvent {
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
package matchers
|
||||
|
||||
import (
|
||||
github "github.com/google/go-github/v28/github"
|
||||
"github.com/petergtz/pegomock"
|
||||
"reflect"
|
||||
"github.com/petergtz/pegomock"
|
||||
github "github.com/google/go-github/v28/github"
|
||||
)
|
||||
|
||||
func AnyPtrToGithubIssueCommentEvent() *github.IssueCommentEvent {
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
package matchers
|
||||
|
||||
import (
|
||||
github "github.com/google/go-github/v28/github"
|
||||
"github.com/petergtz/pegomock"
|
||||
"reflect"
|
||||
"github.com/petergtz/pegomock"
|
||||
github "github.com/google/go-github/v28/github"
|
||||
)
|
||||
|
||||
func AnyPtrToGithubPullRequest() *github.PullRequest {
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
package matchers
|
||||
|
||||
import (
|
||||
github "github.com/google/go-github/v28/github"
|
||||
"github.com/petergtz/pegomock"
|
||||
"reflect"
|
||||
"github.com/petergtz/pegomock"
|
||||
github "github.com/google/go-github/v28/github"
|
||||
)
|
||||
|
||||
func AnyPtrToGithubPullRequestEvent() *github.PullRequestEvent {
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
package matchers
|
||||
|
||||
import (
|
||||
github "github.com/google/go-github/v28/github"
|
||||
"github.com/petergtz/pegomock"
|
||||
"reflect"
|
||||
"github.com/petergtz/pegomock"
|
||||
github "github.com/google/go-github/v28/github"
|
||||
)
|
||||
|
||||
func AnyPtrToGithubRepository() *github.Repository {
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
package matchers
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"github.com/petergtz/pegomock"
|
||||
go_gitlab "github.com/xanzy/go-gitlab"
|
||||
"reflect"
|
||||
)
|
||||
|
||||
func AnyPtrToGoGitlabMergeRequest() *go_gitlab.MergeRequest {
|
||||
|
||||
@@ -101,11 +101,11 @@ func (c *MockAzureDevopsPullGetter_GetPullRequest_OngoingVerification) GetCaptur
|
||||
func (c *MockAzureDevopsPullGetter_GetPullRequest_OngoingVerification) GetAllCapturedArguments() (_param0 []models.Repo, _param1 []int) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.Repo, len(params[0]))
|
||||
_param0 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.Repo)
|
||||
}
|
||||
_param1 = make([]int, len(params[1]))
|
||||
_param1 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(int)
|
||||
}
|
||||
|
||||
@@ -98,27 +98,27 @@ func (c *MockCommandRunner_RunCommentCommand_OngoingVerification) GetCapturedArg
|
||||
func (c *MockCommandRunner_RunCommentCommand_OngoingVerification) GetAllCapturedArguments() (_param0 []models.Repo, _param1 []*models.Repo, _param2 []*models.PullRequest, _param3 []models.User, _param4 []int, _param5 []*events.CommentCommand) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.Repo, len(params[0]))
|
||||
_param0 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.Repo)
|
||||
}
|
||||
_param1 = make([]*models.Repo, len(params[1]))
|
||||
_param1 = make([]*models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(*models.Repo)
|
||||
}
|
||||
_param2 = make([]*models.PullRequest, len(params[2]))
|
||||
_param2 = make([]*models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(*models.PullRequest)
|
||||
}
|
||||
_param3 = make([]models.User, len(params[3]))
|
||||
_param3 = make([]models.User, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(models.User)
|
||||
}
|
||||
_param4 = make([]int, len(params[4]))
|
||||
_param4 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range params[4] {
|
||||
_param4[u] = param.(int)
|
||||
}
|
||||
_param5 = make([]*events.CommentCommand, len(params[5]))
|
||||
_param5 = make([]*events.CommentCommand, len(c.methodInvocations))
|
||||
for u, param := range params[5] {
|
||||
_param5[u] = param.(*events.CommentCommand)
|
||||
}
|
||||
@@ -145,19 +145,19 @@ func (c *MockCommandRunner_RunAutoplanCommand_OngoingVerification) GetCapturedAr
|
||||
func (c *MockCommandRunner_RunAutoplanCommand_OngoingVerification) GetAllCapturedArguments() (_param0 []models.Repo, _param1 []models.Repo, _param2 []models.PullRequest, _param3 []models.User) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.Repo, len(params[0]))
|
||||
_param0 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.Repo)
|
||||
}
|
||||
_param1 = make([]models.Repo, len(params[1]))
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
}
|
||||
_param2 = make([]models.PullRequest, len(params[2]))
|
||||
_param2 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(models.PullRequest)
|
||||
}
|
||||
_param3 = make([]models.User, len(params[3]))
|
||||
_param3 = make([]models.User, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(models.User)
|
||||
}
|
||||
|
||||
@@ -97,11 +97,11 @@ func (c *MockCommentParsing_Parse_OngoingVerification) GetCapturedArguments() (s
|
||||
func (c *MockCommentParsing_Parse_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 []models.VCSHostType) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(params[0]))
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
_param1 = make([]models.VCSHostType, len(params[1]))
|
||||
_param1 = make([]models.VCSHostType, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.VCSHostType)
|
||||
}
|
||||
|
||||
@@ -126,19 +126,19 @@ func (c *MockCommitStatusUpdater_UpdateCombined_OngoingVerification) GetCaptured
|
||||
func (c *MockCommitStatusUpdater_UpdateCombined_OngoingVerification) GetAllCapturedArguments() (_param0 []models.Repo, _param1 []models.PullRequest, _param2 []models.CommitStatus, _param3 []models.CommandName) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.Repo, len(params[0]))
|
||||
_param0 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.Repo)
|
||||
}
|
||||
_param1 = make([]models.PullRequest, len(params[1]))
|
||||
_param1 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.PullRequest)
|
||||
}
|
||||
_param2 = make([]models.CommitStatus, len(params[2]))
|
||||
_param2 = make([]models.CommitStatus, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(models.CommitStatus)
|
||||
}
|
||||
_param3 = make([]models.CommandName, len(params[3]))
|
||||
_param3 = make([]models.CommandName, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(models.CommandName)
|
||||
}
|
||||
@@ -165,27 +165,27 @@ func (c *MockCommitStatusUpdater_UpdateCombinedCount_OngoingVerification) GetCap
|
||||
func (c *MockCommitStatusUpdater_UpdateCombinedCount_OngoingVerification) GetAllCapturedArguments() (_param0 []models.Repo, _param1 []models.PullRequest, _param2 []models.CommitStatus, _param3 []models.CommandName, _param4 []int, _param5 []int) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.Repo, len(params[0]))
|
||||
_param0 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.Repo)
|
||||
}
|
||||
_param1 = make([]models.PullRequest, len(params[1]))
|
||||
_param1 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.PullRequest)
|
||||
}
|
||||
_param2 = make([]models.CommitStatus, len(params[2]))
|
||||
_param2 = make([]models.CommitStatus, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(models.CommitStatus)
|
||||
}
|
||||
_param3 = make([]models.CommandName, len(params[3]))
|
||||
_param3 = make([]models.CommandName, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(models.CommandName)
|
||||
}
|
||||
_param4 = make([]int, len(params[4]))
|
||||
_param4 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range params[4] {
|
||||
_param4[u] = param.(int)
|
||||
}
|
||||
_param5 = make([]int, len(params[5]))
|
||||
_param5 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range params[5] {
|
||||
_param5[u] = param.(int)
|
||||
}
|
||||
@@ -212,19 +212,19 @@ func (c *MockCommitStatusUpdater_UpdateProject_OngoingVerification) GetCapturedA
|
||||
func (c *MockCommitStatusUpdater_UpdateProject_OngoingVerification) GetAllCapturedArguments() (_param0 []models.ProjectCommandContext, _param1 []models.CommandName, _param2 []models.CommitStatus, _param3 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.ProjectCommandContext, len(params[0]))
|
||||
_param0 = make([]models.ProjectCommandContext, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.ProjectCommandContext)
|
||||
}
|
||||
_param1 = make([]models.CommandName, len(params[1]))
|
||||
_param1 = make([]models.CommandName, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.CommandName)
|
||||
}
|
||||
_param2 = make([]models.CommitStatus, len(params[2]))
|
||||
_param2 = make([]models.CommitStatus, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(models.CommitStatus)
|
||||
}
|
||||
_param3 = make([]string, len(params[3]))
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(string)
|
||||
}
|
||||
|
||||
@@ -100,19 +100,19 @@ func (c *MockCustomStepRunner_Run_OngoingVerification) GetCapturedArguments() (m
|
||||
func (c *MockCustomStepRunner_Run_OngoingVerification) GetAllCapturedArguments() (_param0 []models.ProjectCommandContext, _param1 []string, _param2 []string, _param3 []map[string]string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.ProjectCommandContext, len(params[0]))
|
||||
_param0 = make([]models.ProjectCommandContext, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.ProjectCommandContext)
|
||||
}
|
||||
_param1 = make([]string, len(params[1]))
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(string)
|
||||
}
|
||||
_param2 = make([]string, len(params[2]))
|
||||
_param2 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(string)
|
||||
}
|
||||
_param3 = make([]map[string]string, len(params[3]))
|
||||
_param3 = make([]map[string]string, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(map[string]string)
|
||||
}
|
||||
|
||||
@@ -100,23 +100,23 @@ func (c *MockEnvStepRunner_Run_OngoingVerification) GetCapturedArguments() (mode
|
||||
func (c *MockEnvStepRunner_Run_OngoingVerification) GetAllCapturedArguments() (_param0 []models.ProjectCommandContext, _param1 []string, _param2 []string, _param3 []string, _param4 []map[string]string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.ProjectCommandContext, len(params[0]))
|
||||
_param0 = make([]models.ProjectCommandContext, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.ProjectCommandContext)
|
||||
}
|
||||
_param1 = make([]string, len(params[1]))
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(string)
|
||||
}
|
||||
_param2 = make([]string, len(params[2]))
|
||||
_param2 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(string)
|
||||
}
|
||||
_param3 = make([]string, len(params[3]))
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(string)
|
||||
}
|
||||
_param4 = make([]map[string]string, len(params[4]))
|
||||
_param4 = make([]map[string]string, len(c.methodInvocations))
|
||||
for u, param := range params[4] {
|
||||
_param4[u] = param.(map[string]string)
|
||||
}
|
||||
|
||||
@@ -512,7 +512,7 @@ func (c *MockEventParsing_ParseGithubIssueCommentEvent_OngoingVerification) GetC
|
||||
func (c *MockEventParsing_ParseGithubIssueCommentEvent_OngoingVerification) GetAllCapturedArguments() (_param0 []*github.IssueCommentEvent) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*github.IssueCommentEvent, len(params[0]))
|
||||
_param0 = make([]*github.IssueCommentEvent, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*github.IssueCommentEvent)
|
||||
}
|
||||
@@ -539,7 +539,7 @@ func (c *MockEventParsing_ParseGithubPull_OngoingVerification) GetCapturedArgume
|
||||
func (c *MockEventParsing_ParseGithubPull_OngoingVerification) GetAllCapturedArguments() (_param0 []*github.PullRequest) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*github.PullRequest, len(params[0]))
|
||||
_param0 = make([]*github.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*github.PullRequest)
|
||||
}
|
||||
@@ -566,7 +566,7 @@ func (c *MockEventParsing_ParseGithubPullEvent_OngoingVerification) GetCapturedA
|
||||
func (c *MockEventParsing_ParseGithubPullEvent_OngoingVerification) GetAllCapturedArguments() (_param0 []*github.PullRequestEvent) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*github.PullRequestEvent, len(params[0]))
|
||||
_param0 = make([]*github.PullRequestEvent, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*github.PullRequestEvent)
|
||||
}
|
||||
@@ -593,7 +593,7 @@ func (c *MockEventParsing_ParseGithubRepo_OngoingVerification) GetCapturedArgume
|
||||
func (c *MockEventParsing_ParseGithubRepo_OngoingVerification) GetAllCapturedArguments() (_param0 []*github.Repository) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*github.Repository, len(params[0]))
|
||||
_param0 = make([]*github.Repository, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*github.Repository)
|
||||
}
|
||||
@@ -620,7 +620,7 @@ func (c *MockEventParsing_ParseGitlabMergeRequestEvent_OngoingVerification) GetC
|
||||
func (c *MockEventParsing_ParseGitlabMergeRequestEvent_OngoingVerification) GetAllCapturedArguments() (_param0 []go_gitlab.MergeEvent) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]go_gitlab.MergeEvent, len(params[0]))
|
||||
_param0 = make([]go_gitlab.MergeEvent, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(go_gitlab.MergeEvent)
|
||||
}
|
||||
@@ -647,7 +647,7 @@ func (c *MockEventParsing_ParseGitlabMergeRequestCommentEvent_OngoingVerificatio
|
||||
func (c *MockEventParsing_ParseGitlabMergeRequestCommentEvent_OngoingVerification) GetAllCapturedArguments() (_param0 []go_gitlab.MergeCommentEvent) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]go_gitlab.MergeCommentEvent, len(params[0]))
|
||||
_param0 = make([]go_gitlab.MergeCommentEvent, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(go_gitlab.MergeCommentEvent)
|
||||
}
|
||||
@@ -674,11 +674,11 @@ func (c *MockEventParsing_ParseGitlabMergeRequest_OngoingVerification) GetCaptur
|
||||
func (c *MockEventParsing_ParseGitlabMergeRequest_OngoingVerification) GetAllCapturedArguments() (_param0 []*go_gitlab.MergeRequest, _param1 []models.Repo) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*go_gitlab.MergeRequest, len(params[0]))
|
||||
_param0 = make([]*go_gitlab.MergeRequest, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*go_gitlab.MergeRequest)
|
||||
}
|
||||
_param1 = make([]models.Repo, len(params[1]))
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
}
|
||||
@@ -705,7 +705,7 @@ func (c *MockEventParsing_ParseBitbucketCloudPullEvent_OngoingVerification) GetC
|
||||
func (c *MockEventParsing_ParseBitbucketCloudPullEvent_OngoingVerification) GetAllCapturedArguments() (_param0 [][]byte) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([][]byte, len(params[0]))
|
||||
_param0 = make([][]byte, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.([]byte)
|
||||
}
|
||||
@@ -732,7 +732,7 @@ func (c *MockEventParsing_ParseBitbucketCloudPullCommentEvent_OngoingVerificatio
|
||||
func (c *MockEventParsing_ParseBitbucketCloudPullCommentEvent_OngoingVerification) GetAllCapturedArguments() (_param0 [][]byte) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([][]byte, len(params[0]))
|
||||
_param0 = make([][]byte, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.([]byte)
|
||||
}
|
||||
@@ -759,7 +759,7 @@ func (c *MockEventParsing_GetBitbucketCloudPullEventType_OngoingVerification) Ge
|
||||
func (c *MockEventParsing_GetBitbucketCloudPullEventType_OngoingVerification) GetAllCapturedArguments() (_param0 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(params[0]))
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
@@ -786,7 +786,7 @@ func (c *MockEventParsing_ParseBitbucketServerPullEvent_OngoingVerification) Get
|
||||
func (c *MockEventParsing_ParseBitbucketServerPullEvent_OngoingVerification) GetAllCapturedArguments() (_param0 [][]byte) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([][]byte, len(params[0]))
|
||||
_param0 = make([][]byte, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.([]byte)
|
||||
}
|
||||
@@ -813,7 +813,7 @@ func (c *MockEventParsing_ParseBitbucketServerPullCommentEvent_OngoingVerificati
|
||||
func (c *MockEventParsing_ParseBitbucketServerPullCommentEvent_OngoingVerification) GetAllCapturedArguments() (_param0 [][]byte) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([][]byte, len(params[0]))
|
||||
_param0 = make([][]byte, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.([]byte)
|
||||
}
|
||||
@@ -840,7 +840,7 @@ func (c *MockEventParsing_GetBitbucketServerPullEventType_OngoingVerification) G
|
||||
func (c *MockEventParsing_GetBitbucketServerPullEventType_OngoingVerification) GetAllCapturedArguments() (_param0 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(params[0]))
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
@@ -867,7 +867,7 @@ func (c *MockEventParsing_ParseAzureDevopsPull_OngoingVerification) GetCapturedA
|
||||
func (c *MockEventParsing_ParseAzureDevopsPull_OngoingVerification) GetAllCapturedArguments() (_param0 []*azuredevops.GitPullRequest) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*azuredevops.GitPullRequest, len(params[0]))
|
||||
_param0 = make([]*azuredevops.GitPullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*azuredevops.GitPullRequest)
|
||||
}
|
||||
@@ -894,7 +894,7 @@ func (c *MockEventParsing_ParseAzureDevopsPullEvent_OngoingVerification) GetCapt
|
||||
func (c *MockEventParsing_ParseAzureDevopsPullEvent_OngoingVerification) GetAllCapturedArguments() (_param0 []azuredevops.Event) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]azuredevops.Event, len(params[0]))
|
||||
_param0 = make([]azuredevops.Event, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(azuredevops.Event)
|
||||
}
|
||||
@@ -921,7 +921,7 @@ func (c *MockEventParsing_ParseAzureDevopsRepo_OngoingVerification) GetCapturedA
|
||||
func (c *MockEventParsing_ParseAzureDevopsRepo_OngoingVerification) GetAllCapturedArguments() (_param0 []*azuredevops.GitRepository) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*azuredevops.GitRepository, len(params[0]))
|
||||
_param0 = make([]*azuredevops.GitRepository, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*azuredevops.GitRepository)
|
||||
}
|
||||
|
||||
@@ -101,11 +101,11 @@ func (c *MockGithubPullGetter_GetPullRequest_OngoingVerification) GetCapturedArg
|
||||
func (c *MockGithubPullGetter_GetPullRequest_OngoingVerification) GetAllCapturedArguments() (_param0 []models.Repo, _param1 []int) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.Repo, len(params[0]))
|
||||
_param0 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.Repo)
|
||||
}
|
||||
_param1 = make([]int, len(params[1]))
|
||||
_param1 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(int)
|
||||
}
|
||||
|
||||
@@ -100,11 +100,11 @@ func (c *MockGitlabMergeRequestGetter_GetMergeRequest_OngoingVerification) GetCa
|
||||
func (c *MockGitlabMergeRequestGetter_GetMergeRequest_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 []int) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(params[0]))
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
_param1 = make([]int, len(params[1]))
|
||||
_param1 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(int)
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ func (c *MockLockURLGenerator_GenerateLockURL_OngoingVerification) GetCapturedAr
|
||||
func (c *MockLockURLGenerator_GenerateLockURL_OngoingVerification) GetAllCapturedArguments() (_param0 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(params[0]))
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ func (c *MockPendingPlanFinder_Find_OngoingVerification) GetCapturedArguments()
|
||||
func (c *MockPendingPlanFinder_Find_OngoingVerification) GetAllCapturedArguments() (_param0 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(params[0]))
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
@@ -142,7 +142,7 @@ func (c *MockPendingPlanFinder_DeletePlans_OngoingVerification) GetCapturedArgum
|
||||
func (c *MockPendingPlanFinder_DeletePlans_OngoingVerification) GetAllCapturedArguments() (_param0 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(params[0]))
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ func (c *MockProjectCommandBuilder_BuildAutoplanCommands_OngoingVerification) Ge
|
||||
func (c *MockProjectCommandBuilder_BuildAutoplanCommands_OngoingVerification) GetAllCapturedArguments() (_param0 []*events.CommandContext) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*events.CommandContext, len(params[0]))
|
||||
_param0 = make([]*events.CommandContext, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*events.CommandContext)
|
||||
}
|
||||
@@ -166,11 +166,11 @@ func (c *MockProjectCommandBuilder_BuildPlanCommands_OngoingVerification) GetCap
|
||||
func (c *MockProjectCommandBuilder_BuildPlanCommands_OngoingVerification) GetAllCapturedArguments() (_param0 []*events.CommandContext, _param1 []*events.CommentCommand) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*events.CommandContext, len(params[0]))
|
||||
_param0 = make([]*events.CommandContext, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*events.CommandContext)
|
||||
}
|
||||
_param1 = make([]*events.CommentCommand, len(params[1]))
|
||||
_param1 = make([]*events.CommentCommand, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(*events.CommentCommand)
|
||||
}
|
||||
@@ -197,11 +197,11 @@ func (c *MockProjectCommandBuilder_BuildApplyCommands_OngoingVerification) GetCa
|
||||
func (c *MockProjectCommandBuilder_BuildApplyCommands_OngoingVerification) GetAllCapturedArguments() (_param0 []*events.CommandContext, _param1 []*events.CommentCommand) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*events.CommandContext, len(params[0]))
|
||||
_param0 = make([]*events.CommandContext, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*events.CommandContext)
|
||||
}
|
||||
_param1 = make([]*events.CommentCommand, len(params[1]))
|
||||
_param1 = make([]*events.CommentCommand, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(*events.CommentCommand)
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ func (c *MockProjectCommandRunner_Plan_OngoingVerification) GetCapturedArguments
|
||||
func (c *MockProjectCommandRunner_Plan_OngoingVerification) GetAllCapturedArguments() (_param0 []models.ProjectCommandContext) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.ProjectCommandContext, len(params[0]))
|
||||
_param0 = make([]models.ProjectCommandContext, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.ProjectCommandContext)
|
||||
}
|
||||
@@ -138,7 +138,7 @@ func (c *MockProjectCommandRunner_Apply_OngoingVerification) GetCapturedArgument
|
||||
func (c *MockProjectCommandRunner_Apply_OngoingVerification) GetAllCapturedArguments() (_param0 []models.ProjectCommandContext) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.ProjectCommandContext, len(params[0]))
|
||||
_param0 = make([]models.ProjectCommandContext, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.ProjectCommandContext)
|
||||
}
|
||||
|
||||
@@ -102,23 +102,23 @@ func (c *MockProjectLocker_TryLock_OngoingVerification) GetCapturedArguments() (
|
||||
func (c *MockProjectLocker_TryLock_OngoingVerification) GetAllCapturedArguments() (_param0 []*logging.SimpleLogger, _param1 []models.PullRequest, _param2 []models.User, _param3 []string, _param4 []models.Project) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*logging.SimpleLogger, len(params[0]))
|
||||
_param0 = make([]*logging.SimpleLogger, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*logging.SimpleLogger)
|
||||
}
|
||||
_param1 = make([]models.PullRequest, len(params[1]))
|
||||
_param1 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.PullRequest)
|
||||
}
|
||||
_param2 = make([]models.User, len(params[2]))
|
||||
_param2 = make([]models.User, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(models.User)
|
||||
}
|
||||
_param3 = make([]string, len(params[3]))
|
||||
_param3 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(string)
|
||||
}
|
||||
_param4 = make([]models.Project, len(params[4]))
|
||||
_param4 = make([]models.Project, len(c.methodInvocations))
|
||||
for u, param := range params[4] {
|
||||
_param4[u] = param.(models.Project)
|
||||
}
|
||||
|
||||
@@ -96,11 +96,11 @@ func (c *MockPullCleaner_CleanUpPull_OngoingVerification) GetCapturedArguments()
|
||||
func (c *MockPullCleaner_CleanUpPull_OngoingVerification) GetAllCapturedArguments() (_param0 []models.Repo, _param1 []models.PullRequest) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.Repo, len(params[0]))
|
||||
_param0 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.Repo)
|
||||
}
|
||||
_param1 = make([]models.PullRequest, len(params[1]))
|
||||
_param1 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.PullRequest)
|
||||
}
|
||||
|
||||
@@ -100,19 +100,19 @@ func (c *MockStepRunner_Run_OngoingVerification) GetCapturedArguments() (models.
|
||||
func (c *MockStepRunner_Run_OngoingVerification) GetAllCapturedArguments() (_param0 []models.ProjectCommandContext, _param1 [][]string, _param2 []string, _param3 []map[string]string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.ProjectCommandContext, len(params[0]))
|
||||
_param0 = make([]models.ProjectCommandContext, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.ProjectCommandContext)
|
||||
}
|
||||
_param1 = make([][]string, len(params[1]))
|
||||
_param1 = make([][]string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.([]string)
|
||||
}
|
||||
_param2 = make([]string, len(params[2]))
|
||||
_param2 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(string)
|
||||
}
|
||||
_param3 = make([]map[string]string, len(params[3]))
|
||||
_param3 = make([]map[string]string, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(map[string]string)
|
||||
}
|
||||
|
||||
@@ -97,11 +97,11 @@ func (c *MockWebhooksSender_Send_OngoingVerification) GetCapturedArguments() (*l
|
||||
func (c *MockWebhooksSender_Send_OngoingVerification) GetAllCapturedArguments() (_param0 []*logging.SimpleLogger, _param1 []webhooks.ApplyResult) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*logging.SimpleLogger, len(params[0]))
|
||||
_param0 = make([]*logging.SimpleLogger, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*logging.SimpleLogger)
|
||||
}
|
||||
_param1 = make([]webhooks.ApplyResult, len(params[1]))
|
||||
_param1 = make([]webhooks.ApplyResult, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(webhooks.ApplyResult)
|
||||
}
|
||||
|
||||
@@ -4,12 +4,11 @@
|
||||
package mocks
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"time"
|
||||
|
||||
pegomock "github.com/petergtz/pegomock"
|
||||
models "github.com/runatlantis/atlantis/server/events/models"
|
||||
logging "github.com/runatlantis/atlantis/server/logging"
|
||||
"reflect"
|
||||
"time"
|
||||
)
|
||||
|
||||
type MockWorkingDir struct {
|
||||
@@ -32,18 +31,22 @@ func (mock *MockWorkingDir) Clone(log *logging.SimpleLogger, baseRepo models.Rep
|
||||
panic("mock must not be nil. Use myMock := NewMockWorkingDir().")
|
||||
}
|
||||
params := []pegomock.Param{log, baseRepo, headRepo, p, workspace}
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Clone", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
result := pegomock.GetGenericMockFrom(mock).Invoke("Clone", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*bool)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
||||
var ret0 string
|
||||
var ret1 error
|
||||
var ret1 bool
|
||||
var ret2 error
|
||||
if len(result) != 0 {
|
||||
if result[0] != nil {
|
||||
ret0 = result[0].(string)
|
||||
}
|
||||
if result[1] != nil {
|
||||
ret1 = result[1].(error)
|
||||
ret1 = result[1].(bool)
|
||||
}
|
||||
if result[2] != nil {
|
||||
ret2 = result[2].(error)
|
||||
}
|
||||
}
|
||||
return ret0, false, ret1
|
||||
return ret0, ret1, ret2
|
||||
}
|
||||
|
||||
func (mock *MockWorkingDir) GetWorkingDir(r models.Repo, p models.PullRequest, workspace string) (string, error) {
|
||||
@@ -170,23 +173,23 @@ func (c *MockWorkingDir_Clone_OngoingVerification) GetCapturedArguments() (*logg
|
||||
func (c *MockWorkingDir_Clone_OngoingVerification) GetAllCapturedArguments() (_param0 []*logging.SimpleLogger, _param1 []models.Repo, _param2 []models.Repo, _param3 []models.PullRequest, _param4 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*logging.SimpleLogger, len(params[0]))
|
||||
_param0 = make([]*logging.SimpleLogger, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*logging.SimpleLogger)
|
||||
}
|
||||
_param1 = make([]models.Repo, len(params[1]))
|
||||
_param1 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.Repo)
|
||||
}
|
||||
_param2 = make([]models.Repo, len(params[2]))
|
||||
_param2 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(models.Repo)
|
||||
}
|
||||
_param3 = make([]models.PullRequest, len(params[3]))
|
||||
_param3 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(models.PullRequest)
|
||||
}
|
||||
_param4 = make([]string, len(params[4]))
|
||||
_param4 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[4] {
|
||||
_param4[u] = param.(string)
|
||||
}
|
||||
@@ -213,15 +216,15 @@ func (c *MockWorkingDir_GetWorkingDir_OngoingVerification) GetCapturedArguments(
|
||||
func (c *MockWorkingDir_GetWorkingDir_OngoingVerification) GetAllCapturedArguments() (_param0 []models.Repo, _param1 []models.PullRequest, _param2 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.Repo, len(params[0]))
|
||||
_param0 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.Repo)
|
||||
}
|
||||
_param1 = make([]models.PullRequest, len(params[1]))
|
||||
_param1 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.PullRequest)
|
||||
}
|
||||
_param2 = make([]string, len(params[2]))
|
||||
_param2 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(string)
|
||||
}
|
||||
@@ -248,11 +251,11 @@ func (c *MockWorkingDir_GetPullDir_OngoingVerification) GetCapturedArguments() (
|
||||
func (c *MockWorkingDir_GetPullDir_OngoingVerification) GetAllCapturedArguments() (_param0 []models.Repo, _param1 []models.PullRequest) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.Repo, len(params[0]))
|
||||
_param0 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.Repo)
|
||||
}
|
||||
_param1 = make([]models.PullRequest, len(params[1]))
|
||||
_param1 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.PullRequest)
|
||||
}
|
||||
@@ -279,11 +282,11 @@ func (c *MockWorkingDir_Delete_OngoingVerification) GetCapturedArguments() (mode
|
||||
func (c *MockWorkingDir_Delete_OngoingVerification) GetAllCapturedArguments() (_param0 []models.Repo, _param1 []models.PullRequest) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.Repo, len(params[0]))
|
||||
_param0 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.Repo)
|
||||
}
|
||||
_param1 = make([]models.PullRequest, len(params[1]))
|
||||
_param1 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.PullRequest)
|
||||
}
|
||||
@@ -310,15 +313,15 @@ func (c *MockWorkingDir_DeleteForWorkspace_OngoingVerification) GetCapturedArgum
|
||||
func (c *MockWorkingDir_DeleteForWorkspace_OngoingVerification) GetAllCapturedArguments() (_param0 []models.Repo, _param1 []models.PullRequest, _param2 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.Repo, len(params[0]))
|
||||
_param0 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.Repo)
|
||||
}
|
||||
_param1 = make([]models.PullRequest, len(params[1]))
|
||||
_param1 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.PullRequest)
|
||||
}
|
||||
_param2 = make([]string, len(params[2]))
|
||||
_param2 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(string)
|
||||
}
|
||||
|
||||
@@ -118,15 +118,15 @@ func (c *MockWorkingDirLocker_TryLock_OngoingVerification) GetCapturedArguments(
|
||||
func (c *MockWorkingDirLocker_TryLock_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 []int, _param2 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(params[0]))
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
_param1 = make([]int, len(params[1]))
|
||||
_param1 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(int)
|
||||
}
|
||||
_param2 = make([]string, len(params[2]))
|
||||
_param2 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(string)
|
||||
}
|
||||
@@ -153,11 +153,11 @@ func (c *MockWorkingDirLocker_TryLockPull_OngoingVerification) GetCapturedArgume
|
||||
func (c *MockWorkingDirLocker_TryLockPull_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 []int) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(params[0]))
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
_param1 = make([]int, len(params[1]))
|
||||
_param1 = make([]int, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(int)
|
||||
}
|
||||
|
||||
@@ -547,7 +547,7 @@ projects:
|
||||
defer cleanup()
|
||||
|
||||
workingDir := NewMockWorkingDir()
|
||||
When(workingDir.Clone(matchers.AnyPtrToLoggingSimpleLogger(), matchers.AnyModelsRepo(), matchers.AnyModelsRepo(), matchers.AnyModelsPullRequest(), AnyString())).ThenReturn(tmp, nil)
|
||||
When(workingDir.Clone(matchers.AnyPtrToLoggingSimpleLogger(), matchers.AnyModelsRepo(), matchers.AnyModelsRepo(), matchers.AnyModelsPullRequest(), AnyString())).ThenReturn(tmp, false, nil)
|
||||
vcsClient := vcsmocks.NewMockClient()
|
||||
When(vcsClient.GetModifiedFiles(matchers.AnyModelsRepo(), matchers.AnyModelsPullRequest())).ThenReturn([]string{"modules/module/main.tf"}, nil)
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ projects:
|
||||
defer cleanup()
|
||||
|
||||
workingDir := mocks.NewMockWorkingDir()
|
||||
When(workingDir.Clone(matchers.AnyPtrToLoggingSimpleLogger(), matchers.AnyModelsRepo(), matchers.AnyModelsRepo(), matchers.AnyModelsPullRequest(), AnyString())).ThenReturn(tmpDir, nil)
|
||||
When(workingDir.Clone(matchers.AnyPtrToLoggingSimpleLogger(), matchers.AnyModelsRepo(), matchers.AnyModelsRepo(), matchers.AnyModelsPullRequest(), AnyString())).ThenReturn(tmpDir, false, nil)
|
||||
vcsClient := vcsmocks.NewMockClient()
|
||||
When(vcsClient.GetModifiedFiles(matchers.AnyModelsRepo(), matchers.AnyModelsPullRequest())).ThenReturn([]string{"main.tf"}, nil)
|
||||
if c.AtlantisYAML != "" {
|
||||
@@ -348,7 +348,7 @@ projects:
|
||||
defer cleanup()
|
||||
|
||||
workingDir := mocks.NewMockWorkingDir()
|
||||
When(workingDir.Clone(matchers.AnyPtrToLoggingSimpleLogger(), matchers.AnyModelsRepo(), matchers.AnyModelsRepo(), matchers.AnyModelsPullRequest(), AnyString())).ThenReturn(tmpDir, nil)
|
||||
When(workingDir.Clone(matchers.AnyPtrToLoggingSimpleLogger(), matchers.AnyModelsRepo(), matchers.AnyModelsRepo(), matchers.AnyModelsPullRequest(), AnyString())).ThenReturn(tmpDir, false, nil)
|
||||
When(workingDir.GetWorkingDir(matchers.AnyModelsRepo(), matchers.AnyModelsPullRequest(), AnyString())).ThenReturn(tmpDir, nil)
|
||||
vcsClient := vcsmocks.NewMockClient()
|
||||
When(vcsClient.GetModifiedFiles(matchers.AnyModelsRepo(), matchers.AnyModelsPullRequest())).ThenReturn([]string{"main.tf"}, nil)
|
||||
@@ -481,7 +481,7 @@ projects:
|
||||
defer cleanup()
|
||||
|
||||
workingDir := mocks.NewMockWorkingDir()
|
||||
When(workingDir.Clone(matchers.AnyPtrToLoggingSimpleLogger(), matchers.AnyModelsRepo(), matchers.AnyModelsRepo(), matchers.AnyModelsPullRequest(), AnyString())).ThenReturn(tmpDir, nil)
|
||||
When(workingDir.Clone(matchers.AnyPtrToLoggingSimpleLogger(), matchers.AnyModelsRepo(), matchers.AnyModelsRepo(), matchers.AnyModelsPullRequest(), AnyString())).ThenReturn(tmpDir, false, nil)
|
||||
When(workingDir.GetWorkingDir(matchers.AnyModelsRepo(), matchers.AnyModelsPullRequest(), AnyString())).ThenReturn(tmpDir, nil)
|
||||
vcsClient := vcsmocks.NewMockClient()
|
||||
When(vcsClient.GetModifiedFiles(matchers.AnyModelsRepo(), matchers.AnyModelsPullRequest())).ThenReturn(c.ModifiedFiles, nil)
|
||||
@@ -623,7 +623,7 @@ projects:
|
||||
matchers.AnyModelsRepo(),
|
||||
matchers.AnyModelsRepo(),
|
||||
matchers.AnyModelsPullRequest(),
|
||||
AnyString())).ThenReturn(repoDir, nil)
|
||||
AnyString())).ThenReturn(repoDir, false, nil)
|
||||
When(workingDir.GetWorkingDir(
|
||||
matchers.AnyModelsRepo(),
|
||||
matchers.AnyModelsPullRequest(),
|
||||
@@ -686,7 +686,7 @@ func TestDefaultProjectCommandBuilder_EscapeArgs(t *testing.T) {
|
||||
defer cleanup()
|
||||
|
||||
workingDir := mocks.NewMockWorkingDir()
|
||||
When(workingDir.Clone(matchers.AnyPtrToLoggingSimpleLogger(), matchers.AnyModelsRepo(), matchers.AnyModelsRepo(), matchers.AnyModelsPullRequest(), AnyString())).ThenReturn(tmpDir, nil)
|
||||
When(workingDir.Clone(matchers.AnyPtrToLoggingSimpleLogger(), matchers.AnyModelsRepo(), matchers.AnyModelsRepo(), matchers.AnyModelsPullRequest(), AnyString())).ThenReturn(tmpDir, false, nil)
|
||||
When(workingDir.GetWorkingDir(matchers.AnyModelsRepo(), matchers.AnyModelsPullRequest(), AnyString())).ThenReturn(tmpDir, nil)
|
||||
vcsClient := vcsmocks.NewMockClient()
|
||||
When(vcsClient.GetModifiedFiles(matchers.AnyModelsRepo(), matchers.AnyModelsPullRequest())).ThenReturn([]string{"main.tf"}, nil)
|
||||
@@ -848,7 +848,7 @@ projects:
|
||||
matchers.AnyModelsRepo(),
|
||||
matchers.AnyModelsRepo(),
|
||||
matchers.AnyModelsPullRequest(),
|
||||
AnyString())).ThenReturn(tmpDir, nil)
|
||||
AnyString())).ThenReturn(tmpDir, false, nil)
|
||||
|
||||
When(workingDir.GetWorkingDir(
|
||||
matchers.AnyModelsRepo(),
|
||||
|
||||
@@ -64,7 +64,7 @@ func TestDefaultProjectCommandRunner_Plan(t *testing.T) {
|
||||
matchers.AnyModelsRepo(),
|
||||
matchers.AnyModelsPullRequest(),
|
||||
AnyString(),
|
||||
)).ThenReturn(repoDir, nil)
|
||||
)).ThenReturn(repoDir, false, nil)
|
||||
When(mockLocker.TryLock(
|
||||
matchers.AnyPtrToLoggingSimpleLogger(),
|
||||
matchers.AnyModelsPullRequest(),
|
||||
@@ -376,7 +376,7 @@ func TestDefaultProjectCommandRunner_RunEnvSteps(t *testing.T) {
|
||||
matchers.AnyModelsRepo(),
|
||||
matchers.AnyModelsPullRequest(),
|
||||
AnyString(),
|
||||
)).ThenReturn(repoDir, nil)
|
||||
)).ThenReturn(repoDir, false, nil)
|
||||
When(mockLocker.TryLock(
|
||||
matchers.AnyPtrToLoggingSimpleLogger(),
|
||||
matchers.AnyModelsPullRequest(),
|
||||
|
||||
@@ -100,11 +100,11 @@ func (c *MockPullApprovedChecker_PullIsApproved_OngoingVerification) GetCaptured
|
||||
func (c *MockPullApprovedChecker_PullIsApproved_OngoingVerification) GetAllCapturedArguments() (_param0 []models.Repo, _param1 []models.PullRequest) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]models.Repo, len(params[0]))
|
||||
_param0 = make([]models.Repo, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(models.Repo)
|
||||
}
|
||||
_param1 = make([]models.PullRequest, len(params[1]))
|
||||
_param1 = make([]models.PullRequest, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(models.PullRequest)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
// Code generated by pegomock. DO NOT EDIT.
|
||||
package matchers
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"github.com/petergtz/pegomock"
|
||||
go_getter "github.com/hashicorp/go-getter"
|
||||
)
|
||||
|
||||
func AnyGoGetterClientOption() go_getter.ClientOption {
|
||||
pegomock.RegisterMatcher(pegomock.NewAnyMatcher(reflect.TypeOf((*(go_getter.ClientOption))(nil)).Elem()))
|
||||
var nullValue go_getter.ClientOption
|
||||
return nullValue
|
||||
}
|
||||
|
||||
func EqGoGetterClientOption(value go_getter.ClientOption) go_getter.ClientOption {
|
||||
pegomock.RegisterMatcher(&pegomock.EqMatcher{Value: value})
|
||||
var nullValue go_getter.ClientOption
|
||||
return nullValue
|
||||
}
|
||||
@@ -102,16 +102,16 @@ func (c *MockDownloader_GetFile_OngoingVerification) GetCapturedArguments() (str
|
||||
func (c *MockDownloader_GetFile_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 []string, _param2 [][]go_getter.ClientOption) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(params[0]))
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
_param1 = make([]string, len(params[1]))
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(string)
|
||||
}
|
||||
_param2 = make([][]go_getter.ClientOption, len(params[2]))
|
||||
for u := range params[0] {
|
||||
_param2 = make([][]go_getter.ClientOption, len(c.methodInvocations))
|
||||
for u := 0; u < len(c.methodInvocations); u++ {
|
||||
_param2[u] = make([]go_getter.ClientOption, len(params)-2)
|
||||
for x := 2; x < len(params); x++ {
|
||||
if params[x][u] != nil {
|
||||
|
||||
@@ -116,27 +116,27 @@ func (c *MockClient_RunCommandWithVersion_OngoingVerification) GetCapturedArgume
|
||||
func (c *MockClient_RunCommandWithVersion_OngoingVerification) GetAllCapturedArguments() (_param0 []*logging.SimpleLogger, _param1 []string, _param2 [][]string, _param3 []map[string]string, _param4 []*go_version.Version, _param5 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*logging.SimpleLogger, len(params[0]))
|
||||
_param0 = make([]*logging.SimpleLogger, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*logging.SimpleLogger)
|
||||
}
|
||||
_param1 = make([]string, len(params[1]))
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(string)
|
||||
}
|
||||
_param2 = make([][]string, len(params[2]))
|
||||
_param2 = make([][]string, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.([]string)
|
||||
}
|
||||
_param3 = make([]map[string]string, len(params[3]))
|
||||
_param3 = make([]map[string]string, len(c.methodInvocations))
|
||||
for u, param := range params[3] {
|
||||
_param3[u] = param.(map[string]string)
|
||||
}
|
||||
_param4 = make([]*go_version.Version, len(params[4]))
|
||||
_param4 = make([]*go_version.Version, len(c.methodInvocations))
|
||||
for u, param := range params[4] {
|
||||
_param4[u] = param.(*go_version.Version)
|
||||
}
|
||||
_param5 = make([]string, len(params[5]))
|
||||
_param5 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[5] {
|
||||
_param5[u] = param.(string)
|
||||
}
|
||||
@@ -163,11 +163,11 @@ func (c *MockClient_EnsureVersion_OngoingVerification) GetCapturedArguments() (*
|
||||
func (c *MockClient_EnsureVersion_OngoingVerification) GetAllCapturedArguments() (_param0 []*logging.SimpleLogger, _param1 []*go_version.Version) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*logging.SimpleLogger, len(params[0]))
|
||||
_param0 = make([]*logging.SimpleLogger, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*logging.SimpleLogger)
|
||||
}
|
||||
_param1 = make([]*go_version.Version, len(params[1]))
|
||||
_param1 = make([]*go_version.Version, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(*go_version.Version)
|
||||
}
|
||||
|
||||
@@ -97,11 +97,11 @@ func (c *MockSender_Send_OngoingVerification) GetCapturedArguments() (*logging.S
|
||||
func (c *MockSender_Send_OngoingVerification) GetAllCapturedArguments() (_param0 []*logging.SimpleLogger, _param1 []webhooks.ApplyResult) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*logging.SimpleLogger, len(params[0]))
|
||||
_param0 = make([]*logging.SimpleLogger, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*logging.SimpleLogger)
|
||||
}
|
||||
_param1 = make([]webhooks.ApplyResult, len(params[1]))
|
||||
_param1 = make([]webhooks.ApplyResult, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(webhooks.ApplyResult)
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ func (c *MockSlackClient_ChannelExists_OngoingVerification) GetCapturedArguments
|
||||
func (c *MockSlackClient_ChannelExists_OngoingVerification) GetAllCapturedArguments() (_param0 []string) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(params[0]))
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
@@ -206,11 +206,11 @@ func (c *MockSlackClient_PostMessage_OngoingVerification) GetCapturedArguments()
|
||||
func (c *MockSlackClient_PostMessage_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 []webhooks.ApplyResult) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(params[0]))
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
_param1 = make([]webhooks.ApplyResult, len(params[1]))
|
||||
_param1 = make([]webhooks.ApplyResult, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(webhooks.ApplyResult)
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ func (c *MockUnderlyingSlackClient_GetChannels_OngoingVerification) GetCapturedA
|
||||
func (c *MockUnderlyingSlackClient_GetChannels_OngoingVerification) GetAllCapturedArguments() (_param0 []bool) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]bool, len(params[0]))
|
||||
_param0 = make([]bool, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(bool)
|
||||
}
|
||||
@@ -186,15 +186,15 @@ func (c *MockUnderlyingSlackClient_PostMessage_OngoingVerification) GetCapturedA
|
||||
func (c *MockUnderlyingSlackClient_PostMessage_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 []string, _param2 []slack.PostMessageParameters) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(params[0]))
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
_param1 = make([]string, len(params[1]))
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(string)
|
||||
}
|
||||
_param2 = make([]slack.PostMessageParameters, len(params[2]))
|
||||
_param2 = make([]slack.PostMessageParameters, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(slack.PostMessageParameters)
|
||||
}
|
||||
|
||||
@@ -64,7 +64,10 @@ type FileWorkspace struct {
|
||||
}
|
||||
|
||||
// Clone git clones headRepo, checks out the branch and then returns the absolute
|
||||
// path to the root of the cloned repo. If the repo already exists and is at
|
||||
// path to the root of the cloned repo. It also returns
|
||||
// a boolean indicating if we should warn users that the branch we're
|
||||
// merging into has been updated since we cloned it.
|
||||
//If the repo already exists and is at
|
||||
// the right commit it does nothing. This is to support running commands in
|
||||
// multiple dirs of the same repo without deleting existing plans.
|
||||
func (w *FileWorkspace) Clone(
|
||||
|
||||
@@ -185,12 +185,12 @@ func (c *MockSimpleLogging_Debug_OngoingVerification) GetCapturedArguments() (st
|
||||
func (c *MockSimpleLogging_Debug_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 [][]interface{}) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(params[0]))
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
_param1 = make([][]interface{}, len(params[1]))
|
||||
for u := range params[0] {
|
||||
_param1 = make([][]interface{}, len(c.methodInvocations))
|
||||
for u := 0; u < len(c.methodInvocations); u++ {
|
||||
_param1[u] = make([]interface{}, len(params)-1)
|
||||
for x := 1; x < len(params); x++ {
|
||||
if params[x][u] != nil {
|
||||
@@ -224,12 +224,12 @@ func (c *MockSimpleLogging_Info_OngoingVerification) GetCapturedArguments() (str
|
||||
func (c *MockSimpleLogging_Info_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 [][]interface{}) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(params[0]))
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
_param1 = make([][]interface{}, len(params[1]))
|
||||
for u := range params[0] {
|
||||
_param1 = make([][]interface{}, len(c.methodInvocations))
|
||||
for u := 0; u < len(c.methodInvocations); u++ {
|
||||
_param1[u] = make([]interface{}, len(params)-1)
|
||||
for x := 1; x < len(params); x++ {
|
||||
if params[x][u] != nil {
|
||||
@@ -263,12 +263,12 @@ func (c *MockSimpleLogging_Warn_OngoingVerification) GetCapturedArguments() (str
|
||||
func (c *MockSimpleLogging_Warn_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 [][]interface{}) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(params[0]))
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
_param1 = make([][]interface{}, len(params[1]))
|
||||
for u := range params[0] {
|
||||
_param1 = make([][]interface{}, len(c.methodInvocations))
|
||||
for u := 0; u < len(c.methodInvocations); u++ {
|
||||
_param1[u] = make([]interface{}, len(params)-1)
|
||||
for x := 1; x < len(params); x++ {
|
||||
if params[x][u] != nil {
|
||||
@@ -302,12 +302,12 @@ func (c *MockSimpleLogging_Err_OngoingVerification) GetCapturedArguments() (stri
|
||||
func (c *MockSimpleLogging_Err_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 [][]interface{}) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(params[0]))
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
_param1 = make([][]interface{}, len(params[1]))
|
||||
for u := range params[0] {
|
||||
_param1 = make([][]interface{}, len(c.methodInvocations))
|
||||
for u := 0; u < len(c.methodInvocations); u++ {
|
||||
_param1[u] = make([]interface{}, len(params)-1)
|
||||
for x := 1; x < len(params); x++ {
|
||||
if params[x][u] != nil {
|
||||
@@ -341,16 +341,16 @@ func (c *MockSimpleLogging_Log_OngoingVerification) GetCapturedArguments() (logg
|
||||
func (c *MockSimpleLogging_Log_OngoingVerification) GetAllCapturedArguments() (_param0 []logging.LogLevel, _param1 []string, _param2 [][]interface{}) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]logging.LogLevel, len(params[0]))
|
||||
_param0 = make([]logging.LogLevel, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(logging.LogLevel)
|
||||
}
|
||||
_param1 = make([]string, len(params[1]))
|
||||
_param1 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(string)
|
||||
}
|
||||
_param2 = make([][]interface{}, len(params[2]))
|
||||
for u := range params[0] {
|
||||
_param2 = make([][]interface{}, len(c.methodInvocations))
|
||||
for u := 0; u < len(c.methodInvocations); u++ {
|
||||
_param2[u] = make([]interface{}, len(params)-2)
|
||||
for x := 2; x < len(params); x++ {
|
||||
if params[x][u] != nil {
|
||||
@@ -415,15 +415,15 @@ func (c *MockSimpleLogging_NewLogger_OngoingVerification) GetCapturedArguments()
|
||||
func (c *MockSimpleLogging_NewLogger_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 []bool, _param2 []logging.LogLevel) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]string, len(params[0]))
|
||||
_param0 = make([]string, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(string)
|
||||
}
|
||||
_param1 = make([]bool, len(params[1]))
|
||||
_param1 = make([]bool, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(bool)
|
||||
}
|
||||
_param2 = make([]logging.LogLevel, len(params[2]))
|
||||
_param2 = make([]logging.LogLevel, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.(logging.LogLevel)
|
||||
}
|
||||
|
||||
@@ -100,15 +100,15 @@ func (c *MockAzureDevopsRequestValidator_Validate_OngoingVerification) GetCaptur
|
||||
func (c *MockAzureDevopsRequestValidator_Validate_OngoingVerification) GetAllCapturedArguments() (_param0 []*http.Request, _param1 [][]byte, _param2 [][]byte) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*http.Request, len(params[0]))
|
||||
_param0 = make([]*http.Request, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*http.Request)
|
||||
}
|
||||
_param1 = make([][]byte, len(params[1]))
|
||||
_param1 = make([][]byte, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.([]byte)
|
||||
}
|
||||
_param2 = make([][]byte, len(params[2]))
|
||||
_param2 = make([][]byte, len(c.methodInvocations))
|
||||
for u, param := range params[2] {
|
||||
_param2[u] = param.([]byte)
|
||||
}
|
||||
|
||||
@@ -100,11 +100,11 @@ func (c *MockGithubRequestValidator_Validate_OngoingVerification) GetCapturedArg
|
||||
func (c *MockGithubRequestValidator_Validate_OngoingVerification) GetAllCapturedArguments() (_param0 []*http.Request, _param1 [][]byte) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*http.Request, len(params[0]))
|
||||
_param0 = make([]*http.Request, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*http.Request)
|
||||
}
|
||||
_param1 = make([][]byte, len(params[1]))
|
||||
_param1 = make([][]byte, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.([]byte)
|
||||
}
|
||||
|
||||
@@ -100,11 +100,11 @@ func (c *MockGitlabRequestParserValidator_ParseAndValidate_OngoingVerification)
|
||||
func (c *MockGitlabRequestParserValidator_ParseAndValidate_OngoingVerification) GetAllCapturedArguments() (_param0 []*http.Request, _param1 [][]byte) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]*http.Request, len(params[0]))
|
||||
_param0 = make([]*http.Request, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(*http.Request)
|
||||
}
|
||||
_param1 = make([][]byte, len(params[1]))
|
||||
_param1 = make([][]byte, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.([]byte)
|
||||
}
|
||||
|
||||
@@ -96,11 +96,11 @@ func (c *MockTemplateWriter_Execute_OngoingVerification) GetCapturedArguments()
|
||||
func (c *MockTemplateWriter_Execute_OngoingVerification) GetAllCapturedArguments() (_param0 []io.Writer, _param1 []interface{}) {
|
||||
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
|
||||
if len(params) > 0 {
|
||||
_param0 = make([]io.Writer, len(params[0]))
|
||||
_param0 = make([]io.Writer, len(c.methodInvocations))
|
||||
for u, param := range params[0] {
|
||||
_param0[u] = param.(io.Writer)
|
||||
}
|
||||
_param1 = make([]interface{}, len(params[1]))
|
||||
_param1 = make([]interface{}, len(c.methodInvocations))
|
||||
for u, param := range params[1] {
|
||||
_param1[u] = param.(interface{})
|
||||
}
|
||||
|
||||
2
vendor/github.com/hashicorp/go-getter/go.mod
generated
vendored
2
vendor/github.com/hashicorp/go-getter/go.mod
generated
vendored
@@ -1,5 +1,7 @@
|
||||
module github.com/hashicorp/go-getter
|
||||
|
||||
go 1.14
|
||||
|
||||
require (
|
||||
cloud.google.com/go v0.45.1
|
||||
github.com/aws/aws-sdk-go v1.15.78
|
||||
|
||||
2
vendor/github.com/sirupsen/logrus/go.mod
generated
vendored
2
vendor/github.com/sirupsen/logrus/go.mod
generated
vendored
@@ -1,5 +1,7 @@
|
||||
module github.com/sirupsen/logrus
|
||||
|
||||
go 1.14
|
||||
|
||||
require (
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1
|
||||
|
||||
Reference in New Issue
Block a user