Revert "Merge pull request #239 from manaflow-ai/issue-151-ssh-remote-port-proxying"
This reverts commit78e4bd32ba, reversing changes made tocf75da8f8a.
This commit is contained in:
parent
78e4bd32ba
commit
f7cbbad434
60 changed files with 1250 additions and 17140 deletions
|
|
@ -4782,74 +4782,6 @@ final class UpdateChannelSettingsTests: XCTestCase {
|
|||
}
|
||||
}
|
||||
|
||||
final class SidebarRemoteErrorCopySupportTests: XCTestCase {
|
||||
func testMenuLabelIsNilWhenThereAreNoErrors() {
|
||||
XCTAssertNil(SidebarRemoteErrorCopySupport.menuLabel(for: []))
|
||||
XCTAssertNil(SidebarRemoteErrorCopySupport.clipboardText(for: []))
|
||||
}
|
||||
|
||||
func testSingleErrorUsesCopyErrorLabelAndSingleLinePayload() {
|
||||
let entries = [
|
||||
SidebarRemoteErrorCopyEntry(
|
||||
workspaceTitle: "alpha",
|
||||
target: "devbox:22",
|
||||
detail: "failed to start reverse relay"
|
||||
)
|
||||
]
|
||||
|
||||
XCTAssertEqual(SidebarRemoteErrorCopySupport.menuLabel(for: entries), "Copy Error")
|
||||
XCTAssertEqual(
|
||||
SidebarRemoteErrorCopySupport.clipboardText(for: entries),
|
||||
"SSH error (devbox:22): failed to start reverse relay"
|
||||
)
|
||||
}
|
||||
|
||||
func testMultipleErrorsUseCopyErrorsLabelAndEnumeratedPayload() {
|
||||
let entries = [
|
||||
SidebarRemoteErrorCopyEntry(
|
||||
workspaceTitle: "alpha",
|
||||
target: "devbox-a:22",
|
||||
detail: "connection timed out"
|
||||
),
|
||||
SidebarRemoteErrorCopyEntry(
|
||||
workspaceTitle: "beta",
|
||||
target: "devbox-b:22",
|
||||
detail: "permission denied"
|
||||
),
|
||||
]
|
||||
|
||||
XCTAssertEqual(SidebarRemoteErrorCopySupport.menuLabel(for: entries), "Copy Errors")
|
||||
XCTAssertEqual(
|
||||
SidebarRemoteErrorCopySupport.clipboardText(for: entries),
|
||||
"""
|
||||
1. alpha (devbox-a:22): connection timed out
|
||||
2. beta (devbox-b:22): permission denied
|
||||
"""
|
||||
)
|
||||
}
|
||||
|
||||
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 {
|
||||
@MainActor
|
||||
func testReorderWorkspaceMovesWorkspaceToRequestedIndex() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue