fix: resolve dart analyze failures in chaos_monkey_test.dart (#458)
## Summary Fixes CI failures introduced by PR #455 (chaos monkey backend test). The `dart analyze --fatal-infos` step in CI was failing because `test/backend/chaos_monkey_test.dart` had: - **`avoid_print`** (5 instances): replaced `print(...)` with `stdout.writeln(...)` — `dart:io` is already imported - **`avoid_redundant_argument_values`**: removed redundant `''` from `_env('CHAOS_SEED', '')` since `''` is the parameter default - **`dart format`**: applied formatter fixes (trailing commas, line wrapping for long `connectToServer` calls) ## Verification ``` $ nix develop --command bash -c "fvm dart analyze --fatal-infos" Analyzing 456... No issues found! $ nix develop --command bash -c "fvm dart format --output=none --set-exit-if-changed test/backend/chaos_monkey_test.dart" Formatted 1 file (0 changed) in 0.01 seconds. ``` Closes #456 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Thomas SharedInbox <sharedinbox@thomas-guettler.de> Reviewed-on: https://codeberg.org/guettli/sharedinbox/pulls/458
This commit was merged in pull request #458.
This commit is contained in:
committed by
guettli
co-authored by
guettli
Thomas SharedInbox
parent
985bac7022
commit
6a60c8d73b
+10
@@ -565,6 +565,16 @@ func (m *Ci) TestSyncReliability(ctx context.Context) (string, error) {
|
||||
Stdout(ctx)
|
||||
}
|
||||
|
||||
// ChaosMonkeyBackend runs random IMAP/SMTP operations against Stalwart to surface crashes.
|
||||
func (m *Ci) ChaosMonkeyBackend(ctx context.Context) (string, error) {
|
||||
return m.WithStalwart(m.setup(m.backendSrc())).
|
||||
WithExec([]string{"/bin/bash", "-c",
|
||||
`tmp=$(mktemp); trap 'rm -f "$tmp"' EXIT; ` +
|
||||
`flutter test test/backend/chaos_monkey_test.dart --reporter expanded --concurrency=1 --no-pub >"$tmp" 2>&1 || { cat "$tmp"; exit 1; }; ` +
|
||||
`grep -E '^All [0-9]+ tests passed' "$tmp" || tail -1 "$tmp"`}).
|
||||
Stdout(ctx)
|
||||
}
|
||||
|
||||
// Check runs the full check suite.
|
||||
func (m *Ci) Check(ctx context.Context) (string, error) {
|
||||
ctx, cancel := context.WithTimeout(ctx, 30*time.Minute)
|
||||
|
||||
Reference in New Issue
Block a user