Skip to content

Commit

Permalink
Make the host of interop tests modifiable per-class
Browse files Browse the repository at this point in the history
  • Loading branch information
jcanizales committed Aug 6, 2015
1 parent cdabaca commit 945f72c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/objective-c/tests/InteropTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,22 @@ + (instancetype)messageWithPayloadSize:(NSNumber *)payloadSize {
@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
Expand Down

0 comments on commit 945f72c

Please sign in to comment.