Optimize test suite with testing.Short() guards
- Add Short() guards to slow CLI tests (2-4s each) - Add Short() guards to slow API/integration tests (3-11s) - Add Short() guard to hanging daemon discovery test (29s timeout) - Short test suite now runs in ~6s (down from 5+ minutes) Run 'go test -short ./...' for fast iteration Run 'go test ./...' for full coverage Closes: bd-iov0
This commit is contained in:
@@ -8,6 +8,9 @@ import (
|
||||
)
|
||||
|
||||
func TestCommentOperationsViaRPC(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping slow RPC test in short mode")
|
||||
}
|
||||
_, client, cleanup := setupTestServer(t)
|
||||
defer cleanup()
|
||||
|
||||
|
||||
@@ -13,6 +13,9 @@ import (
|
||||
const testVersion100 = "1.0.0"
|
||||
|
||||
func TestVersionCompatibility(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping slow RPC test in short mode")
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
serverVersion string
|
||||
|
||||
Reference in New Issue
Block a user