-
Notifications
You must be signed in to change notification settings - Fork 447
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
make
commands to standardize running/debugging Go tests (#24606)
# Checklist for submitter - [X] Manual QA for all new/changed functionality # Details This PR adds two new user-facing `make` targets: * `run-go-tests`: run Go tests for one or more packages, optionally filtering to specific tests * `debug-go-tests`: debug (using Delve) Go tests for one or more packages, optionally filtering to specific tests Example usage: ``` # Run all tests in the mysql and gdmf packages make run-go-tests PKG_TO_TEST="server/mdm/apple/gdmf server/datastore/mysql" ``` ``` # Run all the TestMDMApple tests in the mysql package make run-go-tests PKG_TO_TEST=server/datastore/mysql TESTS_TO_RUN="^TestMDMApple\$$" ``` ``` # Run only the TestMDMAppleProfileLabels test in the mysql package make run-go-tests PKG_TO_TEST=server/datastore/mysql TESTS_TO_RUN="^TestMDMApple\$$/^TestMDMAppleProfileLabels\$$" ``` # Notes Two new "private" targets `.run-go-tests` and `.debug-go-tests` were created as base commands for both `test-go` (used in CI) and the new user-facing commands.
- Loading branch information
Showing
1 changed file
with
53 additions
and
12 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