Skip to content

Commit a891c3d

Browse files
authored
Merge pull request #20 from gripmock/snapshot-fix
fix snapshot
2 parents dd51481 + 8691850 commit a891c3d

File tree

27 files changed

+1825
-1973
lines changed

27 files changed

+1825
-1973
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
resolver = "2"
33

44
[workspace.package]
5-
version = "1.4.5"
5+
version = "1.4.6"
66
edition = "2024"
77
authors = ["bavix"]
88
license = "MIT"

docs/advanced/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ grpctestify inspect test.gctf --format json
1515
grpctestify check tests/**/*.gctf
1616

1717
# Format files
18-
grpctestify fmt -w tests/**/*.gctf
18+
grpctestify fmt -w .
1919

2020
# Query server reflection
2121
grpctestify reflect package.Service/Method

docs/development/index.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,18 @@ jobs:
1919
run: |
2020
brew tap gripmock/tap
2121
brew install gripmock/tap/grpctestify
22+
23+
# 1) Formatting gate (check mode, non-zero if reformat is needed)
24+
- name: Check GCTF formatting
25+
run: |
26+
grpctestify fmt .
27+
28+
# 2) Syntax/semantic validation gate
29+
- name: Validate GCTF files
30+
run: |
31+
grpctestify check .
32+
33+
# 3) Runtime execution gate
2234
- name: Run Tests
2335
run: |
2436
grpctestify tests/ --log-format junit --log-output results.xml
@@ -30,6 +42,15 @@ jobs:
3042
reporter: java-junit
3143
```
3244
45+
### Recommended CI order
46+
47+
1. `grpctestify fmt <paths...>` - style/formatting check (fails if files need changes)
48+
2. `grpctestify check <paths...>` - parse + structural + semantic validation
49+
3. `grpctestify <paths...>` - real execution against gRPC service
50+
51+
This split keeps failure causes explicit (style vs validation vs runtime)
52+
and mirrors common tooling workflows (`rustfmt --check` + linters/tests).
53+
3354
### Docker Integration
3455

3556
```dockerfile

docs/guides/getting-started/basic-concepts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ package.Service/Method
3131
- `REQUEST_HEADERS` - request metadata
3232
- `TLS` - TLS/mTLS parameters
3333
- `PROTO` - descriptor/reflection configuration
34-
- `OPTIONS` - parsed and validated, currently not applied at runtime
34+
- `OPTIONS` - parsed, validated, and used for per-test runtime overrides (`timeout`, `retry`, `retry-delay`, `no-retry`)
3535

3636
## RPC patterns
3737

docs/guides/reference/api/command-line.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,20 @@ grpctestify tests/ --log-format junit --log-output test-results.xml
6464
grpctestify check tests/**/*.gctf
6565

6666
# Format files in-place
67-
grpctestify fmt -w tests/**/*.gctf
67+
grpctestify fmt -w .
68+
69+
# Check formatting (non-zero exit if changes are needed)
70+
grpctestify fmt .
6871
```
6972

73+
## Fmt Behavior
74+
75+
- `grpctestify fmt <files...>` works as a formatting check and exits with code `1` if any file needs reformatting.
76+
- `grpctestify fmt -w <files...>` rewrites files in place.
77+
- Safe optimizer rewrites are applied by default during formatting.
78+
79+
For CI, run both `fmt` and `check`: `fmt` enforces style, while `check` enforces parse/validation/semantics.
80+
7081
## See Also
7182

7283
- [Test File Format](./test-files)

docs/guides/reference/api/grpc-default-test.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@ grpctestify tests/ --verbose
4646

4747
## Notes
4848

49-
- `OPTIONS` section is parsed but not applied at runtime
49+
- `OPTIONS` section can override per-test runtime flags (`timeout`, `retry`, `retry-delay`, `no-retry`)
5050
- `PROTO files=...` is not supported in native mode

docs/guides/reference/api/test-files.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ package.Service/Method
3232
- `REQUEST_HEADERS` (or `HEADERS`) - request metadata
3333
- `TLS` - TLS/mTLS config
3434
- `PROTO` - descriptor/reflection configuration
35-
- `OPTIONS` - parsed and validated, but currently not applied at runtime
35+
- `OPTIONS` - parsed, validated, and applied for per-test runtime overrides (`timeout`, `retry`, `retry-delay`, `no-retry`)
3636

3737
## Validation Rules
3838

docs/guides/testing-patterns/data-validation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ Use `RESPONSE` for strict matching or `ASSERTS` for flexible checks.
3333

3434
Notes:
3535

36-
- `OPTIONS` section is parsed but not applied at runtime
36+
- `OPTIONS` section supports runtime overrides (`timeout`, `retry`, `retry-delay`, `no-retry`)
3737
- Use `RESPONSE with_asserts=true` when you need both response match and assertions

docs/guides/testing-patterns/performance-testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ grpctestify tests/ --log-format junit --log-output perf-results.xml
4242
## Notes
4343

4444
- Use CLI flags for execution tuning
45-
- `OPTIONS` section is parsed but not currently applied at runtime
45+
- `OPTIONS` section can override per-test runtime behavior (`timeout`, `retry`, `retry-delay`, `no-retry`)

docs/guides/testing-patterns/testing-patterns.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ grpctestify tests/ --parallel 4 --timeout 30
2222
grpctestify tests/ --log-format json --log-output results.json
2323
```
2424

25-
Note: `OPTIONS` blocks are parsed but not applied at runtime.
25+
`OPTIONS` blocks support per-test overrides for `timeout`, `retry`, `retry-delay`, and `no-retry`.

0 commit comments

Comments
 (0)