Skip to content

switch: minor adjustment of command output #1190

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Changed

- `tt cluster failover switch`: minor change in output that displays corresponding
`switch-status` command with quoted URI argument so it could be copy-pasted for
subsequent launch as-is.

### Fixed

## [2.10.1] - 2025-06-26
Expand Down
2 changes: 1 addition & 1 deletion cli/cluster/cmd/failover.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func Switch(url string, switchCtx SwitchCtx) error {
return err
}

fmt.Printf("%s\n%s %s %s\n",
fmt.Printf("%s\n%s '%s' %s\n",
"To check the switching status, run:",
"tt cluster failover switch-status",
url, uuid)
Expand Down
3 changes: 2 additions & 1 deletion test/integration/cluster/test_cluster_failover.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ def test_cluster_failover_switch_timeout_etcd(tt_cmd, tmpdir_with_cfg, etcd):
text=True,
)
switch_output = ps_switch.stdout.read()
assert re.search(r"To check the switching status, run", switch_output)
assert "To check the switching status, run" in switch_output
assert f"tt cluster failover switch-status '{etcd.endpoint}/prefix'" in switch_output

task_id = switch_output.split(" ")[-1]
task_id = "/prefix/failover/command/" + task_id.strip()
Expand Down
Loading