Commit graph

1706 commits

Author SHA1 Message Date
dependabot[bot] 98506db714 Build(deps): Bump SelfSignedCertificate in /test/tools/Modules (#9055) 2019-03-05 11:32:40 -08:00
ThreeFive-O 017e472961 Align name schemes for test files (#9034) 2019-03-05 10:47:04 -08:00
Aditya Patwardhan 7062297e4e
Update version for PowerShell.Native and hosting tests (#8983) 2019-03-04 11:08:19 -08:00
Gaurav Kamath f31b33863c Refactor Shuffle in Get-Random to save a full iteration of the objects. (#8969) 2019-03-01 17:11:37 +05:00
Ilya 18f9a36f2a Pending NamedPipeConnectionInfo test (#9003)
Related #8971. Pending the test until we fix a root case of failure.
2019-02-27 14:51:36 -08:00
mjanko5 7e0411fcd9 Add test for -WhatIf for New-FileCatalog (#8966) 2019-02-27 10:53:08 +05:00
Dongbo Wang 5d54f1aa38
Make xUnit tests run sequentially to avoid race conditions caused by manipulating 'powershell.config.json' in tests (#8945) 2019-02-22 11:57:10 -08:00
Tyler James Leonhardt 23eccfd641 [feature] Add -CustomPipeName to pwsh and Enter-PSHostProcess (#8889)
This allows a user to start PowerShell up with the name of the named pipe that is used for cross process communication (I.e. Enter-PSHostProcess).
2019-02-22 23:40:03 +05:00
Andrea Spadaccini af86157855 Fix typo: aganist ➜ against (#8943) 2019-02-22 18:46:31 +05:00
Ilya 778920bbc4
Use verbatim string literals for paths (#8937) 2019-02-22 11:35:32 +05:00
Travis Plunk 57aeca428e
Port Security bypass fixes from 6.1.3 (#8915) 2019-02-21 13:44:08 -08:00
Travis Plunk 2c488fb4e5
Fix Markdown lint issues (#8929)
#8896 Broke the static analysis CI.  Fixing so CI passes
2019-02-20 13:24:26 -08:00
Steve Lee b06ad6aa61 Enable discovering modules that have names same as a culture (e.g. Az) (#8777)
Here are the major changes:
- Add logic to skip checking for possible resource directories for the first set of sub directories from the top level.
- There was an additional skip if the folder is hidden, rather than doing an explicit attribute check, change the `EnumerationOption` to skip hidden folders.
- Since the `IsPossibleModuleDirectory()` helper now only checks to see if the name matches a culture, renamed to `IsPossibleResourceDirectory()`
- When getting the default modules, we don't search recursively into individual module folders, so removed additional check for possible resource directory.
2019-02-20 12:23:27 -08:00
Reece Dunham 4de3a72142 Fix code-of-conduct linting (#8896) 2019-02-20 11:57:31 +05:00
Adam Gauthier caf8ac6a6a Add configurable maximum depth in ConvertFrom-Json with -Depth (#8199)
Adds an optional -Depth parameter to the cmdlet which lets the user to specify a maximum depth allowed for deserialization, which will overwrite the default maximum of 1024.
2019-02-20 10:37:37 +05:00
Mathias R. Jessen 0a570211df Flatten interface hierarchy when generating properties that implement interface properties (#8382)
`TypeBuilder.GetInterfaces()` returns only the interfaces that was explicitly passed to its constructor, so we need to flatten the interface hierarchy in order to properly support inherited interfaces.
2019-02-19 15:02:34 -08:00
Reece Dunham c14d5dd67f Remove some of the last AppVeyor references (#8867)
This removes some of the last mentions of the AppVeyor name.  Don't change the title, we don't want the word to appear in the CLs
Also problem: the last references are in the changelogs but I don't want to modify them without committee approval.  

## PR Context  

it was removed, #8686
2019-02-19 12:44:00 -08:00
Travis Plunk 60ab54d737
Port DotNet fixes from 6.1.3 (#8914)
Addresses CVE-2019-0657
2019-02-19 10:45:40 -08:00
Reece Dunham 6cab2b474d Remove yet another appveyor reference (#8854) 2019-02-11 10:28:41 -08:00
Reece Dunham 3ab7e2ec4d Remove extra AppVeyor environment check (#8709)
Removes a check for AppVeyor env

## PR Context  
AppVeyor removed (#8686  extension)
2019-02-08 10:57:41 -08:00
Steve Lee 26a58670c1 Enable creating relative symlinks on Windows with New-Item (#8783) 2019-02-07 11:44:23 -08:00
Bruce Payette 6bc6257a55 Allow .exe files to be used as IL binary modules (#7281)
Fix for #6741 Allow .exe files to be used as binary modules. Basically anywhere a .dll could be used with modules, you can now use a .exe file. Also did a little clean up, replacing constant strings with the StringLiteral values instead.
2019-02-07 11:24:06 -08:00
Joel Sallow (/u/ta11ow) 130298bfae Parse numeric strings as numbers again during conversions (#8681) 2019-02-04 12:22:05 -08:00
Travis Plunk 003a141f31
Remove directory causing static analysis failure (#8812)
Remove directory causing static analysis failure
2019-02-01 18:03:12 -08:00
Steve Lee 313c8c06a1 Enable Write-Information to accept $null (#8774) 2019-01-31 13:16:34 -08:00
Reece Dunham 9e4e50a84e Remove appveyor functions from New-DockerTestBuild.psm1 (#8756) 2019-01-31 11:15:31 -08:00
Joshua T c935bce1ac Adding parameter "ReplyTo" to Send-MailMessage (#8727) 2019-01-30 16:33:15 -08:00
Paul Higinbotham f3efcab91e Change xUnit RunspaceTests to run sequentially (#8796) 2019-01-30 14:12:26 -08:00
pougetat 1d7651f233 Fix Get-Help PSTypeName issue with -Parameter when only one parameter is declared (#8754) 2019-01-30 08:55:33 -08:00
Ilya 5097e2ae1f Fix cleanup config files for the csharp xUnit tests (#8761) 2019-01-29 17:24:18 -08:00
Reece Dunham 5581c0a0ed Update some info in md-link-checks (#8757) 2019-01-29 08:54:23 +05:00
Travis Plunk b779b88c79
Merge `release-v6.2.0-preview.4'
# Conflicts:
#	test/Test.Common.props
#	tools/packaging/packaging.psm1
2019-01-28 13:50:00 -08:00
Joel Sallow (/u/ta11ow) db1b309800 Correctly Report impact level when SupportsShouldProcess is not set to 'true' (#8209)
Major changes are:
- Make all commands return 'ConfirmImpact.None' if `SupportsShouldProcess` is not set to `true`.
- Update some cmdlets to explicitly use `ConfirmImpact.Low`.
- Update `DefaultCommands.Tests.ps1` to test for 'ConfirmImpact' level.
2019-01-26 03:12:00 -08:00
Mark Kraus ff83206e1c Fix Request Charset Issues in Web Cmdlets (#8742)
Instantiating a new MediaTypeHeaderValue object fails when the -ContentType parameter includes a charset such as application/json; charset=utf-8. This makes it impossible to set the content encoding on web requests. Moving to Parse() ensures we actually get a proper MediaTypeHeaderValue when the charset is present, thus allowing users to set their request encoding via proper -ContentType values.
2019-01-26 12:48:47 +05:00
Aditya Patwardhan 6ccbebda27 Improve check for developer mode by checking minimum required build number (#8749)
* Improve check for developer mode by checking minimum required build number

The test would fail if the developer mode is enabled but the machine has an older build than the minimum required build.
The change adds a check for the build version in the test.

* Update test/powershell/Modules/Microsoft.PowerShell.Management/New-Item.Tests.ps1
2019-01-25 13:14:29 -08:00
Sergey Vasin a9841d98fa Make Join-String -InputObject 1,2,3 result equal to 1,2,3 | Join-String result (#8611)
Make `Join-String -InputObject 1,2,3` result equal to `1,2,3 | Join-String` result.

Fix #8610
2019-01-24 12:53:37 -08:00
xtqqczze 863528881f Use https in URLs where available (#8622)
Use https in URLS across the repository where the domain serves content by https.
2019-01-24 12:50:11 -08:00
dependabot[bot] 60edeb2c76 Build(deps): Bump XunitXml.TestLogger from 2.0.0 to 2.1.26 (#8731) 2019-01-24 11:01:24 -08:00
Steve Lee 3a8205018e Fix Enter-PSHostProcess test to wait until runspace is ready before attempting to enter (#8725)
This fixes CI test failure in Windows build.
2019-01-23 15:07:34 -08:00
Steve Lee 7e2cd7954f Add the experimental feature for creating 'Temp:\' drive when FileSystemProvider initializes (#8696)
Adds Experimental Feature called `PSTempDrive` that, if enabled, creates a PSDrive called `Temp:` that maps to `[System.IO.Path]::GetTempPath()`.
2019-01-23 13:53:04 -08:00
Dongbo Wang 9ceddc0dfe
Refactor ConvertTo-Json to expose JsonObject.ConvertToJson as a public API (#8682)
We have the public API `JsonObject.ConvertFromJson` to convert from JSON string in the PowerShell context. It would be good to have a public API for conversion to JSON. This PR refactors the `ConvertTo-Json` cmdlet to move the core implementation to `JsonObject.ConvertToJson`, and make `ConvertTo-Json` call that public method.

This would help the Azure Function PowerShell worker. Currently, we depends on [calling the cmdlet](729710d259/src/PowerShell/PowerShellManager.cs (L198-L205)) to convert object to JSON which is expensive. Once we have the public method `JsonObject.ConvertToJson` exposed, we can call the API directly to avoid a command invocation.

# Conflicts:
#	test/Test.Common.props
2019-01-23 10:41:19 -08:00
Dongbo Wang c606b1ca37 Refactor ConvertTo-Json to expose JsonObject.ConvertToJson as a public API (#8682)
We have the public API `JsonObject.ConvertFromJson` to convert from JSON string in the PowerShell context. It would be good to have a public API for conversion to JSON. This PR refactors the `ConvertTo-Json` cmdlet to move the core implementation to `JsonObject.ConvertToJson`, and make `ConvertTo-Json` call that public method.

This would help the Azure Function PowerShell worker. Currently, we depends on [calling the cmdlet](729710d259/src/PowerShell/PowerShellManager.cs (L198-L205)) to convert object to JSON which is expensive. Once we have the public method `JsonObject.ConvertToJson` exposed, we can call the API directly to avoid a command invocation.
2019-01-23 10:39:12 -08:00
Travis Plunk c4b2105a73 Merged PR 6648: Bump SDK and Runtime Versions
Bump SDK and Runtime Versions
  - Also, fix alpine docker file
  - Also, fix extra files being added to some Modules after these changes
2019-01-23 02:18:44 +00:00
Aditya Patwardhan 9e8f5bde33 Merged PR 6644: Update hosting tests and metadata.json for 6.2.0-preview.4 release
Update hosting tests and metadata.json for 6.2.0-preview.4 release
2019-01-22 21:43:47 +00:00
xtqqczze 1df96c7ed5 Remove broken HelpUri from CimTest (#8688) 2019-01-22 11:21:45 -08:00
Mark Kraus 2dd549e34b Fix Code Page Parsing Isssue in Invoke-RestMethod (#8694) 2019-01-22 10:45:40 -08:00
Mark Kraus 67004aa224 Fix expect 100-continue Issue with Web Cmdlets (#8679)
Web Cmdlets will no longer forcibly remove Expect: 100-continue from web requests.
This was a legacy setting that needed to be there because of platform differences that have since been resolved in CoreFX.
2019-01-19 11:16:18 +05:00
Michael Klement 20919ee793 Allow 'name' as an alias key for 'label' in ConvertTo-Html, allow the 'width' entry to be an integer (#8426) 2019-01-18 11:02:22 -08:00
Mathias R. Jessen 59a3696f70 Allow user-specified underlying type for enums (#8329)
Fix #8028 

This change adds support for specifying the underlying type for an enum:

```powershell
enum MyEnum : long 
{
  A = 0x0FFFFFFFFFFFFFFF
  B
}
# or
enum MyByte : byte 
{
  A = 0x01
  B = 0x02
  C = 0x03
  D
}
```
2019-01-17 14:22:10 -08:00
Reece Dunham f29a04c1bd Remove appveyor environment checks (#8669) 2019-01-17 12:33:35 -08:00