Skip to content

Commit 4339aaa

Browse files
mpywclaude
andcommitted
refactor: split structure.json into options.json and tests/*.json
- Split monolithic structure.json into modular test files - Create options.json for excludeDirs configuration - Create individual JSON files per test case in tests/ - Add options.schema.json and test.schema.json for validation - Update validation_test.go to load from new structure - Remove description validation (JSON-only documentation) - Update CI to validate schemas in parallel with xargs -P 8 - Remove local schema validation from test_all.sh (too slow) - Fix See also order in waitgroup tests (alphabetical) - Add spawnerlabel and externalspawner test metadata 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 72d6640 commit 4339aaa

File tree

296 files changed

+5129
-4272
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

296 files changed

+5129
-4272
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,14 @@ jobs:
5151
with:
5252
go-version-file: go.mod
5353

54-
- name: Validate structure.json schema
54+
- name: Validate options.json schema
5555
working-directory: testdata/metatest
56-
run: go run github.com/santhosh-tekuri/jsonschema/cmd/jv@29cbed9 structure.schema.json structure.json
56+
run: go run github.com/santhosh-tekuri/jsonschema/cmd/jv@29cbed9 options.schema.json options.json
57+
58+
- name: Validate test schemas (parallel)
59+
working-directory: testdata/metatest
60+
run: |
61+
ls tests/*.json | xargs -P 8 -I {} go run github.com/santhosh-tekuri/jsonschema/cmd/jv@29cbed9 test.schema.json {}
5762
5863
metatest:
5964
name: Metatest

test_all.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,7 @@ run_test() {
2828

2929
echo ""
3030

31-
# Run all tests
32-
run_test "schema" \
33-
go run github.com/santhosh-tekuri/jsonschema/cmd/jv@29cbed9 \
34-
testdata/metatest/structure.schema.json testdata/metatest/structure.json
35-
31+
# Run all tests (schema validation is done in CI only)
3632
run_test "metatest" \
3733
go test ./testdata/metatest/validation_test.go
3834

testdata/metatest/options.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"excludeDirs": [
3+
"github.com",
4+
"golang.org"
5+
]
6+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "options.schema.json",
4+
"title": "Test Options",
5+
"description": "Schema for goroutinectx test options configuration",
6+
"type": "object",
7+
"required": ["excludeDirs"],
8+
"additionalProperties": false,
9+
"properties": {
10+
"excludeDirs": {
11+
"type": "array",
12+
"description": "Directories to exclude from validation (e.g., stub packages)",
13+
"items": {
14+
"type": "string",
15+
"minLength": 1
16+
},
17+
"uniqueItems": true
18+
}
19+
}
20+
}

0 commit comments

Comments
 (0)