Commit graph

644 commits

Author SHA1 Message Date
James Truher
f6ae238641 quiet the start-process tests by redirecting all output 2016-08-30 16:15:10 -07:00
James Truher
01c495b5e6 Change Import-PowerShellDataFile tag to CI and simplify tests 2016-08-30 16:15:10 -07:00
James Truher
c610ea7941 Add Set-Date test 2016-08-30 16:15:10 -07:00
James Truher
e639240ecb Add set-Date test
this one is a bit tricky, unless you're elevated you can't set the date
however, if you are not elevated you should get an error. This file
does one or the other based on whether you're elevated
2016-08-30 16:15:10 -07:00
James Truher
feae8e4b2d add read-host tests 2016-08-30 16:15:10 -07:00
Yanbing Wang
08d65596cd removed the first 3 lines in i18n.Tests.ps1 2016-08-30 12:17:27 -07:00
Yanbing Wang
04f225a4a1 Update i18n.Testsps1 to use PSDefaultParameterValues 2016-08-29 17:54:20 -07:00
Jumping Yang[Wicresoft]
d59b322032 Add BooleanParameterDCR and Eventing Pester Test (#2031)
* Add BooleanParameterDCR and Eventing Pester Test

* Correct describe for Eventing Pester Test

* Add ProviderIntrinsics and Serialization Pester Test
2016-08-29 13:01:03 -04:00
Yanbing Wang
bbbd6a9dfc Change some context to it 2016-08-26 19:37:51 -07:00
Manikyam Bavandla
1e13d7897a Update PowerShellGet to install the modules and scripts to proper locations in PowerShell Core on Windows (#2078)
* 1. Update PowerShellGet to install the modules and scripts to proper locations in PowerShell Core on Windows. 2. Added few CI tests for PowerShellGet

* Handling the scenario of FullCLR-based PowerShell on Windows.
2016-08-26 16:58:22 -07:00
Yanbing Wang
312ec5ffd0 Add Tests for parsing, international, and script help. 2016-08-26 14:49:44 -07:00
Josh Soref
2badb244de spelling fixes: test 2016-08-25 17:49:32 +00:00
xiaoyinl
f538eeb416 Use HTTPS links for go.microsoft.com
I replace all occurrences of http://go.microsoft.com with https://go.microsoft.com in text files.
2016-08-23 21:21:31 -04:00
Mike Richmond
18f3589d68 Fixing the path to the user's JSON configuration file 2016-08-23 15:45:49 -07:00
James Truher
9d1c998287 Filling test gaps (issue 2022) - this replaces PR 1834
This replaces PR 1834 from the private fork I had
2016-08-22 14:56:04 -07:00
Barry Nolte
890e80dd54 Getting tests to run from build directory with spaces in it (#1981)
* [build.psm1] - mc.exe input file needs quotes

For filenames that have spaces or paths to that file that have spaces, the input filename needs to have quotes around it.

* Quoted more paths so tests run from directories with spaces

Found a few locations where paths weren't qutoed or escaped with '& ...' that are needed to get tests to run from build directories with spaces in them.
2016-08-22 09:57:30 -04:00
James Truher
5644c4c54b Create new test for Get-Credential which requires module to create a test host 2016-08-19 13:01:04 -07:00
Micah R Ledbetter
be186e833b Correct link to Pester Do and Don't document 2016-08-19 11:29:50 -05:00
Jason Shirk
8b056776c0 Stop using 'Open PowerShell' and OPS in code (#1838) 2016-08-16 17:03:34 -07:00
Dongbo Wang
9ab60d6621 Fix the test that fails in Travis CI build (#1792) 2016-08-12 18:36:16 -07:00
Jason Shirk
e550b6920c Merge pull request #1337 from PowerShell/TestGetCommand
Add Pester test for TestGetCommand.cs
2016-08-12 11:41:02 -07:00
Mike Richmond
539c59cc35 Merge pull request #1721 from PowerShell/dongbo/module-path
Address the side-by-side module path for OPS
2016-08-12 11:30:10 -07:00
Jason Shirk
22a1f0a8b7 Merge pull request #1676 from PowerShell/NullableBooleanDCR
Add NullableBooleanDCR Pester Test
2016-08-12 11:21:20 -07:00
Dongbo Wang
401b6194da Address review comments in test code 2016-08-12 11:01:46 -07:00
TingLiu6
d0c62017a9 Add NullableBooleanDCR Pester Test 2016-08-12 00:21:28 -07:00
Dongbo Wang
23ed0e4fa2 Use capital 'PSMODULEPATH' in tests so that it works in unix 2016-08-11 21:45:20 -07:00
Dongbo Wang
8bb291896c Change 'Platform.XDG_Type' and 'Platform.SelectProductNameForDirectory' back to 'public'
Add CI tests for the module path change
2016-08-11 21:45:20 -07:00
Dongbo Wang
753b202a75 Fix tests that were broken by the sxs module path change. Also fix some unreliable tests. 2016-08-11 21:45:20 -07:00
JumpingYang001
2d0d9765d9 Add Shell Interop Pester Test 2016-08-10 23:09:17 -07:00
Francisco Gamino
135af2089a Updating tests to install the help content before running on Windows 2016-08-10 12:19:51 -07:00
Francisco Gamino
2b1dc87774 Adding Feature tag to help tests 2016-08-10 12:19:51 -07:00
Francisco Gamino
233e75657a Breaking down help tests for CI and Feature test runs 2016-08-10 12:19:51 -07:00
Francisco Gamino
3ed7201e21 Fixing get-help on Linux 2016-08-10 12:19:51 -07:00
Andrew Schwartzmeyer
d59710d310 Remove unimplemented Management cmdlets from Unix
These are not currently implemented and so should not show up as
available.

The *-Computer cmdlets are already not compiled for Unix (and so not
available), so let's not declare them in the manifest.

The Get-ComputerInfo cmdlet does not work on Unix and so should not be
made available.

Test-Connection depends on an unavailable WMI provider.

Get/Set-TimeZone are not yet ported.
2016-08-09 18:54:05 -07:00
Andrew Schwartzmeyer
280bd651c1 Remove unimplemented Utility cmdlets from Unix
ConvertFrom-SddlString and Unblock-File are Windows-specific cmdlets
with no equivalent on Unix.

squash! Remove Unblock-File from Unix
2016-08-09 18:53:43 -07:00
Travis Plunk
3d3e67fd4e Merge pull request #1641 from PowerShell/LanguagePrimitiveTest
Add Language Primitive Test
2016-08-09 12:14:02 -07:00
TingLiu6
c8e38ec506 Add Get-Command Pester Test 2016-08-08 20:19:11 -07:00
TingLiu6
a50114d5da Add Language Primitive Pester Test 2016-08-08 19:39:06 -07:00
Andrew Schwartzmeyer
5bc34eb63c Run Trace-Command tests on CI 2016-08-08 12:11:51 -07:00
Dongbo Wang
ba2cd1d2b7 Merge pull request #1669 from andschwa/safe-hostname
Safe hostname
2016-08-08 11:10:53 -07:00
Andrew Schwartzmeyer
a8416d7b30 Consolidate GetUserName code
Once .NET Core 1.1 becomes available, we can likely remove the entirety
of CorePsExtensions.cs.
2016-08-08 10:48:59 -07:00
Dongbo Wang
9a0436b856 Merge pull request #1661 from PowerShell/dongbo/get-pssession
Fix if/def guards to allow engine to load WsMan and Diagnostics snapins by default when RunspaceConfiguration is used to create a runspace
2016-08-05 13:00:06 -07:00
Dongbo Wang
dc9b326587 Fix issue #1609 - Get-PSSession -computername fails on nano
Root cause: Microsoft.WSMan.Management  and  Microsoft.PowerShell.Commands.Diagnostics  are not put in the default snapin list for win-ops, and thus when a runspace is created using RunspaceConfiguration, those 2 are not loaded as snapins by default, which is a behavior change compared to Nano PS.
Fix: Replace the guard 'PORTABLE' to be 'UNIX' so that they are in the default snapin list when targeting windows platform.
2016-08-05 11:20:14 -07:00
Andrew Schwartzmeyer
09e1683098 Add Ubuntu 16.04 RID 2016-08-05 10:09:40 -07:00
TingLiu6
89d24fd8ba Add ParameterBinding Pester Test 2016-08-04 19:50:35 -07:00
Jason Shirk
f15e66b283 Merge pull request #1633 from PowerShell/revert_psedition_namechange
Revert the changes made in #1457. Desktop and Core are the PowerShell Edition names. Remove Linux as edition name.
2016-08-04 12:21:12 -07:00
John Kordich
ee7356e36e Disabling unit tests for OSX 2016-08-04 10:47:41 -07:00
John Kordich
0c7cbc1667 Adding Import-Module to MOF-Compilation tests 2016-08-04 10:47:41 -07:00
John Kordich
e0fdf1ed00 Fixing up mof compilation test script to set PSMODULEPATH properly 2016-08-04 10:47:41 -07:00
John Kordich
643533b6a8 Adding DSC MOF compilation for Linux tests 2016-08-04 10:47:41 -07:00
Manikyam Bavandla
eacfd9418c Revert "Merge pull request #1458 from PowerShell/psedition_rename"
This reverts commit 042d1e99bb, reversing
changes made to 105bf9c9ff.
2016-08-03 15:53:31 -07:00
Jason Shirk
31b3d13e10 Merge pull request #1623 from PowerShell/jimtru/PSDriveFreeSpaceFix
Get-PSDrive should report proper free space on all platforms
2016-08-03 14:11:28 -07:00
Jason Shirk (POWERSHELL)
420155517a Add serialization test of SemanticVersion 2016-08-03 13:21:42 -07:00
James Truher
1bbdaa7ea8 Change free/used calculation to be consistent across platforms
add a couple of tests to validate return values
2016-08-03 10:38:26 -07:00
Sergei Vorobev
b654b7d4b1 Merge pull request #1501 from PowerShell/jameswtruher/CmdletTestMigration
Jameswtruher/cmdlet test migration
2016-08-02 14:09:10 -07:00
James Truher
6a07b71ba6 update tests to include $IsCoreCLR rather than $IsCore
also fix archive test to be sure it gets the proper archive module (not the one that's somewhere in the filesystem)
2016-08-02 12:50:24 -07:00
Jason Shirk
cfba7537f3 Merge pull request #1599 from PowerShell/error-stream
Error stream
2016-08-02 12:15:13 -07:00
James Truher
0a18a46281 Update json tests to be more cross-plat and handle multiple invocations
only create the enumtest type if it doesn't exist
don't try to compare line endings on json tests which contain arrays,
formatting of the output need not be validated
2016-08-02 12:05:24 -07:00
James Truher
dd0291be09 update encoding on the test files - these are ascii 2016-08-02 12:05:24 -07:00
James Truher
7b836f99f5 create work-around for MacOS in handling wildcards 2016-08-02 12:05:24 -07:00
James Truher
0f60b69af4 Fix Get-Command tests to better handle non-Windows platforms.
set executable bit on Linux/MacOS as that's what determines whether something
is executable. Also simplify partial path creation, only remove up to the first
colon, so those filesystems which have a single root are treated properly
2016-08-02 12:05:24 -07:00
James Truher
96a81c626c rename test files so they match map.json and can be found by invoke-pester 2016-08-02 12:05:24 -07:00
PowerShell Team
1d11f67376 fix two more file copy targets
they weren't being recognized as pester tests because they didn't have the right name
2016-08-02 12:05:24 -07:00
James Truher
176f9fb6bd rename archive test file so it may be found by invoke-pester 2016-08-02 12:05:24 -07:00
PowerShell Team
3575eac7b3 fix typo in archive test name
it needs to have the correct name in order to be executed by invoke-pester
2016-08-02 12:05:24 -07:00
PowerShell Team
ce4303b873 migrated tests run clean on all platforms (locally) 2016-08-02 12:05:24 -07:00
PowerShell Team
0261372bae remove scheduled job tests 2016-08-02 12:05:24 -07:00
PowerShell Team
43eae99276 remove scheduledjob cmdlet tests 2016-08-02 12:05:24 -07:00
PowerShell Team
7305b82b73 Add migrated files 2016-08-02 12:05:24 -07:00
PowerShell Team
721ad34c62 add missing sample archive file 2016-08-02 12:05:24 -07:00
PowerShell Team
28a06155c8 add map.json file for migration of Pester cmdlet tests 2016-08-02 12:05:24 -07:00
JumpingYang001
86bf00e48b Add Adapter Pester Unit Test 2016-08-02 00:31:27 -07:00
Sergei Vorobev
5690b1a0d9 Add tests for Error stream 2016-08-01 18:40:51 -07:00
Jason Shirk
0513425ff9 Merge pull request #1566 from PowerShell/andschwa/chars
Fix PSReadLine custom key binding on Linux
2016-07-29 09:10:10 -07:00
Andrew Schwartzmeyer
9cc6673b27 Add regression tests for custom key bindings
Also tests capitalized key bindings, hence the need to compare case
sensitively.
2016-07-28 22:41:04 -07:00
Sergei Vorobev
dac906db3d Skip $input type test per #1563 2016-07-28 18:02:24 -07:00
Dongbo Wang
14433e6b1f Update project.json files to keep sync with the new MMI nuget package 2016-07-28 17:07:57 -07:00
Sergei Vorobev
a704a53f08 Make Get-Item env: case-aware on Unix
Fix #1196
2016-07-28 14:19:36 -07:00
Sergei Vorobev
d591871b2c Add CI tag to SemanticVersion.Tests.ps1 2016-07-27 18:54:40 -07:00
Sergei Vorobev
06252836ea Make 'cd' go to the HOME directory 2016-07-27 18:43:19 -07:00
Sergei Vorobev
aa72512c76 Merge pull request #1523 from lzybkr/semver
Semver
2016-07-27 18:35:12 -07:00
James Truher
fa1b386a08 make sure that all tests are using the proper $IsCoreCLR variable instead of $IsCore 2016-07-27 12:32:17 -07:00
James Truher
ac8238075d mark the add-type tests as pending for $IsCore 2016-07-27 12:14:08 -07:00
James Truher
f0233a8d20 fix bad tag to check tag checking 2016-07-27 12:06:51 -07:00
James Truher
0b61bb6464 purposefully create a bad tag to test tag checks for build 2016-07-27 12:06:51 -07:00
James Truher
5e61213be9 update appveyor.yml to check for bad test tags
add the function to check tags to build.psm1
rename the parser tests so they actually execute
2016-07-27 12:06:51 -07:00
James Truher
456bc4da6b marked some package tests as feature rather than CI 2016-07-27 12:06:51 -07:00
James Truher
1b9565ae89 add tags to describe blocks that didn't have any tags 2016-07-27 12:06:51 -07:00
James Truher
a784149b36 all tests are now marked with proper tag
also, update build.psm1 to be more flexible
2016-07-27 12:06:51 -07:00
James Truher
9e225ccae2 changes tags for tests
Start using tags CI, Feature, Scenario
2016-07-27 12:06:51 -07:00
Jason Shirk (POWERSHELL)
8e8ade947d Add SemanticVersion tests 2016-07-27 10:53:11 -07:00
Sergei Vorobev
d8a040ca99 Add test for Add-Type System.Runtime.Serialization.Primitives.dll TPA 2016-07-26 17:53:52 -07:00
Sergei Vorobev
3fd885ef2d Add-Type: add mscorlib.dll to the list of default references
Fix #1361
On CoreCLR 1.0.0 RTM the layout changed compare to RC2.
This change accounts for it.
This change also cleans up some left-overs for SecureString ref.
2016-07-26 17:45:49 -07:00
Sergei Vorobev
52569380c7 Merge pull request #1519 from PowerShell/vors/json
Fix ConvertFrom-Json to handle mutlilines
2016-07-26 14:37:36 -07:00
Andrew Schwartzmeyer
41173a3b65 Rename IsCore to IsCoreCLR 2016-07-26 11:54:08 -07:00
Sergei Vorobev
3240a2d369 Fix ConvertFrom-Json to handle mutlilines
Fix #956

Add Newtonsoft.Json.JsonSerializationException to catch block
that determines which mode to use: single-string or multi-string
2016-07-26 11:11:44 -07:00
Francisco Gamino
42105138a7 Adding WebCmdlets tests 2016-07-24 16:20:46 -07:00
Sergei Vorobev
875402ad53 Create separate Top-level directory per platform
- Replace src\powershell top level project by two
  new root-level projects:
    - src\powershell-unix
    - src\powershell-windows
- Break src\Modules into more granular structure:
  - Shared
  - Windows+Unix-Core
  - Windows-Core
  - Windows-Core+Full
  - Windows-Full
  - To be created: Unix-Core. We will do it as a separate PR
- Fix #1122 : Platform-specific set of Modules (and assemblies)
- Fix Start-TypeGen to work with new top level folders layout
2016-07-22 16:11:29 -07:00
Andy Schwartzmeyer
5cec5f1b04 Merge pull request #1487 from PowerShell/andschwa/convert-utf
Convert UTF-16 files to UTF-8
2016-07-22 14:44:29 -07:00
PowerShell Team
165f2a86c3 Convert UTF-16 files to UTF-8 2016-07-22 13:54:34 -07:00
Sergei Vorobev
4c78fc5e7f Scope ExecutionPolicy tests to Process
Allow it run without admin escalation
2016-07-22 12:58:50 -07:00
Manikyam Bavandla MSFT
042d1e99bb Merge pull request #1458 from PowerShell/psedition_rename
Rename Desktop & Core PSEditions to WindowsPowerShell & PowerShellCore
2016-07-21 15:29:00 -07:00
Manikyam Bavandla
66f0b83e89 Merge branch 'master' into psedition_rename 2016-07-21 12:16:38 -07:00
Manikyam Bavandla
2a67fd8ec5 Updating the "Should have the correct edition" test
Updating the "Should have the correct edition" test
2016-07-21 12:16:16 -07:00
Andrew Schwartzmeyer
c9c3e0b9be Remove managed CommandLineToArgv
It is entirely unused.
2016-07-21 10:39:16 -07:00
James Truher [MSFT]
a6072c4576 Merge pull request #1447 from PowerShell/jameswtruher/LanguageTestMigration
language pester test migration - woo - adding 800 more tests
2016-07-20 18:29:56 -07:00
Travis Plunk
88973bfd14 Merge pull request #1439 from PowerShell/FixMaster
Changed Find-Package test to 'SLOW' to fix master
2016-07-20 18:28:05 -07:00
James Truher [MSFT]
c2364b6e26 Merge pull request #1404 from PowerShell/ParsePesterUnitTest
Add remain part of Parser Pester Unit Test
2016-07-20 18:19:10 -07:00
Travis Plunk
cd9ddb156d Used method from PR comments to find powershell
replaced dir with get-childitem
used appropriate path when importing pester
verified failure count was 0
split test case verification into individual it's so we get all the info.
2016-07-20 16:28:33 -07:00
Travis Plunk
6fea33379d made powershell invoke compatible with linux 2016-07-20 16:28:33 -07:00
Travis Plunk
441b105fd8 Made the test run in new powershell
Ran the test with the same filter
Imported the result
cleaned up the test run
2016-07-20 16:28:33 -07:00
Travis Plunk
ffe0a250a9 Changed Find-Package test to 'SLOW' 2016-07-20 16:28:32 -07:00
James Truher
84041fb37d fix Get-PSBreakpoint test to not require 0 as the breakpoint id
Essentially, other tests may set breakpoints and the Id is ever
increasing, so a test for Id 0 will only be true if this is the
first time a breakpoint has been set in this session
2016-07-20 12:54:59 -07:00
James Truher
b680b48160 tests now run clean on Windows and Linux 2016-07-20 12:10:12 -07:00
PowerShell Team
2674564542 Language tests now run clean on Linux 2016-07-20 12:10:12 -07:00
PowerShell Team
cb08681a55 Add new test files to Language directory 2016-07-20 12:10:12 -07:00
PowerShell Team
395657e33c fixed up incorrect cases 2016-07-20 12:10:12 -07:00
PowerShell Team
7048f370bd Add map.json for language test migration 2016-07-20 12:10:12 -07:00
Andrew Schwartzmeyer
a51b8d500b Mark feed dependent NuGet tests as pending
The feed/credential combo has stopped working, breaking all CI runs.
2016-07-19 15:30:23 -07:00
Andrew Schwartzmeyer
f9ed7e84fb Mark failed NuGet test as pending
Once the clean-up stage on Linux / OS X was fixed, this test stopped
passing. This test should be fixed.
2016-07-19 15:12:12 -07:00
Andrew Schwartzmeyer
472947bf76 Fix use of rm alias in tests
This is not an alias on Linux / OS X.
2016-07-19 15:12:12 -07:00
JumpingYang001
243142693f Add remain part of Parser Pester Unit Test 2016-07-18 02:16:19 -07:00
Jason Shirk
5a1432e234 Merge pull request #1388 from PowerShell/andschwa/default-editmode
Use Emacs as DefaultEditMode on Linux / OS X
2016-07-15 15:57:58 -07:00
Andrew Schwartzmeyer
b745d75f1b Test PSReadLine's DefaultEditMode and bindings 2016-07-15 13:43:29 -07:00
Sergei Vorobev
736eaade3c Add CimCmdlets module in the produced package of core modules 2016-07-15 13:25:38 -07:00
Andy Schwartzmeyer
cec82d3cd6 Merge pull request #1384 from PowerShell/andschwa/platform-cleanup
Platform cleanup
2016-07-15 11:17:15 -07:00
JumpingYang001
f2f9becbba Fix comments for Parser Pester Test Part 2 2016-07-14 19:48:53 -07:00
JumpingYang001
98d9599b57 Fix comments and add Parser Pester Test Part 2 2016-07-14 19:48:52 -07:00
JumpingYang001
368b6a5c6c Add Parser Pester Test Part 1 2016-07-14 19:48:52 -07:00
Andrew Schwartzmeyer
32e0a7dcaa Format New-Item.Tests.ps1 2016-07-14 17:34:12 -07:00
Andrew Schwartzmeyer
e6c037c666 Remove Platform.HasExecutionPolicy query
Also change Get-ExecutionPolicy to not throw, but to return
Unrestricted (which is the effect of the actual policy).
2016-07-14 17:34:12 -07:00
Andrew Schwartzmeyer
73a1a51f69 Remove Platform.HasRegistry query 2016-07-14 17:34:12 -07:00
Andrew Schwartzmeyer
c2cd059aa8 Remove Platform.HasDriveAutoMounting query 2016-07-14 17:34:12 -07:00
Andrew Schwartzmeyer
c9a4197af1 Remove Platform.HasAmsi query 2016-07-14 17:34:12 -07:00
Andrew Schwartzmeyer
46cfa26812 Remove Platform.HasCom query 2016-07-14 17:34:12 -07:00
Sergei Vorobev
6c087155a7 Update PowerShellGithubDev.Tests.ps1 2016-07-14 13:46:29 -07:00
Quoc Truong
ac7bed909e Merge pull request #1359 from PowerShell/quoct/onegettest
Enable test for PackageManagement on CorePowerShell
2016-07-14 13:26:01 -07:00
Quoc Truong
d7309a2435 Remove test that calls powershell 2016-07-14 09:56:35 -07:00
Quoc Truong
24eaf67917 Remove install contoso credential test 2016-07-13 16:36:29 -07:00
Quoc Truong
6338d8c33a Remove scope test for install-package in nuget.tests.ps1 2016-07-13 15:58:05 -07:00
Andrew Schwartzmeyer
6f938bd860 Add regression test for Get-Process -IncludeUserName 2016-07-13 15:46:25 -07:00
Quoc Truong
67bc478695 Fix test failure for Install-PackageProvider.tests.ps1 on Windows 2016-07-13 15:39:52 -07:00
Andy Schwartzmeyer
a39beee33d Merge pull request #1264 from PowerShell/childitem
Fixing symlink to use absolute paths instead of relative
2016-07-13 12:57:26 -07:00
quoctruong91
a041c44c5b Fix a test failure where path name is not in the correct case 2016-07-13 01:34:38 -07:00
quoctruong91
8253bb9b85 Fix NuGet.tests.ps1 failure 2016-07-13 01:09:47 -07:00
quoctruong91
987faf03a7 Remove test that requires installing packages that has dependencies 2016-07-13 00:34:43 -07:00
quoctruong91
50c3e5bfc8 Fix Install PackageProvider failure because we are not running on administrator 2016-07-12 21:17:11 -07:00
Quoc Truong
c978927947 Fix Nuget tests 2016-07-12 21:17:11 -07:00
Quoc Truong
85955352fe Fix test failures for PackageManagement 2016-07-12 21:17:11 -07:00
PowerShell Team
55b8cd1da6 Import source-depot tests for PackageManagement 2016-07-12 21:17:11 -07:00