Skip to content

Commit

Permalink
allow remote xctest connections w/ a flag
Browse files Browse the repository at this point in the history
  • Loading branch information
herval committed Dec 9, 2024
1 parent f79dcb7 commit c7e9fb9
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ enum Route: String, CaseIterable {
struct XCTestHTTPServer {
func start() async throws {
let port = ProcessInfo.processInfo.environment["PORT"]?.toUInt16()
let server = HTTPServer(address: .loopback(port: port ?? 22087), timeout: 100)

let acceptRemoteConnections = ProcessInfo.processInfo.environment["ACCEPT_REMOTE_CONNECTIONS"] == "true"

let address: HTTPServer.Address = acceptRemoteConnections ? .any(port: port) : .loopback(port: port)

Check failure on line 31 in maestro-ios-xctest-runner/maestro-driver-iosUITests/Routes/XCTestHTTPServer.swift

View workflow job for this annotation

GitHub Actions / Build on Java 11

'Address' is not a member type of actor 'FlyingFox.HTTPServer'

Check failure on line 31 in maestro-ios-xctest-runner/maestro-driver-iosUITests/Routes/XCTestHTTPServer.swift

View workflow job for this annotation

GitHub Actions / Build on Java 17

'Address' is not a member type of actor 'FlyingFox.HTTPServer'

for route in Route.allCases {
let handler = await RouteHandlerFactory.createRouteHandler(route: route)
await server.appendRoute(route.toHTTPRoute(), to: handler)

Check failure on line 35 in maestro-ios-xctest-runner/maestro-driver-iosUITests/Routes/XCTestHTTPServer.swift

View workflow job for this annotation

GitHub Actions / Build on Java 11

cannot find 'server' in scope

Check failure on line 35 in maestro-ios-xctest-runner/maestro-driver-iosUITests/Routes/XCTestHTTPServer.swift

View workflow job for this annotation

GitHub Actions / Build on Java 17

cannot find 'server' in scope
Expand Down

0 comments on commit c7e9fb9

Please sign in to comment.