Commit graph

5143 commits

Author SHA1 Message Date
Steve Lee 7b8c6e7f54 fix intermittent failures in filesystem tests (#4566) 2017-08-14 08:53:04 -07:00
Ilya 813e4a661a Fix unblock read only file (#4395)
Adds a new non-terminating error when a file is read-only
2017-08-14 08:49:38 -07:00
Dongbo Wang e83fcca277 Reorganize some engine tests to make it clean (#4551)
1. The individual test files (.ps1) in `/test/powershell/engine` are moved to the corresponding subfolders.
2. The test asset file `test/powershell/Common/TestTypeFile.ps1xml` is moved to `test/powershell/Common/engine/Api/assets/` so that it's next to the test that is using the file.
2017-08-14 13:49:28 +04:00
Travis Plunk 7ae955fa73 Update nano server insider for new bulid (#4555) 2017-08-12 08:39:55 -07:00
Travis Plunk b3ebdafccd Only push to NuGet for Full Build (cron) (#4517) 2017-08-11 08:50:04 -07:00
Manikyam Bavandla 0bfee35525 Add an additional acceptance test for the PowerShellGet module (#4531)
* Add an additional acceptance test for the PowerShellGet module

* Removed 'BVT' tag
2017-08-10 13:33:25 -07:00
Dongbo Wang 384a9fe3fc Clean up ShellExecute code to use the .NET Core implementation (#4523)
* Clean up ShellExecuteHelper and enable ShellExecute in NativeCommandProcessor

* Minor fix

* [Feature] Fix NativeCommandProcessor to clean up in case an exception is thron

* [Feature] Update tests

* [Feature] Address comments

* address one more comment

* Address some more comments
2017-08-10 13:32:57 -07:00
Dongbo Wang 7762d7bf49 clean up map.json related files and scripts (#4532)
* clean up map.json related files and scripts

* Update .spelling
2017-08-10 13:32:19 -07:00
Steve Lee eea3885242 Enable WSManCredSSP cmdlets (#4336)
* [Feature]
Fixed error message using a null resourcemanager
With most recent CoreFx supporting STA, removed special CoreClr code paths
Added test coverage
Removed some dead commented out code that was never used

* [Feature]
merged tests to one file, use runas to have relevant tests run as non-elevated

* [Feature]
Get-CredSSP returns text so only run that test if current culture is en-US

* [Feature] Update test to fix code exclusion

* [Feature] Fix Skipping on test cases that already had a Skip value
2017-08-10 13:31:54 -07:00
Mike Richmond 1a8563336a [Feature] Mark failing tests as pending to unblock the nightly test pass (#4538) 2017-08-09 15:12:59 -07:00
Travis Plunk 8bf386e25e Add ability to package non-release packages (#4509) 2017-08-09 14:36:23 -07:00
James Truher [MSFT] eccfd691ba Improve code coverage for Get-Item cmdlet (#4385) 2017-08-09 14:15:17 -07:00
Dongbo Wang 5d53bd373a Fix the hang issue in Travis CI build triggered by the [Feature] tag (#4536)
* Fix the hang issue in Travis CI build triggered by the [Feature] tag

* [Feature] Update badge only in daily build

* [Feature] Use the term 'daily build'
2017-08-09 14:01:52 -07:00
Ilya 47a5a4d8ba Clean up '#if CORE' in PSUtils.cs (#4453)
* Cleanup '#if CORE' in PSUtils.cs

* Fix IsRunningOnProcessorArchitectureARM
2017-08-09 09:42:42 -07:00
Mike Richmond 515a999e1c Porting Enable-PSRemoting and its Tests (#2671)
Fixes #1193 for most scenarios. The remaining scenario to be addressed is the Nano Server bring-up scenario. To continue supporting that scenario, I left the Install-PowerShellRemoting script in place.

This change 
1. Ports Enable-PSRemoting and Disable-PSRemoting to PowerShell Core
2. Adds side-by-side PowerShell Core remoting support to the PSSessionConfiguration cmdlets and PSRemoting cmdlets.
3. Ports PSSessionConfiguration tests

This change also introduces a behavioral difference. The PSRemoting and PSSessionConfiguration cmdlets are now context-sensitive and only work for endpoints that match the PowerShell type. For example, Get-PSSessionConfiguration, when running in PowerShell Core, will only return PowerShell Core WinRM endpoints. It will only modify PowerShell Core WinRM endpoints and cannot be used to configure Windows PowerShell endpoints.
2017-08-08 09:36:22 -07:00
Ilya e39966996e Clean up '#if CORE' in MshHostTraceListener.cs (#4402) 2017-08-08 09:33:39 -07:00
Travis Plunk df379f29c7 Update brew before installing powershell in installpsh-osx.sh (#4506) 2017-08-08 09:22:02 -07:00
Ilya 649ff285ee Clean up '#if CORE' in ProcessCodeMethods.cs and 'ClrFacade.GetSafeProcessHandle' (#4428) 2017-08-08 09:20:57 -07:00
James Truher [MSFT] 0e4cd634b8 Remove last-modified from headers as it causes a failure when updating the daily badge (#4522) 2017-08-08 09:09:11 -07:00
Mark Kraus e4060ab892 Fix Tests from #4479 (#4512)
* Fix Tests from PowerShell/PowerShell#4479

* [Feature]
2017-08-07 16:06:37 -07:00
Joey Aiello 487159deba Add Homebrew to install docs (#3838)
* add Homebrew to install docs

* add missing install instructions

* add 'cask' to macOS uninstall

* address PR comments on Mac install

* move to cask reinstall for update
2017-08-07 15:27:25 -07:00
Darwin cea20244a7 add amazonlinux DockerFile and related test changes 2017-08-07 14:45:11 -07:00
Ilya 0150f65d0c Clean up '#if CORE' in PSPrincipal.cs (#4433)
* Use TimeZoneInfo in PSPrincipal.cs

* Use TimeZoneInfo in serverremotesession.cs

* Use TimeZoneInfo in RemoteSessionCapability.cs

* Use TimeZoneInfo in serialization.cs

* Remove private fiield  'clientTimeZone'

* Remove extra line
2017-08-07 14:27:14 -07:00
Ilya 984b85f34d Clean up '#if CORE' in RunspaceConfiguration*.cs files (#4448)
* Cleanup '#if CORE' in RunspaceConfigurationTypeException.cs

* Cleanup '#if CORE' in RunspaceConfiguration.cs

* Cleanup '#if CORE' in RunspaceConfigurationEntry.cs

* Cleanup '#if CORE' in RunspaceConfigurationTypeAttribute.cs
2017-08-07 14:25:09 -07:00
Oisin Grehan 8d3f8537de Ignore case when binding PSReadline keyhandler functions
Fix #4300
2017-08-07 14:24:35 -07:00
Andrew 0b7451bda3 Tests for New-WinEvent (#4384)
* New-WinEvent tests

* PR feedback

* PR feedback 2

* PR feedback 3

* PR feedback 4

* PR feedback 5
2017-08-07 14:24:12 -07:00
Mike Richmond 24cf216607 Add Missing Assemblies to TPA List for Pwrshplugin.dll (#4502) 2017-08-07 09:11:12 -07:00
Andrew 99236b18bb Make ResourceManagerCache check for alternative resource paths (#4139) 2017-08-04 15:39:26 -07:00
Mathias R. Jessen f15a8dab28 Makes Start-Trace escape file paths correctly (#3863)
Start-Trace neglects qualifying arguments to the -o and -pf command line
switches, causing logman (and subsequently Start-Trace) to exit with
0x80070057 and return:

Error:
The argument is incorrect.

Whenever arguments to either -ProviderFilePath or -OutputFilePath
contain spaces because Start-Trace doesn't escape the path in any way.

This commit moves basic input validation for output file paths to the
ProviderFilePath and OutputFilePath parameter definitions, and adds text
qualifiers (double-quotes) around input arguments
2017-08-04 15:26:51 -07:00
Zachary Alexander 7d5367a9f7 Small grammar change to pull requests guide (#4322)
him -> them, which is consistent with usage above.
2017-08-04 14:59:16 -07:00
Travis Plunk 7a03b0c7b9 Use supported API to set CAPID in the SACL (#4496) 2017-08-04 12:29:00 -07:00
Travis Plunk b63a25c7f6 Remove hash validation from nanoserver-insider dockerfile. (#4498)
We are using HTTPS from the same location we are getting the dockerfile from, it should be enough.
2017-08-04 10:22:58 -07:00
Steve Lee d17aaad4a0 Ensure running powershell within PowerShell starts instance of currently running PowerShell (#4481)
Modify PATH env var at startup so that $PSHOME is in front
2017-08-04 09:23:15 -07:00
Aditya Patwardhan 5cd0e85d12 Fixed passing common test modules path to unelevated Powershell (#4313)
- Fixed the way common test modules are passed to elevated and unelevated powershell. Earlier, only elevated powershell got those through inheritance as a child process. Now we add them to the startup of the process.
- Fixed error reported by PSScriptAnalyzer about ? / Where-Object
- Converted all the parameters passed to powershell.exe to be a base64 encoded string to avoid complications with quotes.
- Removed code which was updated $env:PSModulePath as we do it in startup args for powershell process instead. 
- Added a way to disable -Quiet for Pester.
- Opencover.console.exe gets confused when the base64 encoded parameter is given with '&' invoke.
Writing to a ps1 file and invoking the script works around the issue.
This also makes it similar to how unelevated tests are invoked.
2017-08-04 09:16:17 -07:00
Mark Kraus fc77c7981a Extend -SkipHeaderValidation to include -UserAgent to support non-standard User-Agent headers (#4479) 2017-08-04 09:10:24 -07:00
Mike Richmond 879b7da4ac Add Ilya as Maintainer (#4365) 2017-08-04 09:01:07 -07:00
Dongbo Wang d7428a2f90 v6.0.0-beta.5 release 2017-08-03 17:05:36 -07:00
Ilya 35a3ecd27b Cleanup '#if CORE' in Utils.cs (#4443) 2017-08-03 15:29:54 -07:00
Ilya 8aa028eae9 Cleanup '#if CORE' in TypeTable.cs (#4442) 2017-08-03 15:29:14 -07:00
Dongbo Wang 6d32293437 Add more tab completion tests (#4356)
* Add more TabCompletion tests

* Minor changes

* Add some more tests

* Add more tab completion tests

* Fix errors

* Add more test coverage

* Add 'AfterEach { Pop-Location }'

* Enable DSC resource name completion and address comments

* use both '/' and '\' in the path for completion

* Use a separate test for '\' and '/'
2017-08-03 15:26:20 -07:00
James Truher [MSFT] fbe547e4ab Change test to not set PSDefaultParameterValues (#4482)
Create a local variable for determining whether the test should be skipped.
Also, change the depth of `Export-Clixml` to speed up tests.
2017-08-03 15:06:37 -07:00
Dongbo Wang aa722fd89d Update changelog for beta.5 (#4486) 2017-08-03 15:04:43 -07:00
Dongbo Wang 7c72bea590 Update docs/scripts for beta.5 release (#4470) 2017-08-03 10:43:57 -07:00
Ilya 8034dd6dd1 Clean up '#if CORE' in PropertyAccessor.cs (#4429)
* Cleanup '#if CORE' in PropertyAccessor.cs

* Remove RegistryAccessor class
2017-08-03 08:34:21 -07:00
Dongbo Wang d2e8d0333d use fpm 1.8.1 (#4468) 2017-08-02 17:09:36 -07:00
Travis Plunk d36776aafc Add -Force parameter to new-zippackage (#4465) 2017-08-02 15:14:47 -07:00
Aditya Patwardhan 0e4f1605f5 Resolve the loading crash on Win7 (#4463)
Added package reference for 'Microsoft.NETCore.Windows.ApiSets'
2017-08-02 14:19:20 -07:00
David Christian 1a003a8af3 Support Positive/Negative ValidateRange (#4084)
To improve code clarity and give better error messages when using ValidateRange, you can now specify:

```
[ValidateRange(ValidateRangeKind.Positive)]
```

instead of

```
[ValidateRange(1, 2147483647)]
```

Valid kinds are:

Positive
Negative
NonPostiive
NonNegative
2017-08-02 11:24:06 -07:00
Ilya 65643e1b5d Cleanup '#if CORE' in EtwActivity.cs (#4455) 2017-08-02 09:59:39 -07:00
Ilya 82ad9da3a7 Cleanup '#if CORE' in SessionStateExceptions.cs (#4454) 2017-08-02 09:58:59 -07:00