Skip to content

Commit 2aeeeaf

Browse files
committed
Change orchestrator message
1 parent c990326 commit 2aeeeaf

3 files changed

Lines changed: 21 additions & 15 deletions

File tree

ddev/src/ddev/cli/validate/all/orchestrator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class ValidationConfig:
4242
description="Verify check versions match the Agent requirements file",
4343
),
4444
"ci": ValidationConfig(
45-
description="Validate CI configuration and Codecov settings",
45+
description="Validate CI configuration and code coverage settings",
4646
repo_wide=True,
4747
fix_flag="--sync",
4848
),

ddev/src/ddev/cli/validate/ci.py

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,9 @@ def _validate_code_coverage(
248248
config_path = app.repo.path / config_filename
249249

250250
if not config_path.is_file():
251-
validation_tracker.error((repo_choice,), message=f'Unable to find the code coverage config file: {config_filename}')
251+
validation_tracker.error(
252+
(repo_choice,), message=f'Unable to find the code coverage config file: {config_filename}'
253+
)
252254
validation_tracker.display()
253255
app.abort()
254256

@@ -299,10 +301,12 @@ def _validate_code_coverage(
299301
if sync:
300302
fixed = True
301303
for check_name in missing_services:
302-
existing_services.append({
303-
'id': check_name,
304-
'paths': get_coverage_sources(check_name, app),
305-
})
304+
existing_services.append(
305+
{
306+
'id': check_name,
307+
'paths': get_coverage_sources(check_name, app),
308+
}
309+
)
306310
app.display_success(f'Added service `{check_name}`\n')
307311
else:
308312
success = False
@@ -319,10 +323,12 @@ def _validate_code_coverage(
319323
# Ensure at least one gate exists
320324
gates = config.get('gates') or []
321325
if not gates:
322-
gates.append({
323-
'type': 'total_coverage_percentage',
324-
'config': {'threshold': DEFAULT_COVERAGE_THRESHOLD},
325-
})
326+
gates.append(
327+
{
328+
'type': 'total_coverage_percentage',
329+
'config': {'threshold': DEFAULT_COVERAGE_THRESHOLD},
330+
}
331+
)
326332
config['gates'] = gates
327333
app.display_success(f'Added default coverage gate with {DEFAULT_COVERAGE_THRESHOLD}% threshold\n')
328334

ddev/tests/cli/validate/all/test_github.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from ddev.cli.validate.all.orchestrator import ValidationConfig, ValidationResult
1818

1919
CONFIGS = {
20-
"ci": ValidationConfig(description="Validate CI configuration and Codecov settings", repo_wide=True),
20+
"ci": ValidationConfig(description="Validate CI configuration and code coverage settings", repo_wide=True),
2121
"config": ValidationConfig(description="Validate default configuration files against spec.yaml"),
2222
"metadata": ValidationConfig(description="Validate metadata.csv metric definitions"),
2323
}
@@ -134,7 +134,7 @@ def test_format_pr_comment_all_passed(helpers):
134134
135135
| Validation | Description | Status |
136136
|---|---|---|
137-
| `ci` | Validate CI configuration and Codecov settings | ✅ |
137+
| `ci` | Validate CI configuration and code coverage settings | ✅ |
138138
| `config` | Validate default configuration files against spec.yaml | ✅ |
139139
140140
</details>""")
@@ -160,7 +160,7 @@ def test_format_pr_comment_one_failure_with_target(helpers):
160160
161161
| Validation | Description | Status |
162162
|---|---|---|
163-
| `ci` | Validate CI configuration and Codecov settings | ✅ |
163+
| `ci` | Validate CI configuration and code coverage settings | ✅ |
164164
165165
</details>""")
166166
assert format_pr_comment(results, CONFIGS, "changed", list(results)) == expected
@@ -266,7 +266,7 @@ def test_format_step_summary_all_passed(helpers):
266266
267267
| Validation | Description | Status |
268268
|---|---|---|
269-
| `ci` | Validate CI configuration and Codecov settings | ✅ |
269+
| `ci` | Validate CI configuration and code coverage settings | ✅ |
270270
| `config` | Validate default configuration files against spec.yaml | ✅ |""")
271271
assert format_step_summary(results, CONFIGS, "changed", list(results)) == expected
272272

@@ -281,7 +281,7 @@ def test_format_step_summary_with_failures(helpers):
281281
282282
| Validation | Description | Status |
283283
|---|---|---|
284-
| `ci` | Validate CI configuration and Codecov settings | ✅ |
284+
| `ci` | Validate CI configuration and code coverage settings | ✅ |
285285
| `config` | Validate default configuration files against spec.yaml | ❌ |
286286
287287
Run `ddev validate all changed --fix` to attempt to auto-fix supported validations.""")

0 commit comments

Comments
 (0)