Skip to content

TestFoundation: excise FTPServer #2266

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 1 commit into from
May 15, 2019
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
3 changes: 3 additions & 0 deletions TestFoundation/FTPServer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//

#if !os(Windows)
//This is a very rudimentary FTP server written plainly for testing URLSession FTP Implementation.
import Dispatch

Expand Down Expand Up @@ -283,3 +285,4 @@ class LoopbackFTPServerTest: XCTestCase {
serverReady.wait(timeout: timeout)
}
}
#endif
2 changes: 2 additions & 0 deletions TestFoundation/TestURLSessionFTP.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//

#if !os(Windows)
#if DEPLOYMENT_RUNTIME_OBJC || os(Linux)
import Foundation
import XCTest
Expand Down Expand Up @@ -121,3 +122,4 @@ extension FTPDataTask : URLSessionTaskDelegate {
self.error = true
}
}
#endif
7 changes: 6 additions & 1 deletion TestFoundation/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,12 @@ var allTestCases = [
testCase(TestMeasurement.allTests),
testCase(TestNSLock.allTests),
testCase(TestNSSortDescriptor.allTests),
testCase(TestURLSessionFTP.allTests),
]

#if !os(Windows)
allTestCases.append(contentsOf: [
testCase(TestURLSessionFTP.allTests),
])
#endif

XCTMain(allTestCases)