From 34ca0496fcb717bf50fe859893ebd59299ab60b0 Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Wed, 16 Jan 2019 12:16:22 +0100 Subject: [PATCH] [XHarness] Reneable the SystemNetHttpTests on iOS, TvOS and WatchOS. (#5405) Failing iOS tests are ignored WatchOS is running the iOS tests until we have the tests in the SDK for the watch runtime. Fixes https://github.com/xamarin/maccore/issues/1144 Fixes https://github.com/xamarin/maccore/issues/1145 Mono issue: https://github.com/mono/mono/issues/12430 --- tests/bcl-test/BCLTests/Info-tv.plist.in | 5 ++ .../BCLTests/Info-watchos-extension.plist.in | 5 ++ tests/bcl-test/BCLTests/Info.plist | 5 ++ tests/bcl-test/BCLTests/Info.plist.in | 5 ++ .../BCLTests/common-SystemNetHttpTests.ignore | 67 +++++++++++++++++++ .../watchOS-SystemNetHttpTests.ignore | 21 ++++++ .../BCLTestProjectGenerator.cs | 1 - 7 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 tests/bcl-test/BCLTests/common-SystemNetHttpTests.ignore create mode 100644 tests/bcl-test/BCLTests/watchOS-SystemNetHttpTests.ignore diff --git a/tests/bcl-test/BCLTests/Info-tv.plist.in b/tests/bcl-test/BCLTests/Info-tv.plist.in index bdf043c049..308ce7b72a 100644 --- a/tests/bcl-test/BCLTests/Info-tv.plist.in +++ b/tests/bcl-test/BCLTests/Info-tv.plist.in @@ -31,5 +31,10 @@ XSAppIconAssets Assets.xcassets/AppIcon.appiconset + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + diff --git a/tests/bcl-test/BCLTests/Info-watchos-extension.plist.in b/tests/bcl-test/BCLTests/Info-watchos-extension.plist.in index 704d169a78..04f9e91831 100644 --- a/tests/bcl-test/BCLTests/Info-watchos-extension.plist.in +++ b/tests/bcl-test/BCLTests/Info-watchos-extension.plist.in @@ -35,5 +35,10 @@ NSExtensionPointIdentifier com.apple.watchkit + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + \ No newline at end of file diff --git a/tests/bcl-test/BCLTests/Info.plist b/tests/bcl-test/BCLTests/Info.plist index 893de599b9..f9f8b6b371 100644 --- a/tests/bcl-test/BCLTests/Info.plist +++ b/tests/bcl-test/BCLTests/Info.plist @@ -32,5 +32,10 @@ XSAppIconAssets Assets.xcassets/AppIcon.appiconset + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + diff --git a/tests/bcl-test/BCLTests/Info.plist.in b/tests/bcl-test/BCLTests/Info.plist.in index 17e2856406..9d76fbe141 100644 --- a/tests/bcl-test/BCLTests/Info.plist.in +++ b/tests/bcl-test/BCLTests/Info.plist.in @@ -32,5 +32,10 @@ XSAppIconAssets Assets.xcassets/AppIcon.appiconset + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + diff --git a/tests/bcl-test/BCLTests/common-SystemNetHttpTests.ignore b/tests/bcl-test/BCLTests/common-SystemNetHttpTests.ignore new file mode 100644 index 0000000000..5f2071def1 --- /dev/null +++ b/tests/bcl-test/BCLTests/common-SystemNetHttpTests.ignore @@ -0,0 +1,67 @@ +# #1 +# Expected: instance of +# But was: +MonoTests.System.Net.Http.HttpClientTest.WildcardConnect +MonoTests.System.Net.Http.HttpClientTest.Send_Transfer_Encoding_Custom + +# #102 +# Expected: False +# But was: True +MonoTests.System.Net.Http.HttpClientTest.Send_Transfer_Encoding_Chunked + +# #2 +# Expected: True +# But was: False +MonoTests.System.Net.Http.HttpClientTest.Send_Content_Put_CustomStream + +# #102 +# Expected: False +# But was: True +MonoTests.System.Net.Http.HttpClientTest.Send_Complete_Version_1_0 + +# #102 +# Expected: False +# But was: True +MonoTests.System.Net.Http.HttpClientTest.Send_Complete_NoContent_Put + +# #102 +# Expected: False +# But was: True +MonoTests.System.Net.Http.HttpClientTest.Send_Complete_NoContent_Post + +# #102 +# Expected: False +# But was: True +MonoTests.System.Net.Http.HttpClientTest.Send_Complete_NoContent_Delete + +# #102 +# Expected: False +# But was: True +MonoTests.System.Net.Http.HttpClientTest.Send_Complete_Default + +# #103a +# Expected string length 7 but was 8. Strings differ at index 0. +# Expected: "chunked" +# But was: "Identity" +MonoTests.System.Net.Http.HttpClientTest.Send_Complete_CustomHeaders + +# #102a +# Expected string length 7 but was 8. Strings differ at index 0. +# Expected: "chunked" +# But was: "Identity" +MonoTests.System.Net.Http.HttpClientTest.Send_Complete_Content + +# #102 +# Expected: False +# But was: True +MonoTests.System.Net.Http.HttpClientTest.Post_TransferEncodingChunked + +# #102 +# Expected: False +# But was: True +MonoTests.System.Net.Http.HttpClientTest.Post_StreamCaching + +# #3 +# Expected: True +# But was: False +MonoTests.System.Net.Http.HttpClientTest.Send_Complete_Content_MaxResponseContentBufferSize_Error \ No newline at end of file diff --git a/tests/bcl-test/BCLTests/watchOS-SystemNetHttpTests.ignore b/tests/bcl-test/BCLTests/watchOS-SystemNetHttpTests.ignore new file mode 100644 index 0000000000..1e426e3e50 --- /dev/null +++ b/tests/bcl-test/BCLTests/watchOS-SystemNetHttpTests.ignore @@ -0,0 +1,21 @@ +# System.PlatformNotSupportedException : System.Net.Sockets.Socket:Bind is not supported on this platform. +MonoTests.System.Net.Http.HttpClientTest.Send_Complete_ClientHandlerSettings +MonoTests.System.Net.Http.HttpClientTest.RequestUriAfterRedirect +MonoTests.System.Net.Http.HttpClientTest.Proxy_Disabled +MonoTests.System.Net.Http.HttpClientTest.ModifyHandlerAfterFirstRequest_Mock +MonoTests.System.Net.Http.HttpClientTest.ModifyHandlerAfterFirstRequest +MonoTests.System.Net.Http.HttpClientTest.DisallowAutoRedirect +MonoTests.System.Net.Http.HttpClientTest.CancelRequestViaProxy +MonoTests.System.Net.Http.HttpClientHandlerTest.Properties_Invalid +MonoTests.System.Net.Http.HttpClientHandlerTest.Properties_Defaults +MonoTests.System.Net.Http.HttpClientHandlerTest.Properties_AfterClientCreation +MonoTests.System.Net.Http.HttpClientHandlerTest.Disposed +MonoTests.System.Net.Http.HttpClientTest.GetByteArray_ServerError +MonoTests.System.Net.Http.HttpClientTest.GetString_Many +MonoTests.System.Net.Http.HttpClientTest.Send_Complete_Content_MaxResponseContentBufferSize +MonoTests.System.Net.Http.HttpClientTest.Send_Complete_CustomHeaders_Host +MonoTests.System.Net.Http.HttpClientTest.Send_Complete_CustomHeaders_SpecialSeparators +MonoTests.System.Net.Http.HttpClientTest.Send_Complete_Error +MonoTests.System.Net.Http.HttpClientTest.Send_Content_BomEncoding +MonoTests.System.Net.Http.HttpClientTest.Send_Content_Get +MonoTests.System.Net.Http.HttpClientTest.Send_Content_Put \ No newline at end of file diff --git a/tools/bcl-test-importer/BCLTestImporter/BCLTestProjectGenerator.cs b/tools/bcl-test-importer/BCLTestImporter/BCLTestProjectGenerator.cs index f5b305e6a9..ee3afd6129 100644 --- a/tools/bcl-test-importer/BCLTestImporter/BCLTestProjectGenerator.cs +++ b/tools/bcl-test-importer/BCLTestImporter/BCLTestProjectGenerator.cs @@ -112,7 +112,6 @@ namespace BCLTestImporter { "monotouch_System.Transactions_test.dll", // issue https://github.com/xamarin/maccore/issues/1134 "monotouch_System_test.dll", // issues https://github.com/xamarin/maccore/issues/1135 "monotouch_System.Security_test.dll", // issue https://github.com/xamarin/maccore/issues/1139 - "monotouch_System.Net.Http_test.dll", // issue https://github.com/xamarin/maccore/issues/1144 and https://github.com/xamarin/maccore/issues/1145 "monotouch_corlib_test.dll", // issue https://github.com/xamarin/maccore/issues/1153 "monotouch_Commons.Xml.Relaxng_test.dll", // not supported by xamarin "monotouch_Cscompmgd_test.dll", // not supported by xamarin