From 945f72cff9a94f2ab613e8cb3d9460a6dfbc1810 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Fri, 31 Jul 2015 17:40:59 -0700 Subject: [PATCH] Make the host of interop tests modifiable per-class --- src/objective-c/tests/InteropTests.m | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/objective-c/tests/InteropTests.m b/src/objective-c/tests/InteropTests.m index b473d73422f..5f7bfb27da1 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