aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Jorge Canizales <jcanizales@google.com>2015-07-31 17:40:59 -0700
committerGravatar Jorge Canizales <jcanizales@google.com>2015-08-06 11:40:18 -0700
commit945f72cff9a94f2ab613e8cb3d9460a6dfbc1810 (patch)
treeea9923b6438e347d71789c4a3079264a46b2e0f0
parentcdabaca649b63822d57ad6859d5e353285c7a25b (diff)
Make the host of interop tests modifiable per-class
-rw-r--r--src/objective-c/tests/InteropTests.m10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/objective-c/tests/InteropTests.m b/src/objective-c/tests/InteropTests.m
index b473d73422..5f7bfb27da 100644
--- a/src/objective-c/tests/InteropTests.m
+++ b/src/objective-c/tests/InteropTests.m
@@ -77,16 +77,22 @@
@end
@interface InteropTests : XCTestCase
+// Returns @"http://localhost:5050".
+// Override in a subclass to perform the same tests against a different address.
+// For interop tests, use @"grpc-test.sandbox.google.com".
++ (NSString *)host;
@end
@implementation InteropTests {
RMTTestService *_service;
}
-// grpc-test.sandbox.google.com
++ (NSString *)host {
+ return @"http://localhost:5050";
+}
- (void)setUp {
- _service = [[RMTTestService alloc] initWithHost:@"http://localhost:5050"];
+ _service = [[RMTTestService alloc] initWithHost:self.class.host];
}
// Tests as described here: https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md