Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move mocks to mock pkg #680

Merged
merged 3 commits into from
Mar 17, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
NAME := auth0-cli
GO_PKG := github.com/auth0/$(NAME)
GO_BIN ?= $(shell go env GOPATH)/bin
GO_PACKAGES := $(shell go list ./... | grep -v vendor)
GO_PACKAGES := $(shell go list ./... | grep -vE "vendor|tools|mock")

## Configuration for build-info
BUILD_DIR ?= $(CURDIR)/out
Expand Down
2 changes: 1 addition & 1 deletion docs/auth0_actions_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ auth0 actions update [flags]
auth0 actions update <action-id> --name myaction --code "$(cat path/to/code.js)" --dependency "lodash=4.0.0"
auth0 actions update <action-id> --name myaction --code "$(cat path/to/code.js)" --dependency "lodash=4.0.0" --secret "SECRET=value"
auth0 actions update <action-id> --name myaction --code "$(cat path/to/code.js)" --dependency "lodash=4.0.0" --dependency "uuid=9.0.0" --secret "API_KEY=value" --secret "SECRET=value"
auth0 actions update <action-id> -n myaction -t post-login -c "$(cat path/to/code.js)" -d "lodash=4.0.0" -d "uuid=9.0.0" -s "API_KEY=value" -s "SECRET=value" --json
auth0 actions update <action-id> -n myaction -c "$(cat path/to/code.js)" -d "lodash=4.0.0" -d "uuid=9.0.0" -s "API_KEY=value" -s "SECRET=value" --json
```


Expand Down
2 changes: 2 additions & 0 deletions internal/auth0/action.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:generate mockgen -source=action.go -destination=mock/action_mock.go -package=mock

package auth0

import "github.com/auth0/go-auth0/management"
Expand Down
2 changes: 1 addition & 1 deletion internal/auth0/branding_prompt.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:generate mockgen -source=branding_prompt.go -destination=branding_prompt_mock.go -package=auth0
//go:generate mockgen -source=branding_prompt.go -destination=mock/branding_prompt_mock.go -package=mock

package auth0

Expand Down
2 changes: 1 addition & 1 deletion internal/auth0/client.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:generate mockgen -source=client.go -destination=client_mock.go -package=auth0
//go:generate mockgen -source=client.go -destination=mock/client_mock.go -package=mock

package auth0

Expand Down
4 changes: 2 additions & 2 deletions internal/auth0/log.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//go:generate mockgen -source=log.go -destination=log_mock.go -package=auth0
//go:generate mockgen -source=log.go -destination=mock/log_mock.go -package=mock

package auth0

import "github.com/auth0/go-auth0/management"

type LogAPI interface {
// Retrieves the data related to the log entry identified by id. This returns a
// Read the data related to the log entry identified by id. This returns a
// single log entry representation as specified in the schema.
Read(id string, opts ...management.RequestOption) (l *management.Log, err error)

Expand Down
170 changes: 170 additions & 0 deletions internal/auth0/mock/action_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/auth0/resource_server.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:generate mockgen -source=resource_server.go -destination=resource_server_mock.go -package=auth0
//go:generate mockgen -source=resource_server.go -destination=mock/resource_server_mock.go -package=mock

package auth0

Expand Down
2 changes: 1 addition & 1 deletion internal/auth0/rule.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:generate mockgen -source=rule.go -destination=rule_mock.go -package=auth0
//go:generate mockgen -source=rule.go -destination=mock/rule_mock.go -package=mock

package auth0

Expand Down
Loading