try fixing objC user-agent string tests

pull/20191/head
Jan Tattermusch 5 years ago
parent 0ac1f04ecc
commit de26b12e24
  1. 7
      src/objective-c/tests/UnitTests/APIv2Tests.m
  2. 5
      src/objective-c/tests/UnitTests/GRPCClientTests.m

@ -235,12 +235,7 @@ static const NSTimeInterval kInvertedTimeout = 2;
expectedUserAgent = [expectedUserAgent stringByAppendingString:@" ("];
expectedUserAgent =
[expectedUserAgent stringByAppendingString:@GPR_PLATFORM_STRING];
expectedUserAgent =
[expectedUserAgent stringByAppendingString:@"; chttp2; "];
expectedUserAgent = [expectedUserAgent
stringByAppendingString:[NSString
stringWithUTF8String:grpc_g_stands_for()]];
expectedUserAgent = [expectedUserAgent stringByAppendingString:@")"];
expectedUserAgent = [expectedUserAgent stringByAppendingString:@"; chttp2)"];
XCTAssertEqualObjects(userAgent, expectedUserAgent);
NSError *error = nil;

@ -307,10 +307,7 @@ static GRPCProtoMethod *kFullDuplexCallMethod;
expectedUserAgent = [expectedUserAgent stringByAppendingString:GRPC_C_VERSION_STRING];
expectedUserAgent = [expectedUserAgent stringByAppendingString:@" ("];
expectedUserAgent = [expectedUserAgent stringByAppendingString:@GPR_PLATFORM_STRING];
expectedUserAgent = [expectedUserAgent stringByAppendingString:@"; chttp2; "];
expectedUserAgent = [expectedUserAgent
stringByAppendingString:[NSString stringWithUTF8String:grpc_g_stands_for()]];
expectedUserAgent = [expectedUserAgent stringByAppendingString:@")"];
expectedUserAgent = [expectedUserAgent stringByAppendingString:@"; chttp2)"];
XCTAssertEqualObjects(userAgent, expectedUserAgent);
// Change in format of user-agent field in a direction that does not match the regex will

Loading…
Cancel
Save