Skip to content

Commit

Permalink
Added proxy tests to iphone test target
Browse files Browse the repository at this point in the history
Remove debugging logs
  • Loading branch information
pokeb committed Aug 2, 2009
1 parent a6b463d commit 0d05591
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Classes/ASIHTTPRequest.m
Expand Up @@ -1196,7 +1196,7 @@ - (BOOL)applyProxyCredentials:(NSMutableDictionary *)newCredentials
[self setProxyAuthenticationRetryCount:[self proxyAuthenticationRetryCount]+1]; [self setProxyAuthenticationRetryCount:[self proxyAuthenticationRetryCount]+1];


if (newCredentials && proxyAuthentication && request) { if (newCredentials && proxyAuthentication && request) {
NSLog(@"%@",newCredentials);
// Apply whatever credentials we've built up to the old request // Apply whatever credentials we've built up to the old request
if (CFHTTPMessageApplyCredentialDictionary(request, proxyAuthentication, (CFMutableDictionaryRef)newCredentials, NULL)) { if (CFHTTPMessageApplyCredentialDictionary(request, proxyAuthentication, (CFMutableDictionaryRef)newCredentials, NULL)) {


Expand Down
4 changes: 2 additions & 2 deletions Classes/Tests/ProxyTests.m
Expand Up @@ -25,7 +25,7 @@ - (void)testAutoConfigureWithPAC
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:@"http://allseeing-i.com"]]; ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:@"http://allseeing-i.com"]];
[request setPACurl:[NSURL URLWithString:pacurl]]; [request setPACurl:[NSURL URLWithString:pacurl]];
[request start]; [request start];
NSLog(@"%@",[request proxyHost]);
BOOL success = [[request proxyHost] isEqualToString:@"proxy1.apple.com"]; BOOL success = [[request proxyHost] isEqualToString:@"proxy1.apple.com"];
GHAssertTrue(success,@"Failed to use the correct proxy"); GHAssertTrue(success,@"Failed to use the correct proxy");


Expand All @@ -40,7 +40,7 @@ - (void)testAutoConfigureWithSystemPAC
// To run this test, specify the pac script above in your network settings // To run this test, specify the pac script above in your network settings
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:@"http://allseeing-i.com"]]; ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:@"http://allseeing-i.com"]];
[request start]; [request start];
NSLog(@"%@",[request proxyHost]);
BOOL success = [[request proxyHost] isEqualToString:@"proxy1.apple.com"]; BOOL success = [[request proxyHost] isEqualToString:@"proxy1.apple.com"];
GHAssertTrue(success,@"Failed to use the correct proxy"); GHAssertTrue(success,@"Failed to use the correct proxy");


Expand Down
2 changes: 0 additions & 2 deletions Mac.xcodeproj/project.pbxproj
Expand Up @@ -9,7 +9,6 @@
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
B502441B1025D36B002B13E1 /* ProxyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B502441A1025D36B002B13E1 /* ProxyTests.m */; }; B502441B1025D36B002B13E1 /* ProxyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B502441A1025D36B002B13E1 /* ProxyTests.m */; };
B51791291024BF0F00583567 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B51791281024BF0F00583567 /* Security.framework */; };
B51E5F3B100B829D004A300D /* ASIS3BucketObject.m in Sources */ = {isa = PBXBuildFile; fileRef = B51E5F3A100B829D004A300D /* ASIS3BucketObject.m */; }; B51E5F3B100B829D004A300D /* ASIS3BucketObject.m in Sources */ = {isa = PBXBuildFile; fileRef = B51E5F3A100B829D004A300D /* ASIS3BucketObject.m */; };
B51E5F3C100B829D004A300D /* ASIS3BucketObject.m in Sources */ = {isa = PBXBuildFile; fileRef = B51E5F3A100B829D004A300D /* ASIS3BucketObject.m */; }; B51E5F3C100B829D004A300D /* ASIS3BucketObject.m in Sources */ = {isa = PBXBuildFile; fileRef = B51E5F3A100B829D004A300D /* ASIS3BucketObject.m */; };
B51E5F56100B83F7004A300D /* ASIS3ListRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = B51E5F55100B83F7004A300D /* ASIS3ListRequest.m */; }; B51E5F56100B83F7004A300D /* ASIS3ListRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = B51E5F55100B83F7004A300D /* ASIS3ListRequest.m */; };
Expand Down Expand Up @@ -120,7 +119,6 @@
B55B60140F7659A30064029C /* libz.1.2.3.dylib in Frameworks */, B55B60140F7659A30064029C /* libz.1.2.3.dylib in Frameworks */,
B5B513680FBEE435002C74D0 /* GHUnit.framework in Frameworks */, B5B513680FBEE435002C74D0 /* GHUnit.framework in Frameworks */,
B53FADE80FF38B2A002E2DE6 /* SystemConfiguration.framework in Frameworks */, B53FADE80FF38B2A002E2DE6 /* SystemConfiguration.framework in Frameworks */,
B51791291024BF0F00583567 /* Security.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
Expand Down
6 changes: 6 additions & 0 deletions iPhone.xcodeproj/project.pbxproj
Expand Up @@ -17,6 +17,7 @@
B522EF78101C795F00A902FC /* RunTests.sh in Resources */ = {isa = PBXBuildFile; fileRef = B522EF72101C795F00A902FC /* RunTests.sh */; }; B522EF78101C795F00A902FC /* RunTests.sh in Resources */ = {isa = PBXBuildFile; fileRef = B522EF72101C795F00A902FC /* RunTests.sh */; };
B522EF79101C795F00A902FC /* GHUnitIPhoneTestMain.m in Sources */ = {isa = PBXBuildFile; fileRef = B522EF76101C795F00A902FC /* GHUnitIPhoneTestMain.m */; }; B522EF79101C795F00A902FC /* GHUnitIPhoneTestMain.m in Sources */ = {isa = PBXBuildFile; fileRef = B522EF76101C795F00A902FC /* GHUnitIPhoneTestMain.m */; };
B522EF7A101C795F00A902FC /* libGHUnitIPhone3_0.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B522EF77101C795F00A902FC /* libGHUnitIPhone3_0.a */; }; B522EF7A101C795F00A902FC /* libGHUnitIPhone3_0.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B522EF77101C795F00A902FC /* libGHUnitIPhone3_0.a */; };
B5254FF91025F9BF00CF7BC4 /* ProxyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B5254FF71025F9BF00CF7BC4 /* ProxyTests.m */; };
B55B604D0F765A320064029C /* ASIFormDataRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = B55B60460F765A320064029C /* ASIFormDataRequest.m */; }; B55B604D0F765A320064029C /* ASIFormDataRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = B55B60460F765A320064029C /* ASIFormDataRequest.m */; };
B55B604E0F765A320064029C /* ASIHTTPRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = B55B60480F765A320064029C /* ASIHTTPRequest.m */; }; B55B604E0F765A320064029C /* ASIHTTPRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = B55B60480F765A320064029C /* ASIHTTPRequest.m */; };
B55B604F0F765A320064029C /* ASINetworkQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = B55B604A0F765A320064029C /* ASINetworkQueue.m */; }; B55B604F0F765A320064029C /* ASINetworkQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = B55B604A0F765A320064029C /* ASINetworkQueue.m */; };
Expand Down Expand Up @@ -77,6 +78,8 @@
B522EF75101C795F00A902FC /* GHTestGroup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHTestGroup.h; path = Frameworks/libGHUnitIPhone/GHTestGroup.h; sourceTree = SOURCE_ROOT; }; B522EF75101C795F00A902FC /* GHTestGroup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHTestGroup.h; path = Frameworks/libGHUnitIPhone/GHTestGroup.h; sourceTree = SOURCE_ROOT; };
B522EF76101C795F00A902FC /* GHUnitIPhoneTestMain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GHUnitIPhoneTestMain.m; path = Frameworks/libGHUnitIPhone/GHUnitIPhoneTestMain.m; sourceTree = SOURCE_ROOT; }; B522EF76101C795F00A902FC /* GHUnitIPhoneTestMain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GHUnitIPhoneTestMain.m; path = Frameworks/libGHUnitIPhone/GHUnitIPhoneTestMain.m; sourceTree = SOURCE_ROOT; };
B522EF77101C795F00A902FC /* libGHUnitIPhone3_0.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libGHUnitIPhone3_0.a; path = Frameworks/libGHUnitIPhone/libGHUnitIPhone3_0.a; sourceTree = SOURCE_ROOT; }; B522EF77101C795F00A902FC /* libGHUnitIPhone3_0.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libGHUnitIPhone3_0.a; path = Frameworks/libGHUnitIPhone/libGHUnitIPhone3_0.a; sourceTree = SOURCE_ROOT; };
B5254FF71025F9BF00CF7BC4 /* ProxyTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProxyTests.m; sourceTree = "<group>"; };
B5254FF81025F9BF00CF7BC4 /* ProxyTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProxyTests.h; sourceTree = "<group>"; };
B55B60450F765A320064029C /* ASIFormDataRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASIFormDataRequest.h; sourceTree = "<group>"; }; B55B60450F765A320064029C /* ASIFormDataRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASIFormDataRequest.h; sourceTree = "<group>"; };
B55B60460F765A320064029C /* ASIFormDataRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASIFormDataRequest.m; sourceTree = "<group>"; }; B55B60460F765A320064029C /* ASIFormDataRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASIFormDataRequest.m; sourceTree = "<group>"; };
B55B60470F765A320064029C /* ASIHTTPRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASIHTTPRequest.h; sourceTree = "<group>"; }; B55B60470F765A320064029C /* ASIHTTPRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASIHTTPRequest.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -254,6 +257,8 @@
B55B60570F765A3C0064029C /* ASINetworkQueueTests.m */, B55B60570F765A3C0064029C /* ASINetworkQueueTests.m */,
B5C6663C100A82D7004F3C96 /* ASIS3RequestTests.h */, B5C6663C100A82D7004F3C96 /* ASIS3RequestTests.h */,
B5C6663D100A82D7004F3C96 /* ASIS3RequestTests.m */, B5C6663D100A82D7004F3C96 /* ASIS3RequestTests.m */,
B5254FF81025F9BF00CF7BC4 /* ProxyTests.h */,
B5254FF71025F9BF00CF7BC4 /* ProxyTests.m */,
); );
path = Tests; path = Tests;
sourceTree = "<group>"; sourceTree = "<group>";
Expand Down Expand Up @@ -409,6 +414,7 @@
B5E2A9AC100C89D900B70E26 /* ASIS3ListRequest.m in Sources */, B5E2A9AC100C89D900B70E26 /* ASIS3ListRequest.m in Sources */,
B522EF79101C795F00A902FC /* GHUnitIPhoneTestMain.m in Sources */, B522EF79101C795F00A902FC /* GHUnitIPhoneTestMain.m in Sources */,
B5652920101C8BD7000499CF /* ASITestCase.m in Sources */, B5652920101C8BD7000499CF /* ASITestCase.m in Sources */,
B5254FF91025F9BF00CF7BC4 /* ProxyTests.m in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
Expand Down

0 comments on commit 0d05591

Please sign in to comment.