Commit Graph
28 Commits
Author SHA1 Message Date
Maggie Tsang 5804e97029 Created admin helper file (dotnet/corefx#22046)
Commit migrated from https://github.com/dotnet/corefx/commit/3f2328a78214cd5c921be42d5d439204db3a2dcf
2017-07-17 15:06:40 -07:00
Jose Perez Rodriguez 64e57a887e Move NamedPipe tests to use Local prefix
Commit migrated from https://github.com/dotnet/corefx/commit/eaeab5f3c8e0fe5f57563b0a43e69eb69e183c3f
2017-07-17 08:41:51 -07:00
Nina Chikanov 06a245c05c Merge pull request dotnet/corefx#21955 from nchikanov/toTheory
Convert Tests to Theory

Commit migrated from https://github.com/dotnet/corefx/commit/3acd6a732a12a48e0f5a02b5936071135b5225ae
2017-07-07 10:36:15 -07:00
Maggie Tsang 0d719a615b Increased timeout (dotnet/corefx#21962)
Commit migrated from https://github.com/dotnet/corefx/commit/d719fff783ad089bc7b6ccda67941306f1a0a6c3
2017-07-06 17:36:52 -07:00
t-nichik 8162a540bc Convert Tests to Theory
Converting tests from Fact to Theory to make it easier to recognize
which tests are failing instead of spending time sorting through
ambiguous test output.


Commit migrated from https://github.com/dotnet/corefx/commit/343e20e1452d9eb0267f4e28a3650417a7fb6ae6
2017-07-06 13:37:26 -07:00
Maggie Tsang dd6f456515 Read only file system delete tests (dotnet/corefx#21684)
* Read only file system delete tests

Tests to validate behavior for directory and file delete for read only
file systems on Unix.

* Addresses feedback


Commit migrated from https://github.com/dotnet/corefx/commit/b61fa81efee8003f34dfed3bfbe093e45ac06fed
2017-06-30 10:17:07 -07:00
Jeremy Kuhne 6563c7348e Add converter from IEnumerable to TheoryData (dotnet/corefx#21671)
* Add converter from IEnumerable to TheoryData

Manipulating test input data in IEnumerable format is
desirable, but a bit awkward to get into IEnumerable<object[]> format that [Theory] expects.

Add test project to new test project. :)  Change a test in
System.IO.FileSystem to theory with new extension.

* Fix performance test project

* Run the UpdateConfigurations target

* Add netfx reference


Commit migrated from https://github.com/dotnet/corefx/commit/94b2a85c837a536096af1a7bc3812feef45e9ecb
2017-06-28 21:15:33 -07:00
Atsushi Kanamori 05c6159671 Fix dotnet/corefx#19909 and reactivate tests on ILC. (dotnet/corefx#20830)
This may cause new failures on ILC runs because of new tests
running. I did not check the state of every test.

Commit migrated from https://github.com/dotnet/corefx/commit/c697135fc981a89c929995da903cdc533c7e623e
2017-06-08 14:59:58 -07:00
Stephen Toub 65e266ac0e Fix tests to catch exceptions from CanCreateSymbolicLinks
It's failing on some platforms.


Commit migrated from https://github.com/dotnet/corefx/commit/79878e1a09689699beb8bd45c18fa0c64dc22ddf
2017-06-02 17:49:15 -04:00
Stephen Toub af01901c62 Remove TemporaryDirectory/File from FileSystem tests (dotnet/corefx#20576)
* Remove TemporaryDirectory/File from FileSystem tests

* Explicitly set UseShellExecute=false in MountHelper


Commit migrated from https://github.com/dotnet/corefx/commit/a84b402d70d5720268649c4707ddb3152974fa08
2017-06-01 13:10:17 -07:00
Jeremy Kuhne 058ab2e451 Fix Unix missing file state (dotnet/corefx#19959)
* Fix Unix missing file state

In the original .NET implementation a missing file never
throws directly with FileInfo. Attributes get the error result
from Windows (-1) and times aren't initialized.

* Feedback

* Change FileSystemTest derivation

FileSystemTest should derive from RemoteFileSystemTest so
we can have one base class.

* Add RemoteExecutorBase to performance test project

* Address test feedback

* Fix File.GetAttributes on Unix

NetFX doesn't rely on FileInfo and throws when getting attributes
on missing files through File.


Commit migrated from https://github.com/dotnet/corefx/commit/801dde95a5eac06140d0ac633ac3f9bfdd25aca5
2017-05-19 13:20:11 -07:00
Alex Perovich f3d4d23517 Fix S.IO.FileSystem tests running on uapaot
Commit migrated from https://github.com/dotnet/corefx/commit/518e739ee935bb00b375b757330f74368957ad90
2017-04-13 17:53:04 -07:00
Jeremy Kuhne dfe38d9b48 Fix tests run on desktop (dotnet/corefx#15100)
* Fix tests run on desktop

Conditionalize tests appropriately so long path and new syntax
support are taken into account.

Move some test data into Theories for easier debugging.

Fix and add issue to colon check tests until we fix CoreCLR.

* Address feedback


Commit migrated from https://github.com/dotnet/corefx/commit/551fe49174378adcbf785c0ab12fc69355cef6e8
2017-01-12 15:20:33 -08:00
Justin Van Patten aa68f5ce2f Replace uses of Xunit.PlatformID with renamed TestPlatforms
Replace uses of `Xunit.PlatformID` with renamed `TestPlatforms` because
the old name conflicts with `System.PlatformID` and should be plural
according to the design guidelines for flags enums.


Commit migrated from https://github.com/dotnet/corefx/commit/5179dda7331b1e201519adf76ce9ae69ffe2a0f6
2016-10-01 17:18:41 -07:00
Jose Perez Rodriguez a27ef1f7be Reving up the versions of the contracts where we have added Apis for netcoreapp1.1 (dotnet/corefx#10531)
Reving up the versions of the contracts where we have added Apis for
netcoreapp1.1

Commit migrated from https://github.com/dotnet/corefx/commit/62334804aa655a250838eefed68553f357ebec5f
2016-08-04 13:05:12 -07:00
Ian Hays f859973d23 Expand CanCreateSymlinks test
Make it harder to pass the CanCreateSymbolicLinks check so that tests don't fail on some systems where a file symlink can be created but a directory symlink can't be.


Commit migrated from https://github.com/dotnet/corefx/commit/6d84c1d4121a7efdc31970d1cd7ba750aaee6525
2016-06-29 08:33:07 -07:00
stephentoub b540d002e5 Centralize case-sensitive PlatformID checks in FileSystem tests
Commit migrated from https://github.com/dotnet/corefx/commit/4f1d4382f5def0c000ff860f02dd02b1998e1017
2016-03-04 07:28:29 -05:00
stephentoub 4f301f6e7c Fix System.IO.FileSystem handling of symlinks
We've visited this topic a few times... hopefully this is the last.  We previously misunderstood some of how Windows handles symlinks, leading us to make some invalid choices on Unix.  This addresses those issues.

For the most part with this commit, we now match Windows behavior on Unix wherever possible, while also trying to do something sensible on the Unix side.  The only notable difference now comes into play for broken symlinks, due to a fundamental difference between symlinks on Windows and Unix: on Windows, a symlink is created as either a file or directory symlink and thus .NET can tell which it is even if it's broken... on Unix, a symlink only stores a path to its target, so when it's broken, there's no information about whether it's intended to be a file or a directory.  As a result, we fall back to always treating it as a file.


Commit migrated from https://github.com/dotnet/corefx/commit/59da18fc926397f6674e1de86e296ca6e0dfe067
2016-03-02 13:40:27 -05:00
dotnet-bot 39d1eab950 Update licensing headers
Commit migrated from https://github.com/dotnet/corefx/commit/7cad8486cbabbce0236bdf530e30db7036335524
2016-01-27 08:02:28 -08:00
Ian Hays aac426662c Fix FileSystem related permissions failures.
A number of tests involving ReadOnly files were failing on Unix and Linux when run with elevated user permissions (e.g. sudo). This commit modifies those Unix tests to accomodate either set of permissions and verify the result accordingly. This unfortunately means we can't verify if the behavior is 'right', only that it is executed correctly. Windows is unchanged.


Commit migrated from https://github.com/dotnet/corefx/commit/77d73d27d06cf331c1637bc4e1cdc5aa35b68887
2016-01-25 12:23:05 -08:00
stephentoub 9386f54542 Make Directory/FileInfo follow symlinks again
Previously on unix we would use stat to get information about directories and files for DirectoryInfo and FileInfo.  That meant that we wouldn't correctly report ReparsePoint for symlinks, and the code was changed to use LStat.  But that then breaks important use cases, such as by DirectoryInfo.Exist for a symlink to a directory always returning false.

This commit provides a compromise: we first use lstat, and if we find it's a symlink, we use stat but remember separately that it's a symlink so we can include ReparsePoint in the reported attributes.


Commit migrated from https://github.com/dotnet/corefx/commit/36259dc3c72fb1dc2a71a06db6f7dce9ea88c642
2016-01-22 16:35:23 -05:00
Stephen A. Imhoff a8ce720bd6 Update test namespace in System.IO.FileSystem
Update test namespace where applicable.
Cleanup `using`s in updated files.


Commit migrated from https://github.com/dotnet/corefx/commit/5b5717c2eb8fc88ed5bd59babe39890c581ad622
2015-09-25 21:30:57 +09:00
stephentoub 2e9fbca627 Change System.IO.FileSystem.Tests to use FileCleanupTestBase
When I rewrote the MemoryMappedFiles tests, I cribbed from the
System.IO.FileSystem test's base class and created a Common base class
that could be used by test projects that had temporary files to be cleaned up.
At the time, however, FileSystem's tests were undergoing heavy changes and
so I didn't update FileSystem's tests to use the common base.  Now that
things have quieted down, I've made that change.

In doing so, I made a few tweaks to the FileSystem tests, where tests were
assuming that the test directory was always in the current directory, and
the consolidated base class puts temporary files in the user's temporary
directory instead.


Commit migrated from https://github.com/dotnet/corefx/commit/d7a19e92824e8a038553de20abf2497db0424ddb
2015-08-04 23:24:06 -04:00
Ian Hays a9766775b0 - Added an overload to GetTestFilePath that takes an integer index parameter to add to the generated filename so that calls to the function within loops will be able to differentiate themselves
- Resolves dotnet/corefx#1434


Commit migrated from https://github.com/dotnet/corefx/commit/1dbfabb32d61a8c2db25c82bb22743bcc15c2ccb
2015-07-29 15:23:33 -07:00
Ian Hays 1f363026a5 -Running the FileSystem tests no longer leaves test directories or files in the running directory. fixes dotnet/corefx#1412
-Modernized the tests for GetFIleSystemEntries and GetFiles, splitting each test case into a standalone method runnable through xunit. Similar versions of these tests now inherit from each other rather than just being copy-pasted like they were previously. Moved most test cases from using hardcoded file names to instead use GetTestFileName() in FileSystemTest.cs. Tested on Linux and Windows.
-Changed the names of some files and classes to better follow the naming conventions of the other FileSystem tests.


Commit migrated from https://github.com/dotnet/corefx/commit/9e20082a9498f2f9bf79bcebe80fd1f9efc1e39b
2015-06-30 11:31:01 -07:00
Eric StJohn 09489674ad Adding tests for FileStream.
Commit migrated from https://github.com/dotnet/corefx/commit/75dd80ef6fc260e8d5dca8458d8baf9e3faa35a7
2015-01-23 10:57:01 -08:00
Eric StJohn 48a3156ab1 Update style of FileSystemTest to match guidelines.
Commit migrated from https://github.com/dotnet/corefx/commit/3f2d06d971fa5ca0c42d8bb0c354b6eef046f68e
2014-12-30 14:40:30 -08:00
Eric StJohn 6923cfab70 Add projects for FileSystem and FileSystem.Primitives. Add tests for FS.Primitives and the begining of tests for FileSystem.
Commit migrated from https://github.com/dotnet/corefx/commit/5b0e138913de4854ed2a4c627fa75362413d2010
2014-12-29 12:45:05 -08:00