Open chenrui333 opened 2 weeks ago
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.
If switching to Mockery
, it's probably worth using the packages
configuration scheme instead - the current draft PR implementation is deprecated.
https://vektra.github.io/mockery/latest/migrating_to_packages/
e.g. .mockery.yaml
config for a separate mocks
directory mirroring the directory structure of your original repo (which I think is better)
with-expecter: True
dir: mocks/{{ replaceAll .InterfaceDirRelative "internal" "internal_" }}
mockname: "{{.InterfaceName}}"
outpkg: "{{.PackageName}}"
filename: "{{.InterfaceName}}.go"
all: True
packages:
github.com/runatlantis/atlantis:
config:
recursive: True
Or you could have the mocks adjacent to the interface if you wanted: https://vektra.github.io/mockery/latest/migrating_to_packages/#adjacent-to-interface
@james0209 thanks for weighing in here, yeah, I was definitely thinking that I was going with the packages
configuration route. :) Any way, let me refine the PR a bit.
todos for this pr:
fixes #4664