Commit Graph
53 Commits
Author SHA1 Message Date
Eric Mellino ddb473aac9 Move corefx onto the .NET Core 2.0 toolset
Commit migrated from https://github.com/dotnet/corefx/commit/8b471f76eef041f0cf40fec65c99a29b235bbe7d
2017-04-10 14:36:01 -07:00
Tarek Mahmoud Sayed 77cad86b1e Remove versioned configuration from test projects (dotnet/corefx#15879)
The changes onclude some other minor clean up in the test project files

Commit migrated from https://github.com/dotnet/corefx/commit/62212cca900081173fce70991c3a0b30393994a3
2017-02-06 13:52:11 -08:00
Karthik Rajasekaran 4bbdadd88a Update project configuration and sln files (dotnet/corefx#15182)
* Add ValidateVSConfigurations

* Update project config and sln files.


Commit migrated from https://github.com/dotnet/corefx/commit/f6ab339f446e37505f93ef9f430801fa1dcc05b8
2017-01-17 14:31:23 -08:00
Wes Haggard 848b9b15c0 Update documentation to include how to configure builds
Updates the documentation as well as config.json file with information on
RuntimeOS and the different ways to configure BuildConfiguration.

Cleans up InputOSGroup as it is no longer needed.

Cleans up TargetOS and makes it scoped only to the test command line generation

Add debugging information for TargetOS property for test runs.


Commit migrated from https://github.com/dotnet/corefx/commit/32bb7e8b9a472c8ea97537ce0a94511b4c7ca821
2017-01-09 13:32:45 -08:00
Jose Perez Rodriguez e5529a906d Make Test projects compile against the Targeting pack. (3/3 of the work) (dotnet/corefx#14534)
Commit migrated from https://github.com/dotnet/corefx/commit/c06e46913f93aa4d4eec880410c3edb4e5039639
2016-12-15 13:12:46 -08:00
Stephen Toub 74ac16201f Override CopyToAsync on LimitMemoryStream
The base MemoryStream's CopyToAsync implementation only provides its optimizations when the concrete type of the stream is MemoryStream and not for derived streams.  This commit adds a similar optimization to to LimitMemoryStream, such that it'll write its whole buffer to the destination in a single write.


Commit migrated from https://github.com/dotnet/corefx/commit/23b4fa71707970c7828af237fcee7ac0407f88be
2016-11-14 16:58:25 -05:00
Jeremy Kuhne f05a8c4187 Move IO types into System.Runtime.Extensions (dotnet/corefx#13451)
Move all of System.IO into System.Runtime.Extensions.
Finish moving System.IO.Primitives into System.Runtime.

Commit migrated from https://github.com/dotnet/corefx/commit/55eb2f16c4ccdb6e4c50a89af5c14ac843239901
2016-11-09 14:44:50 -08:00
Cristian Pop 1fb0a8ece8 TLS SystemDefault support.
Commit migrated from https://github.com/dotnet/corefx/commit/e882577f1cdf1c6505681c0a52a532d78f03c24f
2016-11-08 16:07:26 -08:00
Eric St. John f6f23740a5 Update Http tests to target ns1.7 + ns1.3
I had to add a namespace alias due to System.Configuration now being
defined by System.Runtime.


Commit migrated from https://github.com/dotnet/corefx/commit/6e86da5cc3efb88db6b932f01c9a4f9e66e84f8c
2016-10-20 14:31:18 -07:00
Cristian Pop ba43904a93 Adding server code. Fixing IIS application deployment.
Commit migrated from https://github.com/dotnet/corefx/commit/cb0becbb7e546ffa5f265f862e76bc0fa445ec50
2016-07-13 15:29:11 -07:00
Karthik Rajasekaran 5c93b350d3 Add NugetTargetMoniker to test projects and update remaining project references to pkgproj
Commit migrated from https://github.com/dotnet/corefx/commit/13e03705ced065850dc65900fccfd930426e87d7
2016-06-29 12:30:05 -07:00
Cristian Pop 7a3d76b180 Adding multi-machine scripts and unifying configuration.
Commit migrated from https://github.com/dotnet/corefx/commit/c354b2d44f6988a20a9f7be4a1b996ef7fbc873a
2016-06-28 12:38:07 -07:00
Stephen Toub 7295751d20 Separate diagnostics tests into their own class
The only change to the logic is that the tests now use RemoteInvoke to run each test in its own process, so as to avoid EventSource and DiagnosticSource interference.

Also removed the xunit attributes from the assembly that prevented parallelization.  It's no longer needed as of this change.


Commit migrated from https://github.com/dotnet/corefx/commit/542d85e15bfe5fdeb59d7e6f7fb3b15a08640ebd
2016-06-20 14:13:10 -04:00
Christopher Costa 80bca9a4b4 Remove keepallprojectreferences
Commit migrated from https://github.com/dotnet/corefx/commit/25d4dbf46ed63abd4ff96a8f855f21c4420ae597
2016-06-07 10:15:34 -07:00
Stephen Toub ea6cd05418 Add some HttpClientHandler client certificate tests
And fix a small bug discovered from this, lack of argument validation when setting the enum value.


Commit migrated from https://github.com/dotnet/corefx/commit/483aa5a3012fe78ea001ece1b0404b18c0b90a29
2016-06-03 13:09:23 -04:00
Stephen Toub 2424c43e44 Improve tracing in CurlHandler
While debugging some HttpClient issues, I needed more tracing in CurlHandler.  It's useful to check this in to help with future investigations.


Commit migrated from https://github.com/dotnet/corefx/commit/48da5807ac281c26b34ac375755a4d83b2268a91
2016-05-27 13:19:45 -04:00
dotnet-bot 52a5140af7 Use SchSendAuxRecord in SslStream on Windows.
[tfs-changeset: 1607766]


Commit migrated from https://github.com/dotnet/corefx/commit/91f1698b5139a0f618c0248e384c32d9bbe291c5
2016-05-24 17:01:01 -07:00
David Shulman 87cf76acf3 Fix cancellation of WinHttpHandler response stream reads
Reading from the response stream using ReadAsync() was ignoring the cancellation token passed in. To fix this, registered a delegate that will be called to dispose the WinHTTP request handle during pending I/O. This will cause the WinHTTP operation to cancel.

Added tests. For now, left them disabled to be resolved in issue dotnet/corefx#8692 next week. But wanted to get this fix in asap since it blocks partners for RTM.

Fixes dotnet/corefx#8662.


Commit migrated from https://github.com/dotnet/corefx/commit/a6e019d8e1910b9fed3c1077be23bfd9023d2837
2016-05-19 10:12:09 -07:00
David Shulman c04a0f68e8 Change some System.Net.Requests tests to use LoopbackServer
Changed HttpWebResponse test to use LoopbackServer.

More tests will be changed to use this server as part of
increasing test reliability and simplifying the requirements for the Azure test server.


Commit migrated from https://github.com/dotnet/corefx/commit/3aaaf19bd94bfcac533787ed45e1c3218168b7fa
2016-05-15 20:58:50 -07:00
stephentoub f44781c5fd Add test verifying HttpClient negotiates Tls12 when None specified
Commit migrated from https://github.com/dotnet/corefx/commit/22e060a3d7735a2b64bf4f409bee91d675866d39
2016-05-15 16:31:36 -04:00
David Shulman 354c2e5b9c System.Net.Http 4.1 contract implementation
As per approved dotnet/corefx#7623, add remaining properties to HttpClientHandler for
all platforms.

Move pre-existing Unix-only Http tests to run for all platforms.

Ensure that "credentials" related properties are secure by default and have
an initial (default) value of null.


Commit migrated from https://github.com/dotnet/corefx/commit/361b66146506a58f7d2c27224cc02f9583cd0639
2016-05-14 17:07:27 -07:00
chcosta a33dd88be4 Disable system.net.http.functiona.tests and system.net.security.functional.tests from projectreference->package dependency conversion. (dotnet/corefx#8505)
Commit migrated from https://github.com/dotnet/corefx/commit/e63e09b758daca6f16d62fa82f40608d18030aa0
2016-05-13 15:11:21 -07:00
stephentoub 095291bb48 Remove CurlHandler.ConnectTimeout property
I'd added this when bringing properties from WinHttpHandler to CurlHandler in bulk, with the expectation that we might expose them.  Since we're not planning on exposing this particular property from HttpClientHandler (turns out it's not very useful in practice), I'm removing it.


Commit migrated from https://github.com/dotnet/corefx/commit/953bbe0006ce7f29c87b798eb10d072df06d6f99
2016-05-13 07:46:47 -04:00
David Shulman 6489f6d1c9 Add configurable test settings for Http and WebSocket tests (dotnet/corefx#8480)
Building on the current use of environment variables for passing in test settings, added a common test helper class to allow the http and websocket tests to access alternate test servers. This will help with load balancing and network latency issues which are causing occasional timeouts in CI tests. This will also allow developers to run their own version of the Azure test endpoints. Consolidated the current environment variables used and standardized on a naming format.

Fixes dotnet/corefx#2383.

Commit migrated from https://github.com/dotnet/corefx/commit/3603ed2578220f0ecb2f101324e04acb80fa3196
2016-05-12 14:57:03 -07:00
stephentoub b8970ee51b Add SSL support to LoopbackServer in HTTP tests
We currently make a lot of calls off-box in our unit tests.  By adding SSL support to the loopback server, we should be able to convert many more tests to avoid needing to actually hit the network.  This adds such basic support, and converts a few tests to use it.

Also, since I was moving the certificate configuration code to a central location, I fixed an issue related to cleanup.


Commit migrated from https://github.com/dotnet/corefx/commit/b90795e1d5d7e8d8c68b9ca23d53b1ba0e392f46
2016-05-10 13:55:40 -04:00
David Shulman 087e92da43 Add DefaultCredentials scenario tests
These tests require the client and server to be on a Windows Active Directory domain. These tests are Windows specific. Currently this cannot be done in the CI system. So, these tests are only enabled when an environment variable is set which points to the test server.

There is a separate todo item dotnet/corefx#4989 to provide more automated scripts for setting up the test server. For now, there is a readme file with some details.

These tests will help support fixes for dotnet/corefx#8176 and related bugs.


Commit migrated from https://github.com/dotnet/corefx/commit/4739da8c8d4965fdaf2fc45ae915297208672d15
2016-05-03 15:53:33 -07:00
Eric St. John b1119fb4ef Cleanup usage of Linux/OSX
We've standardized on using Unix in most cases where we only cross-
compile once for Unix.  This change cleans up mentions of Linux/OSX when
we aren't actually cross-compiling for those OSes.

The remaining projects that still cross-compile for Linux/OSX are:
  System.Diagnostics.Process
  System.IO.FileSystem.Watcher
  System.Net.NetworkInformation

The System.Net.Security functional tests seem to still have a distinct
difference in functional behavior on OSX so I have also left these
configured to cross-compile for Linux/OSX.


Commit migrated from https://github.com/dotnet/corefx/commit/16ee317fa4e194ff7cf61e923caf103909e391f1
2016-04-26 14:37:21 -07:00
stephentoub 6c4c36cd4d Add several outerloop HttpClient tests
Several "mini-stress" tests that verify HttpClient doesn't completely fall over under some load:
- Use one HttpClient instance to make many requests serially and in parallel
- Use multiple HttpClient instances to make many requests serially and in parallel
- Ensure that HttpResponseMessages can be GCd even if the associated response hasn't been fully drained.  This one fails right now on unix due to an open issue.


Commit migrated from https://github.com/dotnet/corefx/commit/4358712d3db870725a394478702e643018af52bf
2016-04-22 18:22:41 -04:00
David Shulman dbbd669af6 Initial System.Net.Http 4.1 contract
To support important customer scenarios for CoreFx RTM, we will be updating the System.Net.Http contract from 4.0 to 4.1. We are focusing on HttpClientHandler enhancements.

We will be submitting the final proposed list of additions as part of issue dotnet/corefx#7623. As part of updating the contract to 4.1, we are also OOB'ing the Desktop (net46 Windows) implementation so that the package won't be a facade over Desktop but rather a full implementation. This is possible since System.Net.Http has always been a standalone dll in the .NET Framework. As part of this, we are changing the implementation for Desktop from the legacy HttpWebRequest sockets stack to the WinHttpHandler stack based on native WinHTTP. This will give us a good path forward as WinHttpHandler stack will be getting HTTP/2.0 support with newer versions of Windows 10.

This initial PR has a few API additions that we are definitely going to be adding. It's important to get these changes into the builds so that we can fully bake the OOB Http.dll assembly on all the platforms and continue package testing.

There is an existing System.Net.Http.WebRequestHandler class in the .NET Framework located in System.Net.Http.WebRequest.dll. This class is a subclass of HttpClientHandler. Due to this, we are being careful not to cause collisions with some of these added properties. WebRequestHandler has a 'ClientCertificates' property and a 'ServerCertificateValidationCallback' property. So, we are aligning/renaming the properties as we add them to HttpClientHandler OOB assembly. This may get altered slightly as we finalize the 4.1 System.Net.Http API.


Commit migrated from https://github.com/dotnet/corefx/commit/97c940eec1f6afe3e4af31e72d79c3a11e7b1ff1
2016-04-13 09:50:34 -07:00
Stephen Toub d3980a698e Merge pull request dotnet/corefx#7523 from ellismg/run-tests
Remove "UnsupportedPlatforms" metadata

Commit migrated from https://github.com/dotnet/corefx/commit/0cdc8e39f80a749bfa25eb559ab014be4f7ec557
2016-04-06 09:21:15 -04:00
Matt Ellis e631e1c680 Remove UnsupportedPlatforms metadata
Commit migrated from https://github.com/dotnet/corefx/commit/f5252c0c0d19622132e0edcf0b64783b798e3bbf
2016-04-05 14:38:52 -07:00
stephentoub 8b16b341a4 Add CurlHandler.MaxResponseHeadersLength
Adds the MaxResponseHeadersLength property.


Commit migrated from https://github.com/dotnet/corefx/commit/8840bc7b3961cbaae547da068bd47d452a8a5dfe
2016-04-05 09:53:41 -04:00
stephentoub bf66904b51 Add CurlHandler.MaxConnectionsPerServer option
Adds MaxConnectionsPerServer to CurlHandler.


Commit migrated from https://github.com/dotnet/corefx/commit/cf89034e4425fcd5bc4d00819e29c8c06a47d954
2016-04-04 22:18:07 -04:00
Stephen Toub 4b74e9a08a Merge pull request dotnet/corefx#7503 from stephentoub/curlhandler_defaultproxycredentials
Add CurlHandler.DefaultProxyCredentials

Commit migrated from https://github.com/dotnet/corefx/commit/4bd8d0fcacce9a49a44c9b32022e892c109c7e15
2016-04-04 20:08:20 -04:00
stephentoub 15ccbd065a Add CurlHandler.ConnectTimeout
Adds a timeout to the connection phase of CurlHandler.


Commit migrated from https://github.com/dotnet/corefx/commit/6880dca258fa33448983f6046b5b727ad1d56c27
2016-04-04 18:30:10 -04:00
stephentoub 63e8f36b90 Add CurlHandler.DefaultProxyCredentials
Commit migrated from https://github.com/dotnet/corefx/commit/256ecaf347b5e2b809722d1acbfb7bff1902bf06
2016-04-04 18:26:44 -04:00
Stephen Toub ba8bf6c2cd Add CurlHandlers.SslProtocols option
Add CurlHandlers.SslProtocols option

With libcurl on the OpenSSL backend (the recommended configuration), we can provide full-fidelity for this option.  With libcurl on another SSL backend, we can allow choosing all three TLS protcols or just one TLS protocol, but we can't support selecting two of the three.

Commit migrated from https://github.com/dotnet/corefx/commit/bd79e80f25923e0f2e29e07aba60b03070596bb4
2016-04-04 17:27:18 -04:00
stephentoub 436bbdf105 Add HttpClientHandler tests for server certificates
Commit migrated from https://github.com/dotnet/corefx/commit/65a4486bfe44c633c2e4dad6dabc6688bea16cc2
2016-03-23 14:10:19 -04:00
Kevin Jones c428584581 Fix typo in file name.
Commit migrated from https://github.com/dotnet/corefx/commit/af8c01f507c9227a8a11fb752c7df2142f7b4044
2016-03-18 12:45:24 -04:00
stephentoub 6154fe40a2 Add HttpClientHandler test for proxies
We don't currently have any functional tests in the repo for using HTTP proxies.  This commit adds a very simple loopback GET request proxy server, just enough to verify that HttpClient does go through the specified proxy and pass credentials if requested.  If/when we get better infrastructure in place for this kind of thing, we can remove the proxy implementation and replace the test, but for now, this at least provides some automated verification cross-platform.


Commit migrated from https://github.com/dotnet/corefx/commit/db2d84b0bb4032ca21b8e7c9cfd96056ffddbab2
2016-03-03 08:23:57 -05:00
David Shulman 1127bdc413 Add more Http response stream tests
Building on PR dotnet/corefx#6250, added more response stream tests dealing with
invalid response body transfer semantics.


Commit migrated from https://github.com/dotnet/corefx/commit/42e5f468e86f7d62fe1c62194bfd473d30cf06b7
2016-02-20 19:21:10 -08:00
nbilling 4401926ae3 Http request/response DiagnosticSource logging.
- Added logging to WinHttpHandler, CurlHandler, and HttpHandlerToFilter
  for HTTP request/response.
- Added functional tests for HttpClient (WinHttpHandler is exercised by
  these tests on desktop).


Commit migrated from https://github.com/dotnet/corefx/commit/edbd7ba720699bbe20753872ac430f0b3fdaf3a9
2016-02-16 15:57:17 -05:00
stephentoub fd5d04a4d4 Remove "workaround" P2P TODOs from .csproj files
In the past we've added some temporary P2P references to workaround lack of bug fixes in packages.  Removing them as they're no longer needed.


Commit migrated from https://github.com/dotnet/corefx/commit/ba939973c07af13b01fe3b4f34e0a31eac6f90c7
2016-01-25 14:41:34 -05:00
stephentoub 1c94eb73f6 Workaround bugs until new packages are available
Several bugs are causing tests to fail.  Those bugs have been fixed, but the fixes aren't yet available in the packages being targeted by other test libraries breaking because of the bugs. This temporarily works around it by using a P2P reference to skip the packages.


Commit migrated from https://github.com/dotnet/corefx/commit/5eb4a0405e16f1cc7d2488f9106f644141f62de5
2016-01-23 11:37:09 -05:00
Wes Haggard f27c7dc024 Update project files adding default configurations
This add a default configuration before the Import of dirs.props
for any projects that don't have Debug as the default configuration.

Removed Configuration and Platform properties set after dirs.props
as they would have no affect and just cause confusion.

Removed OutputType=Library property as it isn't necessary.


Commit migrated from https://github.com/dotnet/corefx/commit/9e1da13cf6d5ff4b37b1867beb3411a2fe61da6a
2016-01-02 23:50:21 -08:00
David Shulman df05d9fc0f Rename HttpTestServers2.cs to HttpTestServers.cs
Commit migrated from https://github.com/dotnet/corefx/commit/36acb05abd55f62aad0c18bc6ede2cef1c58628e
2015-11-09 11:20:41 -08:00
David Shulman b14cd70e12 Cleanup System.Net.Http tests
* Move more tests to the new test server
* Cleanup 'var' coding patterns
* Remove duplicate tests (*Content clas related) that are already covered with the *Content class tests
* Utiilize the newer test server VerifyUpload endpoint which does 'Content-MD5' verification of transmitted payload to the server
as well as payload from the server
* Add GZip related tests in addition to Deflate compression schemes


Commit migrated from https://github.com/dotnet/corefx/commit/773c8ae1db5aa7e5d695a74fb63968382f8529da
2015-11-09 07:05:24 -08:00
David Shulman c8432253b4 Add HttpClient tests to support all HTTP verbs
Added tests for validating against all standard and custom HTTP verbs. These tests use the new networking test server.

Cosolidated some existing tests that were duplicative. More test porting and reorganzing will be done in later PRs.


Commit migrated from https://github.com/dotnet/corefx/commit/057f0a9bc938606f9e3a24a51f64f3a4fd9bbb55
2015-10-27 15:03:29 -07:00
David Shulman 779afbe587 Fix hang when writing request stream in WinHttpHandler
WinHttpHandler was hanging due to blocking on the WinHTTP status callback thread. The blocking was coming from a task continuation resuming on the same thread and subsequently calling a blocking Stream.Write method in a custom HttpContent class being written onto the request stream.

Blocking is not allowed on the WinHTTP callback thread. So any task continuations need to occur on a different thread. The fix is to create the TaskCompletionSources to use RunContinuationsAsynchronously. This allows them to unblock the WinHTTP thread. Additionally, I added some missing ConfigureAwait(false) settings to some await'd operations.

Added a new test which uses a custom HttpContent class that uses a blocking Write() call when serializing onto the request stream.

Fix dotnet/corefx#4077


Commit migrated from https://github.com/dotnet/corefx/commit/babb7c6c65bf1e02dab667cbda80f0e24af21ed8
2015-10-22 16:44:06 -07:00
stephentoub ba9fea449f Reorganize src\Common\tests
Our common tests folder has gotten a bit unwieldy in its organization.  This change simply moves files around to better map to how src\Common\src is organized.  Files are now stored in a path based on functionality/namespace.

I mostly kept groups of functionality together and did not attempt to reorganize at that level, e.g. I moved the src\Common\tests\System.Xml.XPath\ folder to be src\Common\tests\System\Xml\XPath\ and did not further reorganize all of the folders/files it contains.  Such cleanup can be done separately on each individual area.

Some of the files also need to be cleaned up internally, e.g. the namespace (or lack thereof), so I put such things in a path that I thought made sense even if it differs from the current namespace in the file; I wanted this change to be relatively simple and just be about moving files around to clean up the main hierarchy.


Commit migrated from https://github.com/dotnet/corefx/commit/9a5546c439f7700d3462564678aa4206c7fbf4f1
2015-10-11 15:44:39 -04:00