aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Jorge Canizales <jcanizales@google.com>2015-10-28 14:46:23 -0700
committerGravatar Jorge Canizales <jcanizales@google.com>2015-10-28 14:46:23 -0700
commit54fa62e3db569d6a06e1cd0042619eb3ba81ef41 (patch)
treefaf383aa4f202dbe37a52d955ef68bc328923d39 /src
parentea4955e2c43d469a9e4b9ef5980f40f18ddb1e5b (diff)
Reject nils in useTestCertsPath:testName:forHost:
Diffstat (limited to 'src')
-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;