Skip to content

[CLI] Add rename command for test run execution - #121

Merged
rquidute merged 2 commits into
project-chip:v2.16-cli-developfrom
rquidute:feature/1113-cli-rename-test-run-execution
Sep 15, 2026
Merged

rquidute merged 2 commits into
project-chip:v2.16-cli-developfrom
rquidute:feature/1113-cli-rename-test-run-execution

Conversation

@rquidute

Copy link
Copy Markdown
Contributor

Summary

The backend exposes PUT /api/v1/test_run_executions/{id}/rename to rename a test run execution, but the CLI had no command that called it.

Changes

  • Add a rename subcommand to the test_run_execution command group (th_cli/commands/test_run_execution.py), taking --id and --name.
  • Calls rename_test_run_execution_api_v1_test_run_executions__id__rename_put (already present in the autogenerated API client).
  • Add unit tests covering success, API error surfacing, missing --id/--name, and --help output.

Usage

```
th_cli test-run-execution rename --id 1 --name "New Name"
```

Note on stacking

This branch is built on top of #120's branch (feature/1112-cli-delete-test-run-execution), so this PR's diff currently includes #120's delete command commit too. No rebase needed on our side — once #120 merges into v2.16-cli-develop, this diff will automatically shrink to just the rename command changes.

Closes #1113

@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: b68138d2-f1c0-4f35-beab-a121fd525086

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mergify

mergify Bot commented Sep 15, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@rquidute rquidute self-assigned this Sep 15, 2026
Comment thread th_cli/commands/test_run_execution.py Outdated
The backend exposes PUT /api/v1/test_run_executions/{id}/rename to
rename a test run execution, but no CLI command called it.

Adds `test-run-execution rename --id <id> --name <new-name>`, calling
rename_test_run_execution_api_v1_test_run_executions__id__rename_put
and reporting success or surfacing the API error, mirroring the
`delete` command added for #1112.
@rquidute
rquidute force-pushed the feature/1113-cli-rename-test-run-execution branch from 5048a4f to 570a067 Compare September 15, 2026 12:44
The backend strips whitespace from new_execution_name before persisting,
so echoing the raw --name input could show a different value than what
was actually saved (e.g. --name "  New Name  " persists as "New Name").
Use the response's .title instead, matching how repeat/import already
handle this.

Addresses review feedback from @oxesoft on project-chip#121.
@rquidute
rquidute requested a review from oxesoft September 15, 2026 12:56
@rquidute
rquidute merged commit cc53628 into project-chip:v2.16-cli-develop Sep 15, 2026
5 checks passed
@rquidute
rquidute deleted the feature/1113-cli-rename-test-run-execution branch September 15, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants