Show SSH copy-error menu for status-only error workspaces
This commit is contained in:
parent
0f47ae3d1a
commit
0e40779bc9
2 changed files with 83 additions and 16 deletions
|
|
@ -2725,6 +2725,27 @@ final class SidebarRemoteErrorCopySupportTests: XCTestCase {
|
|||
"""
|
||||
)
|
||||
}
|
||||
|
||||
func testParsedTargetAndDetailParsesCanonicalStatusValue() {
|
||||
let parsed = SidebarRemoteErrorCopySupport.parsedTargetAndDetail(
|
||||
from: "SSH error (devbox:22): failed to bootstrap daemon"
|
||||
)
|
||||
XCTAssertEqual(parsed?.target, "devbox:22")
|
||||
XCTAssertEqual(parsed?.detail, "failed to bootstrap daemon")
|
||||
}
|
||||
|
||||
func testParsedTargetAndDetailUsesFallbackTargetWhenStatusOmitsTarget() {
|
||||
let parsed = SidebarRemoteErrorCopySupport.parsedTargetAndDetail(
|
||||
from: "SSH error: connection refused",
|
||||
fallbackTarget: "fallback-host"
|
||||
)
|
||||
XCTAssertEqual(parsed?.target, "fallback-host")
|
||||
XCTAssertEqual(parsed?.detail, "connection refused")
|
||||
}
|
||||
|
||||
func testParsedTargetAndDetailIgnoresNonSSHStatusValues() {
|
||||
XCTAssertNil(SidebarRemoteErrorCopySupport.parsedTargetAndDetail(from: "All good"))
|
||||
}
|
||||
}
|
||||
|
||||
final class WorkspaceReorderTests: XCTestCase {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue