diff --git a/Package.swift b/Package.swift index 22685639c..69921e611 100644 --- a/Package.swift +++ b/Package.swift @@ -65,6 +65,8 @@ let package = Package( name: "GRPCTests", dependencies: [ "GRPC", + "EchoModel", + "EchoImplementation", "GRPCSampleData", "GRPCInteroperabilityTestsImplementation" ] diff --git a/Tests/GRPCTests/AnyServiceClientTests.swift b/Tests/GRPCTests/AnyServiceClientTests.swift index 8673547b1..588d1bc3b 100644 --- a/Tests/GRPCTests/AnyServiceClientTests.swift +++ b/Tests/GRPCTests/AnyServiceClientTests.swift @@ -15,6 +15,7 @@ */ import Foundation import GRPC +import EchoModel import XCTest class AnyServiceClientTests: EchoTestCaseBase { diff --git a/Tests/GRPCTests/BasicEchoTestCase.swift b/Tests/GRPCTests/BasicEchoTestCase.swift index 404fbb550..84ce0bdf1 100644 --- a/Tests/GRPCTests/BasicEchoTestCase.swift +++ b/Tests/GRPCTests/BasicEchoTestCase.swift @@ -19,17 +19,23 @@ import NIO import NIOSSL import GRPC import GRPCSampleData +import EchoModel +import EchoImplementation import XCTest extension Echo_EchoRequest { init(text: String) { - self.text = text + self = .with { + $0.text = text + } } } extension Echo_EchoResponse { init(text: String) { - self.text = text + self = .with { + $0.text = text + } } } diff --git a/Tests/GRPCTests/ClientCancellingTests.swift b/Tests/GRPCTests/ClientCancellingTests.swift index 2911390f2..c253c64f6 100644 --- a/Tests/GRPCTests/ClientCancellingTests.swift +++ b/Tests/GRPCTests/ClientCancellingTests.swift @@ -15,6 +15,7 @@ */ import Foundation import GRPC +import EchoModel import XCTest class ClientCancellingTests: EchoTestCaseBase { diff --git a/Tests/GRPCTests/ClientClosedChannelTests.swift b/Tests/GRPCTests/ClientClosedChannelTests.swift index 222344892..803bd5039 100644 --- a/Tests/GRPCTests/ClientClosedChannelTests.swift +++ b/Tests/GRPCTests/ClientClosedChannelTests.swift @@ -15,6 +15,7 @@ */ import Foundation import GRPC +import EchoModel import NIO import XCTest diff --git a/Tests/GRPCTests/ClientConnectionBackoffTests.swift b/Tests/GRPCTests/ClientConnectionBackoffTests.swift index ea41f5bea..43cab81bd 100644 --- a/Tests/GRPCTests/ClientConnectionBackoffTests.swift +++ b/Tests/GRPCTests/ClientConnectionBackoffTests.swift @@ -15,6 +15,8 @@ */ import Foundation import GRPC +import EchoModel +import EchoImplementation import NIO import XCTest import NIOConcurrencyHelpers diff --git a/Tests/GRPCTests/ClientTLSFailureTests.swift b/Tests/GRPCTests/ClientTLSFailureTests.swift index 3bf384526..1dbcbddba 100644 --- a/Tests/GRPCTests/ClientTLSFailureTests.swift +++ b/Tests/GRPCTests/ClientTLSFailureTests.swift @@ -16,6 +16,7 @@ import Foundation import GRPC import GRPCSampleData +import EchoImplementation import NIO import NIOSSL import XCTest diff --git a/Tests/GRPCTests/ClientTLSTests.swift b/Tests/GRPCTests/ClientTLSTests.swift index 35ae35ca0..f5f349ca2 100644 --- a/Tests/GRPCTests/ClientTLSTests.swift +++ b/Tests/GRPCTests/ClientTLSTests.swift @@ -1,6 +1,8 @@ import Foundation import GRPC import GRPCSampleData +import EchoModel +import EchoImplementation import NIO import NIOSSL import XCTest diff --git a/Tests/GRPCTests/ClientTimeoutTests.swift b/Tests/GRPCTests/ClientTimeoutTests.swift index 30b0665fb..37226d188 100644 --- a/Tests/GRPCTests/ClientTimeoutTests.swift +++ b/Tests/GRPCTests/ClientTimeoutTests.swift @@ -15,6 +15,7 @@ */ import Foundation @testable import GRPC +import EchoModel import NIO import XCTest diff --git a/Tests/GRPCTests/FunctionalTests.swift b/Tests/GRPCTests/FunctionalTests.swift index d681d3bd2..f77185530 100644 --- a/Tests/GRPCTests/FunctionalTests.swift +++ b/Tests/GRPCTests/FunctionalTests.swift @@ -19,6 +19,7 @@ import NIO import NIOHTTP1 import NIOHTTP2 @testable import GRPC +import EchoModel import XCTest class FunctionalTestsInsecureTransport: EchoTestCaseBase { diff --git a/Tests/GRPCTests/GRPCChannelHandlerResponseCapturingTestCase.swift b/Tests/GRPCTests/GRPCChannelHandlerResponseCapturingTestCase.swift index 658bdfb8a..6b0c0fd20 100644 --- a/Tests/GRPCTests/GRPCChannelHandlerResponseCapturingTestCase.swift +++ b/Tests/GRPCTests/GRPCChannelHandlerResponseCapturingTestCase.swift @@ -17,6 +17,8 @@ import Foundation import NIO import NIOHTTP1 @testable import GRPC +import EchoModel +import EchoImplementation import XCTest import Logging diff --git a/Tests/GRPCTests/GRPCChannelHandlerTests.swift b/Tests/GRPCTests/GRPCChannelHandlerTests.swift index 324833992..2dca4954a 100644 --- a/Tests/GRPCTests/GRPCChannelHandlerTests.swift +++ b/Tests/GRPCTests/GRPCChannelHandlerTests.swift @@ -18,6 +18,7 @@ import XCTest import NIO import NIOHTTP1 @testable import GRPC +import EchoModel class GRPCChannelHandlerTests: GRPCChannelHandlerResponseCapturingTestCase { func testUnimplementedMethodReturnsUnimplementedStatus() throws { diff --git a/Tests/GRPCTests/GRPCStatusCodeTests.swift b/Tests/GRPCTests/GRPCStatusCodeTests.swift index 08945dbd5..de7506360 100644 --- a/Tests/GRPCTests/GRPCStatusCodeTests.swift +++ b/Tests/GRPCTests/GRPCStatusCodeTests.swift @@ -15,6 +15,7 @@ */ import Foundation @testable import GRPC +import EchoModel import NIO import NIOHTTP1 import NIOHTTP2 diff --git a/Tests/GRPCTests/GRPCTypeSizeTests.swift b/Tests/GRPCTests/GRPCTypeSizeTests.swift index bb98edbbe..e62ba1bcc 100644 --- a/Tests/GRPCTests/GRPCTypeSizeTests.swift +++ b/Tests/GRPCTests/GRPCTypeSizeTests.swift @@ -15,6 +15,7 @@ */ import Foundation import GRPC +import EchoModel import XCTest /// These test check the size of types which get wrapped in `NIOAny`. If the size of the type is diff --git a/Tests/GRPCTests/HTTP1ToRawGRPCServerCodecTests.swift b/Tests/GRPCTests/HTTP1ToRawGRPCServerCodecTests.swift index c6258bdcd..9a05ac75c 100644 --- a/Tests/GRPCTests/HTTP1ToRawGRPCServerCodecTests.swift +++ b/Tests/GRPCTests/HTTP1ToRawGRPCServerCodecTests.swift @@ -18,6 +18,7 @@ import XCTest import NIO import NIOHTTP1 @testable import GRPC +import EchoModel import Logging func gRPCMessage(channel: EmbeddedChannel, compression: Bool = false, message: Data? = nil) -> ByteBuffer { diff --git a/Tests/GRPCTests/ImmediateServerFailureTests.swift b/Tests/GRPCTests/ImmediateServerFailureTests.swift index c6badc762..f34db89fa 100644 --- a/Tests/GRPCTests/ImmediateServerFailureTests.swift +++ b/Tests/GRPCTests/ImmediateServerFailureTests.swift @@ -15,6 +15,7 @@ */ import Foundation import GRPC +import EchoModel import NIO import XCTest diff --git a/Tests/GRPCTests/ServerThrowingTests.swift b/Tests/GRPCTests/ServerThrowingTests.swift index 35b28a648..407ffd5bb 100644 --- a/Tests/GRPCTests/ServerThrowingTests.swift +++ b/Tests/GRPCTests/ServerThrowingTests.swift @@ -19,6 +19,7 @@ import NIO import NIOHTTP1 import NIOHTTP2 @testable import GRPC +import EchoModel import XCTest let thrownError = GRPCStatus(code: .internalError, message: "expected error") diff --git a/Tests/GRPCTests/ServerWebTests.swift b/Tests/GRPCTests/ServerWebTests.swift index dc9567ce5..87a369035 100644 --- a/Tests/GRPCTests/ServerWebTests.swift +++ b/Tests/GRPCTests/ServerWebTests.swift @@ -16,6 +16,7 @@ import Foundation import NIO @testable import GRPC +import EchoModel import XCTest // Only test Unary and ServerStreaming, as ClientStreaming is not diff --git a/Tests/GRPCTests/StreamingRequestClientCallTests.swift b/Tests/GRPCTests/StreamingRequestClientCallTests.swift index 52c50416e..d85b77594 100644 --- a/Tests/GRPCTests/StreamingRequestClientCallTests.swift +++ b/Tests/GRPCTests/StreamingRequestClientCallTests.swift @@ -15,6 +15,7 @@ */ import Foundation import GRPC +import EchoModel import XCTest class StreamingRequestClientCallTests: EchoTestCaseBase {