From fc52955b077b2b9486c8834d2dd7576aa664db51 Mon Sep 17 00:00:00 2001 From: Eric Fritz Date: Mon, 27 Jun 2022 15:59:16 -0500 Subject: [PATCH] mocks: Reorganize mock definitions into multiple files (#36967) --- .../internal/auth/userpasswd/mocks_temp.go | 2 +- cmd/symbols/fetcher/mocks_test.go | 2 +- cmd/symbols/internal/api/mocks_test.go | 2 +- dev/team/mocks_temp.go | 2 +- .../cmd/prom-wrapper/mocks/mocks_temp.go | 2 +- .../executor/internal/command/mocks_test.go | 2 +- .../executor/internal/worker/mocks_test.go | 2 +- .../cmd/frontend/internal/app/mocks_test.go | 2 +- .../internal/codeintel/httpapi/mocks_test.go | 2 +- .../codeintel/resolvers/mocks/mocks_temp.go | 2 +- .../codeintel/resolvers/mocks_test.go | 2 +- .../executorqueue/handler/mocks_test.go | 2 +- .../queues/batches/mocks_test.go | 2 +- .../registry/stores/dbmocks/mocks_temp.go | 2 +- .../internal/worker/mocks_test.go | 2 +- .../internal/codeintel/indexing/mocks_test.go | 2 +- .../internal/codeintel/janitor/mocks_test.go | 2 +- .../internal/batches/reconciler/mocks_test.go | 2 +- .../internal/batches/sources/mocks_test.go | 2 +- .../internal/batches/syncer/mocks_test.go | 2 +- enterprise/internal/database/mocks_temp.go | 2 +- .../insights/background/mocks_temp.go | 2 +- .../insights/compression/mocks_temp.go | 2 +- .../internal/insights/discovery/mocks_temp.go | 2 +- .../internal/insights/store/mocks_temp.go | 2 +- gen.go | 2 +- go.mod | 2 +- go.sum | 2 + internal/authz/mocks_temp.go | 2 +- .../background/scheduler/mocks_test.go | 2 +- .../internal/inference/mocks_test.go | 2 +- internal/codeintel/autoindexing/mocks_test.go | 2 +- .../internal/lockfiles/mocks_test.go | 2 +- internal/codeintel/dependencies/mocks_test.go | 2 +- internal/codeintel/documents/mocks_test.go | 2 +- .../background/repomatcher/mocks_test.go | 2 +- .../policies/enterprise/mocks_test.go | 2 +- internal/codeintel/policies/mocks_test.go | 2 +- .../stores/dbstore/migration/mocks_test.go | 2 +- internal/codeintel/symbols/mocks_test.go | 2 +- .../uploads/background/cleanup/mocks_test.go | 2 +- .../background/commitgraph/mocks_test.go | 2 +- .../background/expiration/mocks_test.go | 2 +- internal/codeintel/uploads/mocks_test.go | 2 +- .../database/migration/runner/mocks_test.go | 2 +- internal/database/mocks_temp.go | 2 +- internal/featureflag/mocks_test.go | 2 +- internal/gitserver/mocks_temp.go | 2 +- internal/goroutine/mocks_test.go | 2 +- internal/insights/mocks_temp.go | 2 +- internal/oobmigration/mocks_test.go | 2 +- internal/repos/mocks_temp.go | 2 +- internal/search/client/mocks_temp.go | 2 +- internal/search/job/mockjob/mocks_temp.go | 2 +- internal/uploadstore/mocks/mocks_temp.go | 2 +- internal/uploadstore/mocks_test.go | 2 +- .../dbworker/store/mocks/mocks_temp.go | 2 +- internal/workerutil/mocks_test.go | 2 +- mockgen.temp.yaml | 113 ++++++ mockgen.test.yaml | 219 +++++++++++ mockgen.yaml | 371 ++---------------- 61 files changed, 413 insertions(+), 406 deletions(-) create mode 100644 mockgen.temp.yaml create mode 100644 mockgen.test.yaml diff --git a/cmd/frontend/internal/auth/userpasswd/mocks_temp.go b/cmd/frontend/internal/auth/userpasswd/mocks_temp.go index 5a0570200d7..d2ee4ad7084 100644 --- a/cmd/frontend/internal/auth/userpasswd/mocks_temp.go +++ b/cmd/frontend/internal/auth/userpasswd/mocks_temp.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/cmd/symbols/fetcher/mocks_test.go b/cmd/symbols/fetcher/mocks_test.go index 75d487dd5f8..5118b6a9709 100644 --- a/cmd/symbols/fetcher/mocks_test.go +++ b/cmd/symbols/fetcher/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/cmd/symbols/internal/api/mocks_test.go b/cmd/symbols/internal/api/mocks_test.go index 38a98e98b69..05b95769f71 100644 --- a/cmd/symbols/internal/api/mocks_test.go +++ b/cmd/symbols/internal/api/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/dev/team/mocks_temp.go b/dev/team/mocks_temp.go index 7e917ee231b..e68567c6af0 100644 --- a/dev/team/mocks_temp.go +++ b/dev/team/mocks_temp.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/docker-images/prometheus/cmd/prom-wrapper/mocks/mocks_temp.go b/docker-images/prometheus/cmd/prom-wrapper/mocks/mocks_temp.go index 5a6e388ccb7..0042d7352bd 100644 --- a/docker-images/prometheus/cmd/prom-wrapper/mocks/mocks_temp.go +++ b/docker-images/prometheus/cmd/prom-wrapper/mocks/mocks_temp.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/enterprise/cmd/executor/internal/command/mocks_test.go b/enterprise/cmd/executor/internal/command/mocks_test.go index 544e5369c7e..34c721223b9 100644 --- a/enterprise/cmd/executor/internal/command/mocks_test.go +++ b/enterprise/cmd/executor/internal/command/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/enterprise/cmd/executor/internal/worker/mocks_test.go b/enterprise/cmd/executor/internal/worker/mocks_test.go index 7ad0ba920b3..763370a3531 100644 --- a/enterprise/cmd/executor/internal/worker/mocks_test.go +++ b/enterprise/cmd/executor/internal/worker/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/enterprise/cmd/frontend/internal/app/mocks_test.go b/enterprise/cmd/frontend/internal/app/mocks_test.go index 023c6a479a3..3d7e24228c3 100644 --- a/enterprise/cmd/frontend/internal/app/mocks_test.go +++ b/enterprise/cmd/frontend/internal/app/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/enterprise/cmd/frontend/internal/codeintel/httpapi/mocks_test.go b/enterprise/cmd/frontend/internal/codeintel/httpapi/mocks_test.go index ded8e278993..e5856b7d39e 100644 --- a/enterprise/cmd/frontend/internal/codeintel/httpapi/mocks_test.go +++ b/enterprise/cmd/frontend/internal/codeintel/httpapi/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/enterprise/cmd/frontend/internal/codeintel/resolvers/mocks/mocks_temp.go b/enterprise/cmd/frontend/internal/codeintel/resolvers/mocks/mocks_temp.go index 518d8ae9fc3..3d8918f40bf 100644 --- a/enterprise/cmd/frontend/internal/codeintel/resolvers/mocks/mocks_temp.go +++ b/enterprise/cmd/frontend/internal/codeintel/resolvers/mocks/mocks_temp.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/enterprise/cmd/frontend/internal/codeintel/resolvers/mocks_test.go b/enterprise/cmd/frontend/internal/codeintel/resolvers/mocks_test.go index f7bd4755ec1..75f60135b88 100644 --- a/enterprise/cmd/frontend/internal/codeintel/resolvers/mocks_test.go +++ b/enterprise/cmd/frontend/internal/codeintel/resolvers/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/enterprise/cmd/frontend/internal/executorqueue/handler/mocks_test.go b/enterprise/cmd/frontend/internal/executorqueue/handler/mocks_test.go index 1f3baf711fd..a16e8d4bc64 100644 --- a/enterprise/cmd/frontend/internal/executorqueue/handler/mocks_test.go +++ b/enterprise/cmd/frontend/internal/executorqueue/handler/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/enterprise/cmd/frontend/internal/executorqueue/queues/batches/mocks_test.go b/enterprise/cmd/frontend/internal/executorqueue/queues/batches/mocks_test.go index 5f8dd936f93..86b7f07a125 100644 --- a/enterprise/cmd/frontend/internal/executorqueue/queues/batches/mocks_test.go +++ b/enterprise/cmd/frontend/internal/executorqueue/queues/batches/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/enterprise/cmd/frontend/internal/registry/stores/dbmocks/mocks_temp.go b/enterprise/cmd/frontend/internal/registry/stores/dbmocks/mocks_temp.go index e1d5a66179b..4c48b150fb0 100644 --- a/enterprise/cmd/frontend/internal/registry/stores/dbmocks/mocks_temp.go +++ b/enterprise/cmd/frontend/internal/registry/stores/dbmocks/mocks_temp.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/enterprise/cmd/precise-code-intel-worker/internal/worker/mocks_test.go b/enterprise/cmd/precise-code-intel-worker/internal/worker/mocks_test.go index 340f480a047..fe4b6b83af4 100644 --- a/enterprise/cmd/precise-code-intel-worker/internal/worker/mocks_test.go +++ b/enterprise/cmd/precise-code-intel-worker/internal/worker/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/enterprise/cmd/worker/internal/codeintel/indexing/mocks_test.go b/enterprise/cmd/worker/internal/codeintel/indexing/mocks_test.go index d63ba7eff62..ce03c7e35ea 100644 --- a/enterprise/cmd/worker/internal/codeintel/indexing/mocks_test.go +++ b/enterprise/cmd/worker/internal/codeintel/indexing/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/enterprise/cmd/worker/internal/codeintel/janitor/mocks_test.go b/enterprise/cmd/worker/internal/codeintel/janitor/mocks_test.go index 9faf63af2ce..1d47fea2830 100644 --- a/enterprise/cmd/worker/internal/codeintel/janitor/mocks_test.go +++ b/enterprise/cmd/worker/internal/codeintel/janitor/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/enterprise/internal/batches/reconciler/mocks_test.go b/enterprise/internal/batches/reconciler/mocks_test.go index e7edfdf6551..67e46e4054d 100644 --- a/enterprise/internal/batches/reconciler/mocks_test.go +++ b/enterprise/internal/batches/reconciler/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/enterprise/internal/batches/sources/mocks_test.go b/enterprise/internal/batches/sources/mocks_test.go index 9d5f084ee33..3b8d55491c1 100644 --- a/enterprise/internal/batches/sources/mocks_test.go +++ b/enterprise/internal/batches/sources/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/enterprise/internal/batches/syncer/mocks_test.go b/enterprise/internal/batches/syncer/mocks_test.go index 5fd3f79a915..cdd1faf3e97 100644 --- a/enterprise/internal/batches/syncer/mocks_test.go +++ b/enterprise/internal/batches/syncer/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/enterprise/internal/database/mocks_temp.go b/enterprise/internal/database/mocks_temp.go index 25c3c07dd25..93d3682ff47 100644 --- a/enterprise/internal/database/mocks_temp.go +++ b/enterprise/internal/database/mocks_temp.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/enterprise/internal/insights/background/mocks_temp.go b/enterprise/internal/insights/background/mocks_temp.go index 9a9bfbf46c7..190ec39f514 100644 --- a/enterprise/internal/insights/background/mocks_temp.go +++ b/enterprise/internal/insights/background/mocks_temp.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/enterprise/internal/insights/compression/mocks_temp.go b/enterprise/internal/insights/compression/mocks_temp.go index 14bb6a1f2df..2bd79741157 100644 --- a/enterprise/internal/insights/compression/mocks_temp.go +++ b/enterprise/internal/insights/compression/mocks_temp.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/enterprise/internal/insights/discovery/mocks_temp.go b/enterprise/internal/insights/discovery/mocks_temp.go index 0e82465795d..1122fee3470 100644 --- a/enterprise/internal/insights/discovery/mocks_temp.go +++ b/enterprise/internal/insights/discovery/mocks_temp.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/enterprise/internal/insights/store/mocks_temp.go b/enterprise/internal/insights/store/mocks_temp.go index 1d1c27c61e8..524ba7e48a0 100644 --- a/enterprise/internal/insights/store/mocks_temp.go +++ b/enterprise/internal/insights/store/mocks_temp.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/gen.go b/gen.go index 4dfb4056b94..89c91beb56e 100644 --- a/gen.go +++ b/gen.go @@ -2,4 +2,4 @@ package sourcegraph // Keep these versions in sync with go.mod //go:generate env GOBIN=$PWD/.bin GO111MODULE=on go install golang.org/x/tools/cmd/goimports@v0.1.10 -//go:generate go run github.com/derision-test/go-mockgen/cmd/go-mockgen@v1.3.2 +//go:generate go run github.com/derision-test/go-mockgen/cmd/go-mockgen@v1.3.3 diff --git a/go.mod b/go.mod index 238bf79cd8f..5ad239d32b2 100644 --- a/go.mod +++ b/go.mod @@ -36,7 +36,7 @@ require ( github.com/davecgh/go-spew v1.1.1 github.com/daviddengcn/go-colortext v1.0.0 github.com/derision-test/glock v1.0.0 - github.com/derision-test/go-mockgen v1.3.2 + github.com/derision-test/go-mockgen v1.3.3 github.com/dghubble/gologin v2.2.0+incompatible github.com/dgraph-io/ristretto v0.1.0 github.com/dineshappavoo/basex v0.0.0-20170425072625-481a6f6dc663 diff --git a/go.sum b/go.sum index 820f1632031..4c52130d341 100644 --- a/go.sum +++ b/go.sum @@ -629,6 +629,8 @@ github.com/derision-test/glock v1.0.0 h1:b6sViZG+Cm6QtdpqbfWEjaBVbzNPntIS4GzsxpS github.com/derision-test/glock v1.0.0/go.mod h1:jKtLdBMrF+XQatqvg46wiWdDfDSSDjdhO4dOM2FX9H4= github.com/derision-test/go-mockgen v1.3.2 h1:wFndNkm+IjLMdk8P+q6Bi6rWuiB5CoWP06BSBmoGVPM= github.com/derision-test/go-mockgen v1.3.2/go.mod h1:/TXUePlhtHmDDCaDAi/a4g6xOHqMDz3Wf0r2NPGskB4= +github.com/derision-test/go-mockgen v1.3.3 h1:TyCowqp/S9J3Tvv+ZCnsIDwVW5flJEMFZlNNMfjSLNM= +github.com/derision-test/go-mockgen v1.3.3/go.mod h1:/TXUePlhtHmDDCaDAi/a4g6xOHqMDz3Wf0r2NPGskB4= github.com/devigned/tab v0.1.1/go.mod h1:XG9mPq0dFghrYvoBF3xdRrJzSTX1b7IQrvaL9mzjeJY= github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= github.com/dgraph-io/ristretto v0.1.0 h1:Jv3CGQHp9OjuMBSne1485aDpUkTKEcUqF+jm/LuerPI= diff --git a/internal/authz/mocks_temp.go b/internal/authz/mocks_temp.go index f5870893ce6..eee6958a509 100644 --- a/internal/authz/mocks_temp.go +++ b/internal/authz/mocks_temp.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/internal/codeintel/autoindexing/background/scheduler/mocks_test.go b/internal/codeintel/autoindexing/background/scheduler/mocks_test.go index 06b2690d67d..bf05a7c79ed 100644 --- a/internal/codeintel/autoindexing/background/scheduler/mocks_test.go +++ b/internal/codeintel/autoindexing/background/scheduler/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/internal/codeintel/autoindexing/internal/inference/mocks_test.go b/internal/codeintel/autoindexing/internal/inference/mocks_test.go index 4733e419939..e6cb6a05d10 100644 --- a/internal/codeintel/autoindexing/internal/inference/mocks_test.go +++ b/internal/codeintel/autoindexing/internal/inference/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/internal/codeintel/autoindexing/mocks_test.go b/internal/codeintel/autoindexing/mocks_test.go index ef8c5413709..4a6f861007a 100644 --- a/internal/codeintel/autoindexing/mocks_test.go +++ b/internal/codeintel/autoindexing/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/internal/codeintel/dependencies/internal/lockfiles/mocks_test.go b/internal/codeintel/dependencies/internal/lockfiles/mocks_test.go index 8008fe10b46..2c5da52f88e 100644 --- a/internal/codeintel/dependencies/internal/lockfiles/mocks_test.go +++ b/internal/codeintel/dependencies/internal/lockfiles/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/internal/codeintel/dependencies/mocks_test.go b/internal/codeintel/dependencies/mocks_test.go index 2f70b8f7057..fe02f773979 100644 --- a/internal/codeintel/dependencies/mocks_test.go +++ b/internal/codeintel/dependencies/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/internal/codeintel/documents/mocks_test.go b/internal/codeintel/documents/mocks_test.go index 87f73ece5c5..c130c48b740 100644 --- a/internal/codeintel/documents/mocks_test.go +++ b/internal/codeintel/documents/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/internal/codeintel/policies/background/repomatcher/mocks_test.go b/internal/codeintel/policies/background/repomatcher/mocks_test.go index 350d63ba52d..f46c89a1b53 100644 --- a/internal/codeintel/policies/background/repomatcher/mocks_test.go +++ b/internal/codeintel/policies/background/repomatcher/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/internal/codeintel/policies/enterprise/mocks_test.go b/internal/codeintel/policies/enterprise/mocks_test.go index 68ead186e81..080c59dc399 100644 --- a/internal/codeintel/policies/enterprise/mocks_test.go +++ b/internal/codeintel/policies/enterprise/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/internal/codeintel/policies/mocks_test.go b/internal/codeintel/policies/mocks_test.go index d30a1dc38b7..e39c8e4d4ae 100644 --- a/internal/codeintel/policies/mocks_test.go +++ b/internal/codeintel/policies/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/internal/codeintel/stores/dbstore/migration/mocks_test.go b/internal/codeintel/stores/dbstore/migration/mocks_test.go index c12d7ba3eb5..ebe6c7b2f4c 100644 --- a/internal/codeintel/stores/dbstore/migration/mocks_test.go +++ b/internal/codeintel/stores/dbstore/migration/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/internal/codeintel/symbols/mocks_test.go b/internal/codeintel/symbols/mocks_test.go index f1adeea860c..1ab8c22303a 100644 --- a/internal/codeintel/symbols/mocks_test.go +++ b/internal/codeintel/symbols/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/internal/codeintel/uploads/background/cleanup/mocks_test.go b/internal/codeintel/uploads/background/cleanup/mocks_test.go index e05152d8333..bb53651a407 100644 --- a/internal/codeintel/uploads/background/cleanup/mocks_test.go +++ b/internal/codeintel/uploads/background/cleanup/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/internal/codeintel/uploads/background/commitgraph/mocks_test.go b/internal/codeintel/uploads/background/commitgraph/mocks_test.go index 8034b874893..6912e649fc9 100644 --- a/internal/codeintel/uploads/background/commitgraph/mocks_test.go +++ b/internal/codeintel/uploads/background/commitgraph/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/internal/codeintel/uploads/background/expiration/mocks_test.go b/internal/codeintel/uploads/background/expiration/mocks_test.go index fee1930bd68..443af2845ee 100644 --- a/internal/codeintel/uploads/background/expiration/mocks_test.go +++ b/internal/codeintel/uploads/background/expiration/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/internal/codeintel/uploads/mocks_test.go b/internal/codeintel/uploads/mocks_test.go index 0f3910c8e82..b323668b3a6 100644 --- a/internal/codeintel/uploads/mocks_test.go +++ b/internal/codeintel/uploads/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/internal/database/migration/runner/mocks_test.go b/internal/database/migration/runner/mocks_test.go index 3461fe47a9e..89dc50b9fbb 100644 --- a/internal/database/migration/runner/mocks_test.go +++ b/internal/database/migration/runner/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/internal/database/mocks_temp.go b/internal/database/mocks_temp.go index 2494ca79c74..42d8a6beac2 100644 --- a/internal/database/mocks_temp.go +++ b/internal/database/mocks_temp.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/internal/featureflag/mocks_test.go b/internal/featureflag/mocks_test.go index 492b48a07dd..9e4b497c51d 100644 --- a/internal/featureflag/mocks_test.go +++ b/internal/featureflag/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/internal/gitserver/mocks_temp.go b/internal/gitserver/mocks_temp.go index 9a8ec139cc0..41344e828d3 100644 --- a/internal/gitserver/mocks_temp.go +++ b/internal/gitserver/mocks_temp.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/internal/goroutine/mocks_test.go b/internal/goroutine/mocks_test.go index 141b9183993..68604e6429a 100644 --- a/internal/goroutine/mocks_test.go +++ b/internal/goroutine/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/internal/insights/mocks_temp.go b/internal/insights/mocks_temp.go index d9fd6a59818..25a210a3109 100644 --- a/internal/insights/mocks_temp.go +++ b/internal/insights/mocks_temp.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/internal/oobmigration/mocks_test.go b/internal/oobmigration/mocks_test.go index ae769d4f5c6..359fe8fdcac 100644 --- a/internal/oobmigration/mocks_test.go +++ b/internal/oobmigration/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/internal/repos/mocks_temp.go b/internal/repos/mocks_temp.go index cb02e7209d7..b93d8cf45ea 100644 --- a/internal/repos/mocks_temp.go +++ b/internal/repos/mocks_temp.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/internal/search/client/mocks_temp.go b/internal/search/client/mocks_temp.go index 388661bd6e2..b38b7d61bb5 100644 --- a/internal/search/client/mocks_temp.go +++ b/internal/search/client/mocks_temp.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/internal/search/job/mockjob/mocks_temp.go b/internal/search/job/mockjob/mocks_temp.go index 455bbf8cbad..ba4ee133aae 100644 --- a/internal/search/job/mockjob/mocks_temp.go +++ b/internal/search/job/mockjob/mocks_temp.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/internal/uploadstore/mocks/mocks_temp.go b/internal/uploadstore/mocks/mocks_temp.go index 66648c032cf..89391726f96 100644 --- a/internal/uploadstore/mocks/mocks_temp.go +++ b/internal/uploadstore/mocks/mocks_temp.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/internal/uploadstore/mocks_test.go b/internal/uploadstore/mocks_test.go index 33b3776e333..9783894a8bd 100644 --- a/internal/uploadstore/mocks_test.go +++ b/internal/uploadstore/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/internal/workerutil/dbworker/store/mocks/mocks_temp.go b/internal/workerutil/dbworker/store/mocks/mocks_temp.go index 7371f464528..5f28c897fde 100644 --- a/internal/workerutil/dbworker/store/mocks/mocks_temp.go +++ b/internal/workerutil/dbworker/store/mocks/mocks_temp.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/internal/workerutil/mocks_test.go b/internal/workerutil/mocks_test.go index 5e888ed1c65..73fb76311eb 100644 --- a/internal/workerutil/mocks_test.go +++ b/internal/workerutil/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.2; DO NOT EDIT. +// Code generated by go-mockgen 1.3.3; DO NOT EDIT. // // This file was generated by running `sg generate` (or `go-mockgen`) at the root of // this repository. To add additional mocks to this or another package, add a new entry diff --git a/mockgen.temp.yaml b/mockgen.temp.yaml new file mode 100644 index 00000000000..b7c2c2e3951 --- /dev/null +++ b/mockgen.temp.yaml @@ -0,0 +1,113 @@ +- filename: cmd/frontend/internal/auth/userpasswd/mocks_temp.go + path: github.com/sourcegraph/sourcegraph/cmd/frontend/internal/auth/userpasswd + interfaces: + - LockoutStore +- filename: dev/team/mocks_temp.go + path: github.com/sourcegraph/sourcegraph/dev/team + interfaces: + - TeammateResolver +- filename: docker-images/prometheus/cmd/prom-wrapper/mocks/mocks_temp.go + path: github.com/prometheus/client_golang/api/prometheus/v1 + interfaces: + - API +- filename: enterprise/cmd/frontend/internal/codeintel/resolvers/mocks/mocks_temp.go + path: github.com/sourcegraph/sourcegraph/enterprise/cmd/frontend/internal/codeintel/resolvers + interfaces: + - QueryResolver + - Resolver +- filename: enterprise/cmd/frontend/internal/registry/stores/dbmocks/mocks_temp.go + path: github.com/sourcegraph/sourcegraph/enterprise/cmd/frontend/internal/registry/stores + interfaces: + - ExtensionStore + - ReleaseStore +- filename: enterprise/internal/database/mocks_temp.go + path: github.com/sourcegraph/sourcegraph/enterprise/internal/database + interfaces: + - CodeMonitorStore + - EnterpriseDB + - PermsStore +- filename: enterprise/internal/insights/background/mocks_temp.go + path: github.com/sourcegraph/sourcegraph/enterprise/internal/insights/background + interfaces: + - RepoStore +- filename: enterprise/internal/insights/compression/mocks_temp.go + path: github.com/sourcegraph/sourcegraph/enterprise/internal/insights/compression + interfaces: + - CommitStore +- filename: enterprise/internal/insights/discovery/mocks_temp.go + path: github.com/sourcegraph/sourcegraph/enterprise/internal/insights/discovery + interfaces: + - IndexableReposLister + - RepoStore + - SettingStore +- filename: enterprise/internal/insights/store/mocks_temp.go + path: github.com/sourcegraph/sourcegraph/enterprise/internal/insights/store + interfaces: + - DataSeriesStore + - InsightMetadataStore + - Interface +- filename: internal/authz/mocks_temp.go + path: github.com/sourcegraph/sourcegraph/internal/authz + interfaces: + - SubRepoPermissionChecker + - SubRepoPermissionsGetter +- filename: internal/database/mocks_temp.go + path: github.com/sourcegraph/sourcegraph/internal/database + interfaces: + - AccessTokenStore + - AuthzStore + - BitbucketProjectPermissionsStore + - ConfStore + - DB + - EventLogStore + - ExternalServiceStore + - FeatureFlagStore + - GitserverLocalCloneStore + - GitserverRepoStore + - GlobalStateStore + - NamespaceStore + - OrgInvitationStore + - OrgMemberStore + - OrgStore + - PhabricatorStore + - RepoStore + - SavedSearchStore + - SearchContextsStore + - SecurityEventLogsStore + - SettingsStore + - SubRepoPermsStore + - TemporarySettingsStore + - UserCredentialsStore + - UserEmailsStore + - UserExternalAccountsStore + - UserPublicRepoStore + - UserStore + - WebhookLogStore +- filename: internal/gitserver/mocks_temp.go + path: github.com/sourcegraph/sourcegraph/internal/gitserver + interfaces: + - Client +- filename: internal/insights/mocks_temp.go + path: github.com/sourcegraph/sourcegraph/internal/insights + interfaces: + - Loader +- filename: internal/repos/mocks_temp.go + path: github.com/sourcegraph/sourcegraph/internal/repos + interfaces: + - Store +- filename: internal/search/client/mocks_temp.go + path: github.com/sourcegraph/sourcegraph/internal/search/client + interfaces: + - SearchClient +- filename: internal/search/job/mockjob/mocks_temp.go + path: github.com/sourcegraph/sourcegraph/internal/search/job + interfaces: + - Job +- filename: internal/uploadstore/mocks/mocks_temp.go + path: github.com/sourcegraph/sourcegraph/internal/uploadstore + interfaces: + - Store +- filename: internal/workerutil/dbworker/store/mocks/mocks_temp.go + path: github.com/sourcegraph/sourcegraph/internal/workerutil/dbworker/store + interfaces: + - Store diff --git a/mockgen.test.yaml b/mockgen.test.yaml new file mode 100644 index 00000000000..506c98db988 --- /dev/null +++ b/mockgen.test.yaml @@ -0,0 +1,219 @@ +- filename: cmd/symbols/fetcher/mocks_test.go + path: github.com/sourcegraph/sourcegraph/cmd/symbols/gitserver + interfaces: + - GitServerClient +- filename: cmd/symbols/internal/api/mocks_test.go + path: github.com/sourcegraph/sourcegraph/cmd/symbols/gitserver + interfaces: + - GitServerClient +- filename: enterprise/cmd/executor/internal/command/mocks_test.go + path: github.com/sourcegraph/sourcegraph/enterprise/cmd/executor/internal/command + interfaces: + - ExecutionLogEntryStore + - Logger + - LogEntry + - commandRunner +- filename: enterprise/cmd/executor/internal/worker/mocks_test.go + sources: + - path: github.com/sourcegraph/sourcegraph/enterprise/cmd/executor/internal/command + interfaces: + - Runner + - path: github.com/sourcegraph/sourcegraph/internal/workerutil + interfaces: + - Store +- filename: enterprise/cmd/frontend/internal/app/mocks_test.go + path: github.com/sourcegraph/sourcegraph/enterprise/cmd/frontend/internal/app + interfaces: + - githubClient +- filename: enterprise/cmd/frontend/internal/codeintel/httpapi/mocks_test.go + path: github.com/sourcegraph/sourcegraph/enterprise/cmd/frontend/internal/codeintel/httpapi + interfaces: + - DBStore + - GitHubClient +- filename: enterprise/cmd/frontend/internal/codeintel/resolvers/mocks_test.go + path: github.com/sourcegraph/sourcegraph/enterprise/cmd/frontend/internal/codeintel/resolvers + interfaces: + - DBStore + - EnqueuerDBStore + - EnqueuerGitserverClient + - GitserverClient + - IndexEnqueuer + - LSIFStore + - PositionAdjuster + - RepoUpdaterClient +- filename: enterprise/cmd/frontend/internal/executorqueue/handler/mocks_test.go + path: github.com/sourcegraph/sourcegraph/internal/services/executors/store + interfaces: + - Store +- filename: enterprise/cmd/frontend/internal/executorqueue/queues/batches/mocks_test.go + path: github.com/sourcegraph/sourcegraph/enterprise/cmd/frontend/internal/executorqueue/queues/batches + interfaces: + - BatchesStore +- filename: enterprise/cmd/precise-code-intel-worker/internal/worker/mocks_test.go + sources: + - path: github.com/sourcegraph/sourcegraph/enterprise/cmd/precise-code-intel-worker/internal/worker + interfaces: + - DBStore + - GitserverClient + - LSIFStore + - path: github.com/sourcegraph/sourcegraph/internal/workerutil/dbworker/store + interfaces: + - Store + prefix: Worker +- filename: enterprise/cmd/worker/internal/codeintel/indexing/mocks_test.go + sources: + - path: github.com/sourcegraph/sourcegraph/enterprise/cmd/worker/internal/codeintel/indexing + interfaces: + - DBStore + - ExternalServiceStore + - GitserverClient + - IndexEnqueuer + - IndexingRepoStore + - IndexingSettingStore + - PolicyMatcher + - RepoUpdaterClient + - path: github.com/sourcegraph/sourcegraph/internal/codeintel/stores/dbstore + interfaces: + - PackageReferenceScanner + - path: github.com/sourcegraph/sourcegraph/internal/workerutil/dbworker/store + interfaces: + - Store + prefix: Worker +- filename: enterprise/cmd/worker/internal/codeintel/janitor/mocks_test.go + path: github.com/sourcegraph/sourcegraph/enterprise/cmd/worker/internal/codeintel/janitor + interfaces: + - DBStore + - LSIFStore +- filename: enterprise/internal/batches/reconciler/mocks_test.go + path: github.com/sourcegraph/sourcegraph/enterprise/internal/batches/sources + interfaces: + - ChangesetSource + - ForkableChangesetSource +- filename: enterprise/internal/batches/sources/mocks_test.go + sources: + - path: github.com/sourcegraph/sourcegraph/enterprise/internal/batches/sources + interfaces: + - ChangesetSource + - SourcerStore + - path: github.com/sourcegraph/sourcegraph/internal/extsvc/bitbucketcloud + interfaces: + - Client + prefix: BitbucketCloud +- filename: enterprise/internal/batches/syncer/mocks_test.go + path: github.com/sourcegraph/sourcegraph/enterprise/internal/batches/syncer + interfaces: + - SyncStore +- filename: internal/codeintel/autoindexing/mocks_test.go + path: github.com/sourcegraph/sourcegraph/internal/codeintel/autoindexing + interfaces: + - DBStore + - GitServerClient + - InferenceService + - RepoUpdaterClient +- filename: internal/codeintel/autoindexing/background/scheduler/mocks_test.go + path: github.com/sourcegraph/sourcegraph/internal/codeintel/autoindexing/background/scheduler + interfaces: + - DBStore + - PolicyMatcher +- filename: internal/codeintel/autoindexing/internal/inference/mocks_test.go + path: github.com/sourcegraph/sourcegraph/internal/codeintel/autoindexing/internal/inference + interfaces: + - GitService + - SandboxService +- filename: internal/codeintel/dependencies/mocks_test.go + sources: + - path: github.com/sourcegraph/sourcegraph/internal/codeintel/dependencies + interfaces: + - LockfilesService + - Syncer + - localGitService + - path: github.com/sourcegraph/sourcegraph/internal/codeintel/dependencies/internal/store + interfaces: + - Store +- filename: internal/codeintel/dependencies/internal/lockfiles/mocks_test.go + path: github.com/sourcegraph/sourcegraph/internal/codeintel/dependencies/internal/lockfiles + interfaces: + - GitService +- filename: internal/codeintel/documents/mocks_test.go + path: github.com/sourcegraph/sourcegraph/internal/codeintel/documents/internal/store + interfaces: + - Store +- filename: internal/codeintel/policies/mocks_test.go + path: github.com/sourcegraph/sourcegraph/internal/codeintel/policies/internal/store + interfaces: + - Store +- filename: internal/codeintel/policies/background/repomatcher/mocks_test.go + path: github.com/sourcegraph/sourcegraph/internal/codeintel/policies/background/repomatcher + interfaces: + - DBStore +- filename: internal/codeintel/policies/enterprise/mocks_test.go + path: github.com/sourcegraph/sourcegraph/internal/codeintel/policies/enterprise + interfaces: + - GitserverClient + package: policies +- filename: internal/codeintel/stores/dbstore/migration/mocks_test.go + path: github.com/sourcegraph/sourcegraph/internal/codeintel/stores/dbstore/migration + interfaces: + - GitServerClient +- filename: internal/codeintel/symbols/mocks_test.go + path: github.com/sourcegraph/sourcegraph/internal/codeintel/symbols/internal/store + interfaces: + - Store +- filename: internal/codeintel/uploads/mocks_test.go + path: github.com/sourcegraph/sourcegraph/internal/codeintel/uploads/internal/store + interfaces: + - Store +- filename: internal/codeintel/uploads/background/cleanup/mocks_test.go + path: github.com/sourcegraph/sourcegraph/internal/codeintel/uploads/background/cleanup + interfaces: + - DBStore + - LSIFStore + - UploadService +- filename: internal/codeintel/uploads/background/commitgraph/mocks_test.go + path: github.com/sourcegraph/sourcegraph/internal/codeintel/uploads/background/commitgraph + interfaces: + - DBStore + - GitserverClient + - Locker +- filename: internal/codeintel/uploads/background/expiration/mocks_test.go + path: github.com/sourcegraph/sourcegraph/internal/codeintel/uploads/background/expiration + interfaces: + - DBStore + - PolicyMatcher +- filename: internal/database/migration/runner/mocks_test.go + path: github.com/sourcegraph/sourcegraph/internal/database/migration/runner + interfaces: + - Store +- filename: internal/featureflag/mocks_test.go + path: github.com/sourcegraph/sourcegraph/internal/featureflag + interfaces: + - Store +- filename: internal/goroutine/mocks_test.go + path: github.com/sourcegraph/sourcegraph/internal/goroutine + interfaces: + - BackgroundRoutine + - ErrorHandler + - Finalizer + - Handler +- filename: internal/oobmigration/mocks_test.go + path: github.com/sourcegraph/sourcegraph/internal/oobmigration + interfaces: + - Migrator + - storeIface +- filename: internal/uploadstore/mocks_test.go + path: github.com/sourcegraph/sourcegraph/internal/uploadstore + interfaces: + - gcsAPI + - gcsBucketHandle + - gcsComposer + - gcsObjectHandle + - s3API + - s3Uploader + package: uploadstore +- filename: internal/workerutil/mocks_test.go + path: github.com/sourcegraph/sourcegraph/internal/workerutil + interfaces: + - Handler + - Store + - WithHooks + - WithPreDequeue diff --git a/mockgen.yaml b/mockgen.yaml index be3ab82dbea..a5a24e9e337 100644 --- a/mockgen.yaml +++ b/mockgen.yaml @@ -1,355 +1,28 @@ +# To generate a new mock struct from an interface definition, add a new entry to one of +# the lists in a file below (or create a new file if the current categories do not fit). +# +# Each item will need to supply the following pieces of information: +# +# (1) First, you will need to give a target filename +# (2) Second, you will need to supply a target import path and interface name. If the +# set of interface definitions you are mocking are all from the same package, then +# you can supply a `path` and `interfaces` key which take a string and string array, +# respectively. If the set of interface definitions you are mocking come from multiple +# import paths, you can supply a `sources` array, each item containing a `path` and +# `interfaces` key. +# +# By convention, you should generate mocks next to the CONSUMER of an interface, not the +# definition. It is NOT considered an anti-pattern to generate multiple mocks for the same +# shared interface. +# +# By convention, the filename containing generated mocks should be `mocks_test.go`. +include-config-paths: + - mockgen.test.yaml + - mockgen.temp.yaml + force: true goimports: ./.bin/goimports file-prefix: | This file was generated by running `sg generate` (or `go-mockgen`) at the root of this repository. To add additional mocks to this or another package, add a new entry to the mockgen.yaml file in the root of this repository. -mocks: - # To generate a new mock struct from an interface definition, add a new value to this - # list. Each item will need to supply two pieces of information: - # - # (1) First, you will need to give a target filename - # (2) Second, you will need to supply a target import path and interface name. If the - # set of interface definitions you are mocking are all from the same package, then - # you can supply a `path` and `interfaces` key which take a string and string array, - # respectively. If the set of interface definitions you are mocking come from multiple - # import paths, you can supply a `sources` array, each item containing a `path` and - # `interfaces` key. - # - # By convention, you should generate mocks next to the CONSUMER of an interface, not the - # definition. It is NOT considered an anti-pattern to generate multiple mocks for the same - # shared interface. - # - # By convention, the filename containing generated mocks should be `mocks_test.go`. - - filename: cmd/frontend/internal/auth/userpasswd/mocks_temp.go - path: github.com/sourcegraph/sourcegraph/cmd/frontend/internal/auth/userpasswd - interfaces: - - LockoutStore - - filename: cmd/symbols/fetcher/mocks_test.go - path: github.com/sourcegraph/sourcegraph/cmd/symbols/gitserver - interfaces: - - GitServerClient - - filename: cmd/symbols/internal/api/mocks_test.go - path: github.com/sourcegraph/sourcegraph/cmd/symbols/gitserver - interfaces: - - GitServerClient - - filename: dev/team/mocks_temp.go - path: github.com/sourcegraph/sourcegraph/dev/team - interfaces: - - TeammateResolver - - filename: docker-images/prometheus/cmd/prom-wrapper/mocks/mocks_temp.go - path: github.com/prometheus/client_golang/api/prometheus/v1 - interfaces: - - API - - filename: enterprise/cmd/executor/internal/command/mocks_test.go - path: github.com/sourcegraph/sourcegraph/enterprise/cmd/executor/internal/command - interfaces: - - ExecutionLogEntryStore - - Logger - - LogEntry - - commandRunner - - filename: enterprise/cmd/executor/internal/worker/mocks_test.go - sources: - - path: github.com/sourcegraph/sourcegraph/enterprise/cmd/executor/internal/command - interfaces: - - Runner - - path: github.com/sourcegraph/sourcegraph/internal/workerutil - interfaces: - - Store - - filename: enterprise/cmd/frontend/internal/app/mocks_test.go - path: github.com/sourcegraph/sourcegraph/enterprise/cmd/frontend/internal/app - interfaces: - - githubClient - - filename: enterprise/cmd/frontend/internal/codeintel/httpapi/mocks_test.go - path: github.com/sourcegraph/sourcegraph/enterprise/cmd/frontend/internal/codeintel/httpapi - interfaces: - - DBStore - - GitHubClient - - filename: enterprise/cmd/frontend/internal/codeintel/resolvers/mocks_test.go - path: github.com/sourcegraph/sourcegraph/enterprise/cmd/frontend/internal/codeintel/resolvers - interfaces: - - DBStore - - EnqueuerDBStore - - EnqueuerGitserverClient - - GitserverClient - - IndexEnqueuer - - LSIFStore - - PositionAdjuster - - RepoUpdaterClient - - filename: enterprise/cmd/frontend/internal/codeintel/resolvers/mocks/mocks_temp.go - path: github.com/sourcegraph/sourcegraph/enterprise/cmd/frontend/internal/codeintel/resolvers - interfaces: - - QueryResolver - - Resolver - - filename: enterprise/cmd/frontend/internal/executorqueue/handler/mocks_test.go - path: github.com/sourcegraph/sourcegraph/internal/services/executors/store - interfaces: - - Store - - filename: enterprise/cmd/frontend/internal/executorqueue/queues/batches/mocks_test.go - path: github.com/sourcegraph/sourcegraph/enterprise/cmd/frontend/internal/executorqueue/queues/batches - interfaces: - - BatchesStore - - filename: enterprise/cmd/frontend/internal/registry/stores/dbmocks/mocks_temp.go - path: github.com/sourcegraph/sourcegraph/enterprise/cmd/frontend/internal/registry/stores - interfaces: - - ExtensionStore - - ReleaseStore - - filename: enterprise/cmd/precise-code-intel-worker/internal/worker/mocks_test.go - sources: - - path: github.com/sourcegraph/sourcegraph/enterprise/cmd/precise-code-intel-worker/internal/worker - interfaces: - - DBStore - - GitserverClient - - LSIFStore - - path: github.com/sourcegraph/sourcegraph/internal/workerutil/dbworker/store - interfaces: - - Store - prefix: Worker - - filename: enterprise/cmd/worker/internal/codeintel/indexing/mocks_test.go - sources: - - path: github.com/sourcegraph/sourcegraph/enterprise/cmd/worker/internal/codeintel/indexing - interfaces: - - DBStore - - ExternalServiceStore - - GitserverClient - - IndexEnqueuer - - IndexingRepoStore - - IndexingSettingStore - - PolicyMatcher - - RepoUpdaterClient - - path: github.com/sourcegraph/sourcegraph/internal/codeintel/stores/dbstore - interfaces: - - PackageReferenceScanner - - path: github.com/sourcegraph/sourcegraph/internal/workerutil/dbworker/store - interfaces: - - Store - prefix: Worker - - filename: enterprise/cmd/worker/internal/codeintel/janitor/mocks_test.go - path: github.com/sourcegraph/sourcegraph/enterprise/cmd/worker/internal/codeintel/janitor - interfaces: - - DBStore - - LSIFStore - - filename: enterprise/internal/batches/reconciler/mocks_test.go - path: github.com/sourcegraph/sourcegraph/enterprise/internal/batches/sources - interfaces: - - ChangesetSource - - ForkableChangesetSource - - filename: enterprise/internal/batches/sources/mocks_test.go - sources: - - path: github.com/sourcegraph/sourcegraph/enterprise/internal/batches/sources - interfaces: - - ChangesetSource - - SourcerStore - - path: github.com/sourcegraph/sourcegraph/internal/extsvc/bitbucketcloud - interfaces: - - Client - prefix: BitbucketCloud - - filename: enterprise/internal/batches/syncer/mocks_test.go - path: github.com/sourcegraph/sourcegraph/enterprise/internal/batches/syncer - interfaces: - - SyncStore - - filename: enterprise/internal/database/mocks_temp.go - path: github.com/sourcegraph/sourcegraph/enterprise/internal/database - interfaces: - - CodeMonitorStore - - EnterpriseDB - - PermsStore - - filename: enterprise/internal/insights/background/mocks_temp.go - path: github.com/sourcegraph/sourcegraph/enterprise/internal/insights/background - interfaces: - - RepoStore - - filename: enterprise/internal/insights/compression/mocks_temp.go - path: github.com/sourcegraph/sourcegraph/enterprise/internal/insights/compression - interfaces: - - CommitStore - - filename: enterprise/internal/insights/discovery/mocks_temp.go - path: github.com/sourcegraph/sourcegraph/enterprise/internal/insights/discovery - interfaces: - - IndexableReposLister - - RepoStore - - SettingStore - - filename: enterprise/internal/insights/store/mocks_temp.go - path: github.com/sourcegraph/sourcegraph/enterprise/internal/insights/store - interfaces: - - DataSeriesStore - - InsightMetadataStore - - Interface - - filename: internal/authz/mocks_temp.go - path: github.com/sourcegraph/sourcegraph/internal/authz - interfaces: - - SubRepoPermissionChecker - - SubRepoPermissionsGetter - - filename: internal/codeintel/autoindexing/mocks_test.go - path: github.com/sourcegraph/sourcegraph/internal/codeintel/autoindexing - interfaces: - - DBStore - - GitServerClient - - InferenceService - - RepoUpdaterClient - - filename: internal/codeintel/autoindexing/background/scheduler/mocks_test.go - path: github.com/sourcegraph/sourcegraph/internal/codeintel/autoindexing/background/scheduler - interfaces: - - DBStore - - PolicyMatcher - - filename: internal/codeintel/autoindexing/internal/inference/mocks_test.go - path: github.com/sourcegraph/sourcegraph/internal/codeintel/autoindexing/internal/inference - interfaces: - - GitService - - SandboxService - - filename: internal/codeintel/dependencies/mocks_test.go - sources: - - path: github.com/sourcegraph/sourcegraph/internal/codeintel/dependencies - interfaces: - - LockfilesService - - Syncer - - localGitService - - path: github.com/sourcegraph/sourcegraph/internal/codeintel/dependencies/internal/store - interfaces: - - Store - - filename: internal/codeintel/dependencies/internal/lockfiles/mocks_test.go - path: github.com/sourcegraph/sourcegraph/internal/codeintel/dependencies/internal/lockfiles - interfaces: - - GitService - - filename: internal/codeintel/documents/mocks_test.go - path: github.com/sourcegraph/sourcegraph/internal/codeintel/documents/internal/store - interfaces: - - Store - - filename: internal/codeintel/policies/mocks_test.go - path: github.com/sourcegraph/sourcegraph/internal/codeintel/policies/internal/store - interfaces: - - Store - - filename: internal/codeintel/policies/background/repomatcher/mocks_test.go - path: github.com/sourcegraph/sourcegraph/internal/codeintel/policies/background/repomatcher - interfaces: - - DBStore - - filename: internal/codeintel/policies/enterprise/mocks_test.go - path: github.com/sourcegraph/sourcegraph/internal/codeintel/policies/enterprise - interfaces: - - GitserverClient - package: policies - - filename: internal/codeintel/stores/dbstore/migration/mocks_test.go - path: github.com/sourcegraph/sourcegraph/internal/codeintel/stores/dbstore/migration - interfaces: - - GitServerClient - - filename: internal/codeintel/symbols/mocks_test.go - path: github.com/sourcegraph/sourcegraph/internal/codeintel/symbols/internal/store - interfaces: - - Store - - filename: internal/codeintel/uploads/mocks_test.go - path: github.com/sourcegraph/sourcegraph/internal/codeintel/uploads/internal/store - interfaces: - - Store - - filename: internal/codeintel/uploads/background/cleanup/mocks_test.go - path: github.com/sourcegraph/sourcegraph/internal/codeintel/uploads/background/cleanup - interfaces: - - DBStore - - LSIFStore - - UploadService - - filename: internal/codeintel/uploads/background/commitgraph/mocks_test.go - path: github.com/sourcegraph/sourcegraph/internal/codeintel/uploads/background/commitgraph - interfaces: - - DBStore - - GitserverClient - - Locker - - filename: internal/codeintel/uploads/background/expiration/mocks_test.go - path: github.com/sourcegraph/sourcegraph/internal/codeintel/uploads/background/expiration - interfaces: - - DBStore - - PolicyMatcher - - filename: internal/database/mocks_temp.go - path: github.com/sourcegraph/sourcegraph/internal/database - interfaces: - - AccessTokenStore - - AuthzStore - - BitbucketProjectPermissionsStore - - ConfStore - - DB - - EventLogStore - - ExternalServiceStore - - FeatureFlagStore - - GitserverLocalCloneStore - - GitserverRepoStore - - GlobalStateStore - - NamespaceStore - - OrgInvitationStore - - OrgMemberStore - - OrgStore - - PhabricatorStore - - RepoStore - - SavedSearchStore - - SearchContextsStore - - SecurityEventLogsStore - - SettingsStore - - SubRepoPermsStore - - TemporarySettingsStore - - UserCredentialsStore - - UserEmailsStore - - UserExternalAccountsStore - - UserPublicRepoStore - - UserStore - - WebhookLogStore - - filename: internal/database/migration/runner/mocks_test.go - path: github.com/sourcegraph/sourcegraph/internal/database/migration/runner - interfaces: - - Store - - filename: internal/featureflag/mocks_test.go - path: github.com/sourcegraph/sourcegraph/internal/featureflag - interfaces: - - Store - - filename: internal/gitserver/mocks_temp.go - path: github.com/sourcegraph/sourcegraph/internal/gitserver - interfaces: - - Client - - filename: internal/goroutine/mocks_test.go - path: github.com/sourcegraph/sourcegraph/internal/goroutine - interfaces: - - BackgroundRoutine - - ErrorHandler - - Finalizer - - Handler - - filename: internal/insights/mocks_temp.go - path: github.com/sourcegraph/sourcegraph/internal/insights - interfaces: - - Loader - - filename: internal/oobmigration/mocks_test.go - path: github.com/sourcegraph/sourcegraph/internal/oobmigration - interfaces: - - Migrator - - storeIface - - filename: internal/repos/mocks_temp.go - path: github.com/sourcegraph/sourcegraph/internal/repos - interfaces: - - Store - - filename: internal/search/client/mocks_temp.go - path: github.com/sourcegraph/sourcegraph/internal/search/client - interfaces: - - SearchClient - - filename: internal/search/job/mockjob/mocks_temp.go - path: github.com/sourcegraph/sourcegraph/internal/search/job - interfaces: - - Job - - filename: internal/uploadstore/mocks_test.go - path: github.com/sourcegraph/sourcegraph/internal/uploadstore - interfaces: - - gcsAPI - - gcsBucketHandle - - gcsComposer - - gcsObjectHandle - - s3API - - s3Uploader - package: uploadstore - - filename: internal/uploadstore/mocks/mocks_temp.go - path: github.com/sourcegraph/sourcegraph/internal/uploadstore - interfaces: - - Store - - filename: internal/workerutil/mocks_test.go - path: github.com/sourcegraph/sourcegraph/internal/workerutil - interfaces: - - Handler - - Store - - WithHooks - - WithPreDequeue - - filename: internal/workerutil/dbworker/store/mocks/mocks_temp.go - path: github.com/sourcegraph/sourcegraph/internal/workerutil/dbworker/store - interfaces: - - Store