Repository navigation
CLI-1860: Updated response to include download links. - #2028
Conversation
|
Try the dev build for this PR: https://acquia-cli.s3.amazonaws.com/build/pr/2028/acli.phar |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2028 +/- ##
=========================================
Coverage 92.76% 92.77%
- Complexity 2032 2037 +5
=========================================
Files 126 126
Lines 7337 7345 +8
=========================================
+ Hits 6806 6814 +8
Misses 531 531 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
deepakmishra2
left a comment
There was a problem hiding this comment.
We should also add test for api:site-instances:database:backups with a _links.download fixture and asserts the download URL is preserved.
| $this->assertArrayNotHasKey('_links', $decoded[0]); | ||
| $this->assertArrayNotHasKey('_links', $decoded[1]); | ||
| $this->assertArrayHasKey('_links', $decoded[0]); | ||
| $this->assertEmpty($decoded[0]['_links']); |
There was a problem hiding this comment.
and once we have the test we can change this assertion to assertArrayNotHasKey('_links', ...) for fixtures without a download key
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please remove the |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please remove the |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please remove the |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please remove the |
|
@copilot resolve the merge conflicts in this pull request |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused filtering change has corresponding regression coverage and no identified blocking issues.
Review effort: Balanced
Findings: None
What changed in this PR
Updates API response filtering to preserve download links while removing other link entries.
Changes:
- Retains
_links.downloadfor object and array responses. - Updates existing assertions and adds download-link regression tests.
| File | Description |
|---|---|
| tests/phpunit/src/Commands/Api/ApiCommandTest.php | Tests download-link preservation and filtering of other links. |
| src/Command/Api/ApiBaseCommand.php | Filters _links instead of removing it entirely. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
# Conflicts: # tests/phpunit/src/Commands/Api/ApiCommandTest.php Co-authored-by: deepakmishra2 <108808209+deepakmishra2@users.noreply.github.com>
No description provided.