aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/tests/InteropTests.m
diff options
context:
space:
mode:
Diffstat (limited to 'src/objective-c/tests/InteropTests.m')
-rw-r--r--src/objective-c/tests/InteropTests.m22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/objective-c/tests/InteropTests.m b/src/objective-c/tests/InteropTests.m
index b473d73422..b61d567464 100644
--- a/src/objective-c/tests/InteropTests.m
+++ b/src/objective-c/tests/InteropTests.m
@@ -31,11 +31,11 @@
*
*/
-#include <grpc/status.h>
+#import "InteropTests.h"
-#import <UIKit/UIKit.h>
-#import <XCTest/XCTest.h>
+#include <grpc/status.h>
+#import <GRPCClient/GRPCCall+Tests.h>
#import <ProtoRPC/ProtoRPC.h>
#import <RemoteTest/Empty.pbobjc.h>
#import <RemoteTest/Messages.pbobjc.h>
@@ -76,20 +76,24 @@
}
@end
-@interface InteropTests : XCTestCase
-@end
+#pragma mark Tests
+
+static NSString * const kLocalCleartextHost = @"localhost:5050";
@implementation InteropTests {
RMTTestService *_service;
}
-// grpc-test.sandbox.google.com
++ (NSString *)host {
+ return kLocalCleartextHost;
+}
- (void)setUp {
- _service = [[RMTTestService alloc] initWithHost:@"http://localhost:5050"];
-}
+ // Register test server as non-SSL.
+ [GRPCCall useInsecureConnectionsForHost:kLocalCleartextHost];
-// Tests as described here: https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md
+ _service = [[RMTTestService alloc] initWithHost:self.class.host];
+}
- (void)testEmptyUnaryRPC {
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"EmptyUnary"];