Commit Graph
100 Commits
Author SHA1 Message Date
James Truher [MSFT] 4fdc02b698 Add telemetry to track the use of features (#24247) 2024-09-16 16:28:19 -07:00
167a492415 Redirecting to a variable should be possible (#20381)
* add tests

* fix formatting issues

* Make redirection to variable an experimental feature.

Update test to check for experimental feature status.
Set-Variable will still have the -append parameter, but if used when the experimental feature is disabled, a parameter binding error will result.

* Check to be sure provider is not null.

* update to use different FullyQualifiedErrorId

* use Experimental attribute for append parameter rather than runtime check.

* Revert "update to use different FullyQualifiedErrorId"

This reverts commit 8b34af1ac19ecdb821b34534e446ab129830c92f.

* Update src/Microsoft.PowerShell.Commands.Utility/commands/utility/Var.cs

Co-authored-by: Ilya <darpa@yandex.ru>

* Move remediation steps into resource.

Update Set-Variable -Append to be correct when -name and -value are used.
Add tests for the new behavior in Set-Variable.

* Change expected error for contrained language mode and redirection.

* Update src/Microsoft.PowerShell.Commands.Utility/commands/utility/Var.cs

Co-authored-by: Ilya <darpa@yandex.ru>

* Support redirection of native app.

Add tests to validate.

* testexe needs proper case to run on linux.

* Address codefactor issues 01.

* Update src/System.Management.Automation/engine/runtime/Operations/MiscOps.cs

Co-authored-by: Steve Lee <slee@microsoft.com>

* Update src/Microsoft.PowerShell.Commands.Utility/commands/utility/Var.cs

Co-authored-by: Steve Lee <slee@microsoft.com>

* Update src/System.Management.Automation/engine/runtime/Operations/MiscOps.cs

Co-authored-by: Steve Lee <slee@microsoft.com>

---------

Co-authored-by: Ilya <darpa@yandex.ru>
Co-authored-by: Steve Lee <slee@microsoft.com>
2024-06-11 12:42:04 -04:00
James Truher [MSFT] 7f99fa1bf3 Get-Help may report parameters with ValueFromRemainingArguments attribute as pipeline-able (#23871)
* Remove FromRemainingArguments as an inputs indicator.

The parameter attribute FromRemainingArguments is not an indicator of pipeline input.
2024-06-03 21:20:55 +05:00
James Truher [MSFT] 76bca8f3b2 Fix up broken links in markdown files (#23863) 2024-05-28 14:02:42 -07:00
James Truher [MSFT] 0be73f1a42 Add debugging to the MTU size test (#21463) 2024-05-21 13:45:07 -07:00
James Truher [MSFT] d51f35e221 fix package build to not check some files for a signature. (#21458) 2024-04-11 23:46:51 +00:00
James Truher [MSFT] 0919240822 Rewrite the mac syslog tests to make them less flaky (#21174) 2024-02-07 13:09:41 -08:00
James Truher [MSFT] e9682c151d Fix using assembly to use Path.Combine when constructing assembly paths (#21169) 2024-02-01 09:49:20 -08:00
James Truher [MSFT] 3dbd1c6c69 Fix failures in GitHub action markdown-link-check (#20996) 2024-01-08 09:40:55 -08:00
James Truher [MSFT] 7f0fbfddfc Sign the global tool shim exe (#20794) 2023-12-06 10:53:56 -08:00
James Truher [MSFT] 2e5bd015c3 Add telemetry to check for specific tags when importing a module (#20371) 2023-10-16 15:31:56 -07:00
James Truher [MSFT] 81a7f6f621 Fix unixmode to handle setuid and sticky when file is not an executable (#20366) 2023-10-11 23:54:54 +00:00
James Truher [MSFT] 77e8021256 Set experimental features to stable for 7.4 release (#20285) 2023-09-22 17:01:22 -07:00
James Truher [MSFT]andTravis Plunk 8a0cb833be Release build: Change the names of the PATs. (#20307)
* Change the names of the PATs to the new names.

* Update releasePipeline.yml

---------

Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
2023-09-19 19:44:50 +00:00
James Truher [MSFT] 278ab414d3 Put the calls to Set-AzDoProjectInfo and Set-AzDoAuthToken` in the right order (#20306) 2023-09-19 12:18:00 -07:00
James Truher [MSFT] 3f3d79d475 Continued improvement to tests for release automation (#20182) 2023-09-06 10:36:48 -07:00
James Truher [MSFT] a469783e76 Harden some problematic release tests (#20155) 2023-08-28 10:55:25 -07:00
James Truher [MSFT] 046301b716 Additional test hardening for tests which fail in release pass. (#20093) 2023-08-16 11:28:59 -07:00
James Truher [MSFT] 341d21507a Remove Win-Arm32 from release build. (#20095)
It is no longer supported in dotnet 8.
2023-08-08 16:31:48 -07:00
James Truher [MSFT] 7b3e5444de Don't use a completion which has a space in it (#20064) 2023-08-01 18:07:37 -07:00
James Truher [MSFT] 91447e62de Fixes for release tests (#20028) 2023-07-27 15:04:30 -07:00
James Truher [MSFT] ee13bb9f05 Add more debugging to try to determine why these test fail in release build. (#19829) 2023-07-05 07:40:30 -07:00
James Truher [MSFT] 5437f387cc Add a new experimental feature to control native argument passing style on Windows (#18706) 2023-06-19 16:31:56 -07:00
James Truher [MSFT] b9b5136f0e Avoid checking screen scraping on non-Windows platforms before launching native app (#19812) 2023-06-19 11:26:14 -07:00
James Truher [MSFT] 133acc1961 Fix logic for Import-CliXml test (#19805) 2023-06-19 10:26:38 -07:00
James Truher [MSFT] ba0de3b4fe Add some debugging to the transcript test for SilentlyContinue (#19770) 2023-06-12 17:03:53 -07:00
James Truher [MSFT] 22fdbbda0b Re-enable Get-ComputerInfo pending tests (#19746) 2023-06-05 16:36:59 -07:00
James Truher [MSFT]andJames Truher 6c4eb38364 Update syslog parser to handle modern formats. (#19737)
Co-authored-by: James Truher <james@jwtmbp.local>
2023-06-05 11:07:05 -07:00
James Truher [MSFT] d9697f07ba Add a public API for getting locations of PSModulePath elements (#19422) 2023-05-22 17:02:31 -07:00
James Truher [MSFT] c444645b09 Change how 'isPreview' is determined for default cmdlets tests (#19650) 2023-05-15 10:25:12 -07:00
James Truher [MSFT] a533cefc8b Change logic for testing missing or extra cmdlets. (#19635) 2023-05-11 14:07:56 -07:00
James Truher [MSFT] a7898d2886 Harden 'All approved Cmdlets present' test (#19530) 2023-04-20 16:14:09 -07:00
James Truher [MSFT] 059b9524aa WIP: Harden default command test. (#19416) 2023-04-06 23:24:44 +00:00
James Truher [MSFT] 7ee22063c5 Improve package management acceptance tests by not going to the gallery (#19412) 2023-03-27 14:54:53 -07:00
James Truher [MSFT] 14d7bfee1d Telemetry improvements for tracking experimental feature optout (#18762) 2023-03-08 09:29:11 -08:00
James Truher [MSFT] 830f050fe6 Update a broken link in the README.md (#19187) 2023-02-22 17:36:27 +00:00
James Truher [MSFT] 5f3100cd95 Change test so output does not include newline. (#19026) 2023-01-25 18:02:20 -08:00
James Truher [MSFT] 4f57804f46 Fix up all comments to be in the proper order with proper spacing (#18619) 2023-01-03 12:12:42 -08:00
James Truher [MSFT] 074aad6ea9 Add missing -Tag 'CI' to describe blocks. (#18316) 2022-10-17 15:27:24 -07:00
James Truher [MSFT] 50ad429d7c Recurse the file listing. (#18277) 2022-10-13 13:38:45 -07:00
James Truher [MSFT] 33bbe7dadd Create tasks to collect and publish hashes for build files. (#18276) 2022-10-13 12:22:56 -07:00
James Truher [MSFT] 8d25b5ae6e Update to use version 2.21.0 of Application Insights. (#17903)
Replaces dependabot PR #17733
2022-08-16 09:37:48 -07:00
James Truher [MSFT] 031fa93b4c Add find.exe to legacy argument binding behavior for Windows (#17715) 2022-07-20 14:47:50 -07:00
James Truher [MSFT] bfb59f1acf Do not always collapse space between parameter and value for native arguments. (#17708) 2022-07-18 17:51:51 -07:00
James Truher [MSFT] c63957de27 Remove katacoda.com from doc as it now returns 404 (#17625) 2022-07-05 09:54:46 -07:00
James Truher [MSFT] 65d8f11aeb Update telemetry collecting with a few changes (#17304) 2022-05-16 17:10:51 -07:00
James Truher [MSFT] 1a24540e31 Enable more tests to be run in a container. (#17294) 2022-05-11 12:30:22 -07:00
James Truher [MSFT] f22e475f53 Change logic in the testing helper module for determining whether PSHOME is writable (#17218) 2022-04-28 17:02:57 -07:00
James Truher [MSFT] 84e73b2b45 Do not include node names when sending telemetry. (#16981) 2022-04-14 10:02:55 -07:00
James Truher [MSFT] 9c13c0494f Allow multiple installations of dotnet. (#17141)
* Allow multiple installations of dotnet.

A new flag for removal is now provided, but by default we will add a new version of dotnet.

* Add updated CG manifest.
2022-04-12 14:26:52 -07:00
James Truher [MSFT] b3632eda46 Improve unique naming for tests (#17043) 2022-03-23 09:24:10 -07:00
James Truher [MSFT] 74a51aa16e Use a random string for the missing help topic to improve the chances that the help topic really won't be found. (#17042) 2022-03-23 08:53:12 -07:00
James Truher [MSFT] 10027be363 Add -because to the failing test to aid in debugging (#17030) 2022-03-18 16:15:59 -07:00
James Truher [MSFT] 965095e4ba Do not pull dotnet updates from internal feed (#17007) 2022-03-18 13:45:24 -07:00
James Truher [MSFT] e22a427345 Simplify Enum generator for the -bnot operator test (#17014) 2022-03-18 11:18:47 -07:00
James Truher [MSFT] 0bb206aeee Improve logic for updating .NET in CI (#16808) 2022-01-31 09:47:27 -08:00
James Truher [MSFT] 19b5647c0a Update README.md to specify gathered telemetry (#16379) 2021-11-09 17:30:56 -08:00
James Truher [MSFT] c39d672560 Remove 4 assertions which cause debug build test runs to fail (#15963) 2021-08-22 10:49:07 -07:00
James Truher [MSFT] 5fea4c39fd Add more information when a syslog parsing error occurs (#15857) 2021-08-04 18:22:22 +00:00
James Truher [MSFT] 881f31b4b3 Harden logic when looking for syslog entries to be sure that we select based on PID (#15841) 2021-07-30 10:10:33 +05:00
James Truher [MSFT] ac762c1cce Add a Windows mode for native commands that allows some commands to use legacy argument passing (#15408) 2021-07-20 23:10:04 +00:00
James Truher [MSFT] 2f0cc3b0f8 Improve messages and behavior when there's a problem in finding zip files (#15284) 2021-04-20 16:04:49 -07:00
James Truher [MSFT]andIlya a520e2c982 Native invocation using ArgumentList (#14692)
Co-authored-by: Ilya <darpa@yandex.ru>
2021-04-01 14:54:10 -07:00
James Truher [MSFT] 907746cb2e Change signature validation logic to call first without the file content (#14849) 2021-02-23 12:23:16 -08:00
James Truher [MSFT] 073bf28e9b Do not push nupkg artifacts to myget (#14613) 2021-01-14 21:46:24 -08:00
James Truher [MSFT] 9ca6be1d63 Revert "Update hyperlink for DefaultPromptFunctionText (#13176)" (#14107) 2020-11-17 09:50:59 -08:00
James Truher [MSFT] f8b9e8e9db Create warnings when UTF7 is specified as an encoding (#13430) 2020-08-17 22:19:22 -07:00
James Truher [MSFT] 9acef7d41f Use PowerShell Core for build and test of package in CI build (#13223) 2020-07-21 09:43:53 -07:00
James Truher [MSFT] 05e682aed1 Update to dotnet SDK 5.0.0-preview.5.20268.9 (#12740)
<!-- Anything that looks like this is a comment and can't be seen after the Pull Request is created. -->

# PR Summary

Update to dotnet SDK 5.0.0-preview.5.20268.9

## PR Context

<!-- Provide a little reasoning as to why this Pull Request helps and why you have opened it. -->

## PR Checklist

- [x] [PR has a meaningful title](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
    - Use the present tense and imperative mood when describing your changes
- [x] [Summarized changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
- [x] [Make sure all `.h`, `.cpp`, `.cs`, `.ps1` and `.psm1` files have the correct copyright header](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
- [x] This PR is ready to merge and is not [Work in Progress](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---work-in-progress).
    - If the PR is work in progress, please add the prefix `WIP:` or `[ WIP ]` to the beginning of the title (the `WIP` bot will keep its status check at `Pending` while the prefix is present) and remove the prefix when the PR is ready.
- **[Breaking changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#making-breaking-changes)**
    - [x] None
    - **OR**
    - [ ] [Experimental feature(s) needed](https://github.com/MicrosoftDocs/PowerShell-Docs/blob/staging/reference/6/Microsoft.PowerShell.Core/About/about_Experimental_Features.md)
        - [ ] Experimental feature name(s): <!-- Experimental feature name(s) here -->
- **User-facing changes**
    - [x] Not Applicable
    - **OR**
    - [ ] [Documentation needed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
        - [ ] Issue filed: <!-- Number/link of that issue here -->
- **Testing - New and feature**
    - [ ] N/A or can only be tested interactively
    - **OR**
    - [x] [Make sure you've added a new test if existing tests do not effectively test the code changed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#before-submitting)
- **Tooling**
    - [x] I have considered the user experience from a tooling perspective and don't believe tooling will be impacted.
    - **OR**
    - [ ] I have considered the user experience from a tooling perspective and enumerated concerns in the summary. This may include:
        - Impact on [PowerShell Editor Services](https://github.com/PowerShell/PowerShellEditorServices) which is used in the [PowerShell extension](https://github.com/PowerShell/vscode-powershell) for VSCode (which runs in a different PS Host).
        - Impact on Completions (both in the console and in editors) - one of PowerShell's most powerful features.
        - Impact on [PSScriptAnalyzer](https://github.com/PowerShell/PSScriptAnalyzer) (which provides linting & formatting in the editor extensions).
        - Impact on [EditorSyntax](https://github.com/PowerShell/EditorSyntax) (which provides syntax highlighting with in VSCode, GitHub, and many other editors).
2020-05-21 20:45:57 +00:00
James Truher [MSFT] 349783fe36 Make sure to test whether we skip a test using consistent logic (#11892) 2020-02-19 14:20:35 -08:00
James Truher [MSFT] 4a0eda7fa9 Handle cases where CustomEvent was not initially sent (#11807) 2020-02-11 11:40:43 -08:00
James Truher [MSFT] bb8dbb953f Ensure that types referenced by PowerShellStandard are present (#10634) 2020-02-03 12:57:06 -08:00
James Truher [MSFT] 476a2d1dac Fixes for running tests on Raspbian (#11661) 2020-01-30 14:41:03 -08:00
James Truher [MSFT] 1484749f04 Test fixes for failing tests (#11541) 2020-01-14 08:40:50 -08:00
James Truher [MSFT] 57da778205 DSC test fixes for Alpine and Raspbian (#11508) 2020-01-07 16:57:08 -08:00
James Truher [MSFT] bcc5acb0bd Fix for issue on raspbian for setting date of file changes in UnixStat Experimental Feature (#11313) 2019-12-12 12:25:16 -08:00
James Truher [MSFT] d523d55739 Change comment and element text to meet MS standards (#11304) 2019-12-10 09:51:46 -08:00
James Truher [MSFT] fe712f8de2 Experimental Feature: Provide Unix stat information in filesystem output (#11042) 2019-11-15 17:26:11 -08:00
James Truher [MSFT] 3943f18c28 Alpine validation changes (#10428) 2019-08-24 11:35:34 -07:00
James Truher [MSFT] fe2cc6aca8 Additional Telemetry - Implementation of RFC0036 (#10336) 2019-08-15 16:13:53 -07:00
James Truher [MSFT] 4b67cdb9d4 Fix the platform check in CimDSCParser.cs (#9338) 2019-04-18 13:36:58 -07:00
James Truher [MSFT] 1006db647b Reduce time for stack overflow test (#9302)
Create a small class to do the work.
I saw 100x performance improvement in this test.
2019-04-12 14:21:33 -07:00
James Truher [MSFT] 2f0d127ef8 Check to be sure that the test result file has actual results before uploading (#9253)
VSTS produces a warning if the result set is 0, we will skip uploading this to avoid the warning and better support automation scenarios.

## PR Context

We have automation which checks our test results and if the result set is 0 for that file, a warning is produced. This PR will avoid uploading that file into the test results (which is valid, as there are no run tests). We will still add the file to our artifact list for completeness.
2019-04-01 16:47:55 -07:00
James Truher [MSFT] e605fbdea7 Fix tab completion test to handle multiple matches (#8891) 2019-03-11 14:51:22 -07:00
James Truher [MSFT] bbcedd2590 Update Pester version to 4.4.4 (#8739) 2019-01-31 11:41:26 -08:00
James Truher [MSFT] ddaffe23c6 Update Pester to use latest version (#8015) 2018-10-12 15:31:33 -07:00
James Truher [MSFT] 98cf44cdec Test changes needed for running in a container (#7869) 2018-09-28 13:49:31 -07:00
James Truher [MSFT] 087de5b5f1 Change logic for downloading zip files based on job id (#7653) 2018-08-31 16:55:42 -07:00
James Truher [MSFT] 727f2a07b8 Remove 'Suspend-Job' and 'Resume-Job' cmdlets from compilation (#7650)
The classes for the cmdlets are present but the Cmdlet attribute has been removed. There is no reason why we should be compiling these files, and it very slightly impacts our code coverage numbers.
2018-08-31 16:55:42 -07:00
James Truher [MSFT] bc1aac78d3 Change logic for downloading zip files based on job id (#7653) 2018-08-30 11:23:19 -07:00
James Truher [MSFT] 6d74298bb7 Remove 'Suspend-Job' and 'Resume-Job' cmdlets from compilation (#7650)
The classes for the cmdlets are present but the Cmdlet attribute has been removed. There is no reason why we should be compiling these files, and it very slightly impacts our code coverage numbers.
2018-08-29 17:11:20 -07:00
James Truher [MSFT] d61ea03694 Make pwsh able to start in a directory with wildcards in the name (#7240) 2018-07-12 15:10:31 -07:00
James Truher [MSFT] a6479f8181 Make sure that the width of the header is at least the size of the label (or propertyname) (#6487) 2018-03-28 13:34:29 -07:00
James Truher [MSFT] 30e9e309dc Rename some tests because they are duplicates (#6312)
Also remove a couple of language tests which were actually duplicated
Change the one loop which loops through test cases to include an iteration number to remove test name duplication
2018-03-07 10:25:49 -08:00
James Truher [MSFT] 99a7d38cae Update test framework and tests to support 4x version of Pester (#6064)
* Test fixes and changes needed to support Pester 4.0.8

* Replace 'Should Contain' with new 'Should FileContentMatch' assertion

Explicitly check for string creation with write-output

* Use the current version of pester and install it in modulesDir

* Simplify logic for relative path test.

Multiple '..' is not needed for a relative path, a single one will do. Also, on multi-drive systems using split-path -noqualifier will probably do the wrong thing with regard to constructing a correct path.
Remove extraneous Should Not Throw test, if this throws, the test will fail, we don't need to explicitly assert the not throw

* In some environments it is possible that computer name is 'localhost', so that should be allowed

* [feature] Add link for migrating tests from Pester v3 to v4

Fix up capitalization and white space issues
Change one test to check FullyQualifiedErrorId rather than just `Should Throw`

* [feature] update invoke-item test to handle the case where multiple notepad processes are running

* Fix spelling issue with Pester 4x, calling it Pester 4 should be sufficient
2018-02-05 11:58:25 -08:00
James Truher [MSFT] e1f5e3eabf Run tests for Windows installer only on Windows (#5619) 2017-12-04 17:40:05 -08:00
James Truher [MSFT] eaeca638fc Run tests for Windows installer only on Windows (#5619) 2017-12-04 14:18:52 -08:00
James Truher [MSFT] fe3e44f305 Change $OutputEncoding to be utf8 without BOM rather than ASCII (#5369) 2017-11-07 14:49:14 -08:00
James Truher [MSFT] d43b2cf958 Remove DCOM support from *-Computer cmdlets (#5277)
Since DCOM is not supported in corefx there was a great deal of dead code in the computer cmdlets.
This PR removes all vestiges of DCOM support from:

- Rename-Computer
- Restart-Computer
- Stop-Computer

removing about 4500 lines of dead code. Also, tests are updated to provide more complete coverage.
I also removed test-connection completely to make way for @iSazonov upcoming PR to improve coverage in tests, I created some test hook code which will test the cmdlet code without actually calling the WMI method to restart/rename/stop the system
2017-11-01 10:59:41 -07:00
James Truher [MSFT] 63f55427ec fix sparse-checkout list (#5263)
* fix sparse-checkout list
* Run powershell.exe in OpenCover since it will be in the path.
* If there's an error in Start-CodeCoverageRun be sure to log as much as possible
* Make the directory removal code common
2017-10-31 15:40:23 -07:00