Andrew Schwartzmeyer
e630c6f79c
Fix GetCurrentThreadId
2016-10-14 15:43:00 -07:00
Andrew Schwartzmeyer
24d0ce36e6
Fix SetDate
...
And use a bunch of unsafe code because of concerns about stack size.
2016-10-14 15:43:00 -07:00
Andrew Schwartzmeyer
0ce5575f57
Clean up CreateSymLink
2016-10-14 15:42:58 -07:00
Dongbo Wang
e240c0cb32
Make Pester skip the redirection test for '[Encoding]::Default' instead of ignoring it, so that we can keep track of this encoding issue
2016-10-14 10:02:44 -07:00
Dongbo Wang
139b399223
Fix test failures due to changes in .NET Core and the exclusion of 'Certificate' provider in UNIX PS
2016-10-14 10:02:44 -07:00
Christopher Ubben
c0f1d85e99
Added feature level test coverage to Registry provider ( #2417 )
2016-10-12 14:58:22 -07:00
iSazonov
6a62969f77
Add Invoke-Item deterministic Windows tests ( #2443 )
...
* Add Invoke-Item deterministic tests
2016-10-12 13:33:16 -07:00
Francisco Gamino
ccffe0755f
Skipping New-PSRoleCapabilityFile and Get-PSSessionCapability on help system test since there is no help content for these two cmdlets ( #2464 )
2016-10-12 12:17:51 -07:00
Francisco Gamino
d717458e7d
Fixing get-help <cmdletName> -online for .NET Core on Desktop. ( #2174 )
...
In PS Core on windows, we try to locate the default web browser and use it for online help. If we cannot find the default web browser (in NanoServer/IoT), we error out.
2016-10-12 12:16:32 -07:00
Paul Higinbotham
3815482082
Fix host remote test InvokeOnRunspace to work with AppVeyor ( #2362 )
...
* Fix host remote test InvokeOnRunspace to work with AppVeyor
* Updated to use new local account for remoting tests.
* Set the LocalAccountTokenFilterPolicy as needed.
* Adding verbose messages for debugging.
* Storing creds using Export-CliXml
* Added CITravis skip for Windows only remoting test
* Moving tests back to 'Feature' scope
* Added AppVeyor environment variable check to prevent account creation on non-appveyor configurations
* Removed It block in BeforeAll block
* Moving tests back to 'Feature'
2016-10-10 15:24:04 -07:00
Mike Richmond
e188c992e8
Fixing JSON property accessor to attempt user settings directory creation on the first write operation
2016-10-07 21:45:38 -07:00
iSazonov
6ef590dee3
Fix Get-WinEvent -FilterHashtable to work with named event data field ( #2373 )
...
Fix Get-WinEvent -FilterHashtable to work with named event data field
Now FilterHashtable parameter in Get-WinEvent for named data field:
1. generates a valid query, ex. @{Logname="System";Param="a"}
2. generates a valid query for multiple values, ex.
@{Logname="System";Param="a","b"}
Also removed double cast in the original code and added more tests to cover the fixed scenarios.
2016-10-07 11:48:08 -07:00
Christopher Ubben
62d7961aa8
Added feature level test coverage to FileSystem provider ( #2416 )
2016-10-07 10:36:13 -07:00
Dongbo Wang
e078b0acb7
Use 'CurrentCulture' for error message and update test to clean up resources
2016-10-05 16:18:50 -07:00
charub
d2feb51132
Added testcase for validating invalid filepath scenario. ( #1749 )
2016-10-05 16:18:50 -07:00
charub
88d64c243e
Fix Start-Transcript input path validation ( #1749 )
2016-10-05 16:18:50 -07:00
Christopher Ubben
5da825bdb1
Added feature level test coverage to Alias provider ( #2419 )
2016-10-05 14:46:52 -07:00
Christopher Ubben
0e190e0bb8
Added feature level test coverage to PSDrive provider ( #2418 )
2016-10-04 13:11:33 -07:00
Dongbo Wang
13455204a4
Fix variable assignment to not overwrite readonly/constant variables ( #2400 )
2016-10-03 15:25:52 -07:00
Dongbo Wang
5fbde6eb40
Fix bytewise operators to work on enum types with 'System.Byte' as the underlying type ( #2411 )
2016-10-03 15:24:39 -07:00
Chris Ubben
9885917481
Adding test coverage for Variable provider
2016-10-03 10:39:32 -07:00
Aditya Patwardhan
3700d108b3
Start process test ( #2397 )
...
Mark test as pending to unblock daily builds
2016-09-30 16:33:42 -07:00
Aditya Patwardhan
877c193af0
Add RequireAdminOnWindows tag for install-package tests ( #2390 )
...
Add the tag RequireAdminOnWindows tags so that these tests do not fail on
daily builds.
2016-09-29 18:13:33 -07:00
Mike Richmond
374e1d1b21
Merge pull request #2280 from vors/admin-tests
...
Separate tests on Windows CI to Admin-Required and Non-Admin-Required
2016-09-29 16:28:29 -07:00
James Truher [MSFT]
24f9dea287
Add tests for queries against userdata ( #2388 )
...
add a custom evtx file for the userdata tests to use
2016-09-29 16:23:12 -07:00
Sergei Vorobev
9cc905dea4
Add verbose comment about the execution policy test
...
'-Scope LocalMachine is Settable, but overridden'
2016-09-29 16:06:42 -07:00
Aditya Patwardhan
561824c306
Change fwlink to use http instead of https.
...
An issue was filed for corefx team for httpclient.getasync with https and
redirects. https://github.com/dotnet/corefx/issues/12171
2016-09-29 12:39:56 -07:00
Sergei Vorobev
735bcca4d0
Allow ExecutionPolicy tests to throw specific type of error
...
Split LocalMachine test case into two separate tests:
- One without overriden policy (throws exception)
- One with overriden policy
2016-09-29 12:29:27 -07:00
Sergei Vorobev
a1ee6d840d
Make ExecutionPolicy.Tests.ps1 admin-aware
2016-09-29 12:29:27 -07:00
Sergei Vorobev
06d274995e
Make LocalGroup tests admin-aware
2016-09-29 12:29:27 -07:00
Sergei Vorobev
56489b17bc
Make Registry.Tests.ps1 admin-aware
2016-09-29 12:29:27 -07:00
Sergei Vorobev
93495a4f54
Timezone tests require Admin on Windows
2016-09-29 12:29:27 -07:00
Sergei Vorobev
50b04212c6
Restructure PowerShellGet.Tests.ps1 to enable 'RequireAdminOnWindows' tagging
2016-09-29 12:29:27 -07:00
Sergei Vorobev
dcc10bc771
Change install scope for Install-PackageProvider.Tests.ps1
...
This helps avoid problem when run as non-elevated user.
2016-09-29 12:29:27 -07:00
Sergei Vorobev
fdc69f0c3f
Add 'RequireAdminOnWindows' tag to some tests suites
2016-09-29 12:29:27 -07:00
Dongbo Wang
124a59b8a8
Merge pull request #2363 from lzybkr/maxvars
...
Remove most Maximum* capacity variables
2016-09-28 17:28:16 -07:00
Jason Shirk (POWERSHELL)
39db1ec402
Add capacity test for initialsessionstate
2016-09-28 16:54:31 -07:00
Mike Richmond
0c9abbc9a4
Merge pull request #2379 from JamesWTruher/jameswtruher/moveEngineCoreTest
...
Move tests to more appropriate places now that we have the directory structure defined
2016-09-28 15:59:40 -07:00
Dongbo Wang
d32bf23708
Merge pull request #2378 from JamesWTruher/jameswtruher/addwineventtest
...
Add additional tests for Get-WinEvent cmdlet
2016-09-28 15:35:26 -07:00
James Truher
a8aeb55edb
Move tests to more appropriate places now that we have the directory structure defined
2016-09-28 14:57:50 -07:00
JamesWTruher
bfac47f3f1
Add return in BeforeAll to avoid running get-winevent cmdlet on non-Windows platforms
2016-09-28 14:29:47 -07:00
JamesWTruher
f1c854176d
Add additional tests for get-winevent for the xpath, xml and hashtable filters
...
Still left to do is handling the non-System queries (such as UserData)
2016-09-28 14:23:20 -07:00
JamesWTruher
4809414af5
Add new tests for Get-WinEvent
2016-09-28 12:21:56 -07:00
Mike Richmond
adf6250175
Moving ExecutionPolicy tests to Microsoft.PowerShell.Security and refactoring test skipping for Windows.
2016-09-28 10:55:50 -07:00
Mike Richmond
20d4374fa8
Fixing how the LocalAcccounts tests are skipped in Pester
2016-09-27 16:30:25 -07:00
Charu Bassi
5cbf1b43de
Fix 'Get-ChildItem -Hidden' to work on system hidden files like c:\hiberfil.sys c:\pagefile.sys and c:\swapfile.sys
2016-09-27 16:13:03 -07:00
Dongbo Wang
d04460657d
Merge pull request #2336 from lzybkr/stdin_fixes
...
Fix some issues with `powershell -Command -`
2016-09-27 11:20:43 -07:00
Aditya Patwardhan
9d1d927ecd
Fix CategoryInfo.Activity so that it has the specified value
...
CategoryInfo.Activity of Write-Error does not honor the value for
'activity' but uses the hard-coded string 'write-error'. The change sets
the value if specified by Write-Error cmdlet or set 'write-error'.
2016-09-27 09:50:43 -07:00
Dongbo Wang
1ea555810c
Fix Get-Credential to not prompt twice when no parameter is specified
2016-09-27 09:49:28 -07:00
Aditya Patwardhan
a27b2303bb
Add test coverage for Command discovery and requires ( #2285 )
2016-09-26 13:36:04 -07:00
Dongbo Wang
5d2f52e4e9
Fix indentation in the test
2016-09-26 11:56:12 -07:00
Dongbo Wang
89b5ae5de1
Fix $? assignment to not crash powershell
2016-09-26 11:56:12 -07:00
Mike Richmond
f991d5fea4
Merge pull request #2348 from ChrisUbben/FixThrowTypo
...
Fixed all misspelling of throw in Archive tests
2016-09-22 17:14:36 -07:00
Mike Richmond
5e4e651724
Merge pull request #2307 from ChrisUbben/PortTestMultiMachineProvidersRegistry
...
Adding test coverage for Registry provider
2016-09-22 17:14:12 -07:00
Chris Ubben
a45ea54111
Removed all misspelling of throw
2016-09-22 16:49:25 -07:00
Dongbo Wang
bf7d8e0e5b
Merge pull request #2266 from ChrisUbben/PortTestMultiMachineProvidersFileSystem
...
Adding test coverage for FileSystem provider
2016-09-22 14:23:32 -07:00
Mike Richmond
5c88dbf326
Merge pull request #2241 from jeffbi/convertto-html-coreclr
...
Make ConvertTo-Html work on CoreCLR
2016-09-22 13:24:17 -07:00
James Truher [MSFT]
e143b41533
move native execution tests to Language/Scripting/NativeExecution ( #2333 )
...
update testing-guidelines.md with new locations
2016-09-22 11:57:42 -07:00
Dongbo Wang
bf59194c6e
Fix binary operator tab completion ( #2338 )
2016-09-22 11:56:38 -07:00
Dongbo Wang
309bf603f9
Merge pull request #2264 from ChrisUbben/PortTestMultiMachineProvidersAlias
...
Adding test coverage for Alias provider
2016-09-21 15:28:36 -07:00
Jason Shirk (POWERSHELL)
1913244fad
Fix powershell -Command -
handling of backspace
...
PowerShell can be started with input redirected in different scenarios.
`powershell -Command -` is one scenario where commands are sent to
PowerShell, but this is not a interactive shell scenario, it's really
a server to run commands from some other process.
`powershell -File -` or just regular redirected input means PowerShell
is an interactive shell, but command line editing must be done via
the redirected standard input handle instead of interacting directly
with a console handle.
In this scenario, we want to provide a good editing experience. Today,
we provide the bare minimum, supporting backspace but no cursor movement.
The bug here is that backspace was treated as a backspace in the server mode
but should not have been.
2016-09-21 15:01:33 -07:00
Jason Shirk (POWERSHELL)
f095320787
Fix powershell -Command -
to not ignore last command
...
If the last command sent via stdin did not have a newline,
the command was ignored. This would happen when stdin was closed.
2016-09-21 14:42:16 -07:00
Chris Ubben
4c9173f34f
Adding test coverage for Registry provider
2016-09-21 13:36:03 -07:00
Chris Ubben
5e29753e9a
Adding test coverage for FileSystem provider
2016-09-21 13:25:38 -07:00
Chris Ubben
a55155ac53
Adding test coverage for Alias provider
2016-09-21 13:12:40 -07:00
Chris Ubben
9c548856f2
Adding test coverage for PSDrive provider
2016-09-21 13:02:34 -07:00
Yanbing
87f6e8d040
Add tests to language part 5 ( #2218 )
...
1. Added parameterbinding test
2. Added ShouldBeErrorID function in helper file
3. Removed ShouldBeErrorID function from other test modules
4. Update New-TestHost to be able to run on full CLR
5. updated file map.json
2016-09-16 16:54:48 -07:00
McAndersDK
5738f37b74
Added support for title in get-Credential, and message set to optional. ( #1904 )
...
* Update CredentialCommands.cs
Added possibility to add title to the credential prompt window.
Added possibility to only supply username without giving a message.
* Added Test for Get-Credential new feature. (Title, and Message only optional.)
2016-09-16 14:53:55 -07:00
Dongbo Wang
0426b44541
Merge pull request #2156 from charub/StartProcessIssue
...
Provide an unsupported message for 'Verb' parameter (#1691 )
2016-09-15 21:00:06 -07:00
Yanbing
edb292face
Add tests for the Language ( #2118 )
...
DeserializedMethods, DeserializedTypeConversion,
DynamicParameters, Generics, Indexer, LindEndings, MyInvocation,
OrderedAttributeForHashTable.
2016-09-15 11:27:44 -07:00
charub
3d7beb4425
Provide an unsupported message for 'Verb' parameter ( #1691 )
...
Add the 'Verb' parameter to Powershell core and add an unsupported message
for the same.
2016-09-15 10:50:36 -07:00
Sergei Vorobev
a266f11b00
Merge pull request #2182 from douglaswth/fix-passing-escaped-double-quoted-spaces-to-native.exe
...
Fix passing escaped double quoted spaces to native executables
2016-09-14 19:07:56 -07:00
Dongbo Wang
151585535d
Merge pull request #2250 from mirichmo/mirichmo/localgroup-description-length
...
Removing length restriction on Description since SAM allows greater than 48 characters
2016-09-14 17:57:22 -07:00
Mike Richmond
d3a49c2a54
Merge pull request #2265 from daxian-dbw/improve-modulepath
...
Improve ModulePath calculation and refactor related method names
2016-09-14 17:22:47 -07:00
PowerShell Team
db2a0a6ca9
Adding ported LocalAccounts tests
2016-09-14 17:18:13 -07:00
Dongbo Wang
b35d6126b2
Merge pull request #2239 from JamesWTruher/jameswtruher/testgap-004
...
Jameswtruher/testgap 004
2016-09-14 17:01:28 -07:00
Dongbo Wang
8669658d84
Add more sxs module path tests and make the basic sxs module test run on both powershell core and windows powershell
2016-09-14 15:19:12 -07:00
Paul Higinbotham
0ba1e2d9d1
Minor improvements to SSH remoting cmdlets ( #2249 )
...
* Fix for relative paths for KeyFilePath cmdlet parameter, renamed cmdlet KeyPath parameter to KeyFilePath parameter, and added tests.
* Code review comment update
* Added missing KeyFilePath check
* Test fix from review comment
2016-09-14 15:13:10 -07:00
James Truher
eaef22686f
Add a test for get-runspace -name and remove the runspace close from AfterAll block
2016-09-14 13:51:10 -07:00
James Truher
3dd686027c
Add get-runspace -name test, remove runspace.close from AfterAll, dispose alone will suffice
2016-09-14 13:51:10 -07:00
James Truher
89946ed280
removed aggressive runspace cleanup code
...
also changed get-runspace test when multiple runspaces are present
to look for explicit runspace ids
2016-09-14 13:51:10 -07:00
James Truher
154cd992b4
make the language more clear for the PSStandaloneMonitorRunspaceInfo test
2016-09-14 13:51:10 -07:00
James Truher
97c4bbe952
don't use git to determine where the common directory is
...
it's not portable for our lab environment, where git may not exist
2016-09-14 13:51:10 -07:00
James Truher
f00f82d85c
fix up Get-Runspace test to be sure it has a clean environment before starting
2016-09-14 13:51:10 -07:00
James Truher
4bba7c8e62
adding convert-path tests
2016-09-14 13:51:10 -07:00
James Truher
4ef068c3d6
Rewrite to use $TESTDRIVE which does auto cleanup
2016-09-14 13:51:10 -07:00
James Truher
51f0a29a48
Start adding runspace debugging API tests
2016-09-14 13:51:10 -07:00
James Truher
4d046379e0
Add Get-Runspace tests
2016-09-14 13:51:10 -07:00
James Truher
3c9d8a82aa
changing Package tests tags to Feature, as they go off box and should not be CI
2016-09-14 13:51:10 -07:00
James Truher
4ca0d68c37
additional tests to close gaps
...
Move-Item was identical to Rename-Item
2016-09-14 13:51:10 -07:00
Jeff Bienstadt
63bb074d5c
Update test per code review
2016-09-14 12:51:06 -07:00
Sergei Vorobev
81a598f242
Merge pull request #2089 from 0xfeeddeadbeef/master
...
Use prefixed QNames in XPath expressions used by all implementations of ICmdletProviderSupportsHelp interface
2016-09-13 15:14:46 -07:00
Douglas Thrift
ddf30c4008
Use a variable instead of a file for testing args
...
* Use a variable (which can be indexed by line) instead of a file to
test the output of arguments passed to echoargs
* Add comments explaining the tests
2016-09-13 13:37:42 -07:00
Douglas Thrift
4d5d0a0034
Rename Publish-EchoArgs to Publish-PSTestTools
...
* Rename Publish-EchoArgs to Publish-PSTestTools so it can be used
for other tools as well in the future
* Publish EchoArgs to the bin directory instead of run to match
convention
* Add source URL to EchoArgs header comment
* Use wildcard of "*.nuget.props" to match
"test/csharp/csharp.nuget.props" in .gitignore
2016-09-13 13:37:42 -07:00
Douglas Thrift
7e8070276f
Move and "publish" EchoArgs for the tests
...
* Move EchoArgs from test/EchoArgs to test/tools/EchoArgs
* Use "dotnet publish" for building EchoArgs in build.psm1 so the test
can call it directly
2016-09-13 13:37:42 -07:00
Douglas Thrift
7816516c24
Add tests for native command arguments
2016-09-13 13:37:42 -07:00
Paul Higinbotham
79ddafcc85
Fix for Linux remote script debugging hang ( #2213 )
...
* Fix for Linux remote debugging hang bug.
* Removing dependency in PSReadLine on new engine helper API since it needs to be compatible with V3.
2016-09-13 11:31:48 -07:00
George Chakhidze
db330207dd
Make sure we log that tests for Cert:\ and WSMan:\ provider-specific help are skipped
2016-09-13 10:26:53 +04:00
George Chakhidze
e8190a569b
Use prefixed QNames in XPath expressions used by all implementations of ICmdletProviderSupportsHelp interface
...
Also includes these bugfixes:
- WSManConfigProvider.GetHelpMaml: Tried to load XML from
MemoryStream that was created from file name string. Use XmlReader
instead.
- WSManConfigProvider.GetHelpMaml: Use Path.Combine instead of
platform-specific directory separator character.
- WSManConfigProvider.GetHelpMaml: CmdletHelpPath MAML XML element
attribute `ID` name casing seems inconsistent with other help.xml
files. XPath 1.0 does not support case-insensitive expressions,
use both `id` and `ID` in query.
- Add Pester test to verify that Get-Help shows provider-specific help.
Fixes #2088
2016-09-13 09:40:14 +04:00
Yanbing
fd4552bfb8
Added tests for hashtabletoPSCustomObjectConversion, OutErrorVairable tests ( #2160 )
2016-09-12 18:29:55 -07:00