make+graph/db: add -short helper and skip tests in short mode
In this commit, we add a makefile helper that can be used to add the "-short" flag to the "go test" command when running unit tests via "make unit ...". Tests can then be expanded with a `testing.Short()` check to potentially skip the test in short mode. This is useful for if a dev wants to quickly run most of the tests in a package but would like to opt out of running the longer form tests such as stress tests or rapid generation tests. This commit adds this check to two graph/db tests.
This commit is contained in:
3 files changed
+15
No files matched your search
@@ -1177,6 +1177,10 @@ func assertResultState(t *testing.T, sql *SQLStore, expState dbState) {
|
||||
func TestMigrateGraphToSQLRapid(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
if testing.Short() {
|
||||
t.Skipf("skipping test in short mode")
|
||||
}
|
||||
|
||||
dbFixture := NewTestDBFixture(t)
|
||||
|
||||
rapid.Check(t, func(rt *rapid.T) {
|
||||
|
||||
Reference in new issue
Block a user