-
Notifications
You must be signed in to change notification settings - Fork 412
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #809 from LandonTClipp/disable_func_mocks
Add disable-func-mocks parameter
- Loading branch information
Showing
8 changed files
with
76 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
all: false | ||
log-level: info | ||
packages: | ||
github.com/vektra/mockery/v2/pkg/fixtures: | ||
interfaces: | ||
SendFunc: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
export MOCKERY_CONFIG="e2e/.mockery-disable-func-mock.yaml" | ||
export MOCKERY_LOG_LEVEL="error" | ||
|
||
MOCKERY_DISABLE_FUNC_MOCKS="false" go run github.com/go-task/task/v3/cmd/task mocks.generate | ||
|
||
if [ -f "./mocks/github.com/vektra/mockery/v2/pkg/fixtures/mock_SendFunc.go" ]; then | ||
echo "file exists as expected" | ||
else | ||
echo "file doesn't exist when we expected it to exist" | ||
exit 1 | ||
fi | ||
|
||
go run github.com/go-task/task/v3/cmd/task mocks.remove | ||
MOCKERY_DISABLE_FUNC_MOCKS="true" go run github.com/go-task/task/v3/cmd/task mocks.generate | ||
if [ -f "./mocks/github.com/vektra/mockery/v2/pkg/fixtures/mock_SendFunc.go" ]; then | ||
echo "SendFunc mock exists when we expected it to not be generated." | ||
exit 1 | ||
else | ||
echo "SendFunc mock doesn't exist as expected" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters