apm-server
apm-server copied to clipboard
[systemtest] Get repo root correctly with go workspaces
Motivation/summary
Fixes the repo root resolution when go workspace is in use. In this case the command go list -m will list all the modules in use by the go workspace and the current getRepoRoot cannot handle it correctly.
The changes the PR proposes is also kinda hacky, happy to hear if others have a better solution to finding the repo root or fixing the issue.
Checklist
~~- [ ] Update CHANGELOG.asciidoc~~ ~~- [ ] Documentation has been updated~~
How to test these changes
cd systemtestgo work initgo work use <path_to_apm_tools>go work use .go test -v -count=1 ./...
Tests should pass without errors.
Related issues
N/A
This pull request does not have a backport label. Could you fix it @lahsivjar? 🙏 To fixup this pull request, you need to add the backport labels for the needed branches, such as:
backport-7.17is the label to automatically backport to the 7.17 branch.backport-8./dis the label to automatically backport to the8./dbranch./dis the digit.
NOTE: backport-skip has been added to this pull request.