aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/GRPCClient/GRPCCall+Tests.m
diff options
context:
space:
mode:
authorGravatar vjpai <vpai@google.com>2015-11-02 09:22:10 -0800
committerGravatar vjpai <vpai@google.com>2015-11-02 09:22:10 -0800
commit11537dc71c2ceabf0a1e7f999f6c0e97f90c9f24 (patch)
tree988df3540106ca35309f2cfc8f91e14474e03564 /src/objective-c/GRPCClient/GRPCCall+Tests.m
parent72a633213815f19ac04b51331287e3f7b075dcc1 (diff)
parent89ea0c78151b5bdc4c9236ae7100a7b97b32e499 (diff)
Merge remote-tracking branch 'upstream/master' into protosplit
Diffstat (limited to 'src/objective-c/GRPCClient/GRPCCall+Tests.m')
-rw-r--r--src/objective-c/GRPCClient/GRPCCall+Tests.m3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/objective-c/GRPCClient/GRPCCall+Tests.m b/src/objective-c/GRPCClient/GRPCCall+Tests.m
index bade0b2920..c8e8133703 100644
--- a/src/objective-c/GRPCClient/GRPCCall+Tests.m
+++ b/src/objective-c/GRPCClient/GRPCCall+Tests.m
@@ -40,6 +40,9 @@
+ (void)useTestCertsPath:(NSString *)certsPath
testName:(NSString *)testName
forHost:(NSString *)host {
+ if (!host || !certsPath || !testName) {
+ [NSException raise:NSInvalidArgumentException format:@"host, path and name must be provided."];
+ }
GRPCHost *hostConfig = [GRPCHost hostWithAddress:host];
hostConfig.pathToCertificates = certsPath;
hostConfig.hostNameOverride = testName;