-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
* Fixes 4552: fix missing method bug with mock gen * fix: mockery path, script for mockery comment fix
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
filename: "{{ .InterfaceName | snakecase }}_mock.go" | ||
dir: "{{.InterfaceDir}}" | ||
mockname: "Mock{{.InterfaceName}}" | ||
outpkg: "{{.PackageName}}" | ||
inpackage: True | ||
with-expecter: False | ||
disable-version-string: True | ||
|
||
packages: | ||
github.com/content-services/content-sources-backend/pkg/tasks/queue: | ||
interfaces: | ||
Queue: | ||
github.com/content-services/content-sources-backend/pkg/tasks/client: | ||
interfaces: | ||
TaskClient: | ||
config: | ||
filename: "client_mock.go" | ||
github.com/content-services/content-sources-backend/pkg/pulp_client: | ||
interfaces: | ||
PulpGlobalClient: | ||
PulpClient: | ||
github.com/content-services/content-sources-backend/pkg/candlepin_client: | ||
interfaces: | ||
CandlepinClient: | ||
github.com/content-services/content-sources-backend/pkg/cache: | ||
interfaces: | ||
Cache: | ||
github.com/content-services/content-sources-backend/pkg/dao: | ||
interfaces: | ||
RepositoryConfigDao: | ||
config: | ||
filename: "repository_configs_mock.go" | ||
RpmDao: | ||
config: | ||
filename: "rpms_mock.go" | ||
RepositoryDao: | ||
config: | ||
filename: "repositories_mock.go" | ||
SnapshotDao: | ||
config: | ||
filename: "snapshots_mock.go" | ||
MetricsDao: | ||
config: | ||
filename: "metrics_mock.go" | ||
TaskInfoDao: | ||
config: | ||
filename: "task_info_mock.go" | ||
AdminTaskDao: | ||
config: | ||
filename: "admin_tasks_mock.go" | ||
DomainDao: | ||
config: | ||
filename: "domain_dao_mock.go" | ||
PackageGroupDao: | ||
config: | ||
filename: "package_groups_mock.go" | ||
EnvironmentDao: | ||
config: | ||
filename: "environments_mock.go" | ||
TemplateDao: | ||
config: | ||
filename: "templates_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.
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.
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.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
COMMAND="$1" # comment | uncomment | ||
PATTERN="" | ||
|
||
function print_out_usage { | ||
cat <<EOF | ||
Usage: ./scripts/mockery_comment_fix.sh <(comment | uncomment)> | ||
EOF | ||
} | ||
|
||
if [ "${COMMAND}" == "comment" ]; then | ||
PATTERN="2,$$ s/^/\/\//" | ||
elif [ "${COMMAND}" == "uncomment" ]; then | ||
PATTERN="2,$$ s/^\/\///" | ||
else | ||
echo "error: unsupported or missing argument" >&2 | ||
print_out_usage >&2 | ||
exit 1 | ||
fi | ||
|
||
case "$( uname -s )" in | ||
"Linux" ) # For GNU/Linux systems the -i flag doesn't accept the extension. | ||
sed -i "$PATTERN" pkg/dao/registry_mock.go | ||
;; | ||
"Darwin" | * ) # For Darwin/BSD systems the -i flag needs an extension specified, can be left blank to not add an extension. | ||
sed -i '' "$PATTERN" pkg/dao/registry_mock.go | ||
;; | ||
esac |