Commit graph

4306 commits

Author SHA1 Message Date
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
Jason Shirk (POWERSHELL)
f252683e90 Remove SessionStateOverflowException
This exception is no longer used by PowerShell, so it has been removed.

It is a public api, so removing it risks breaking somebody. Nobody has any reason
to catch or throw this exception, so it seems safe to remove, but I decided to
be conservative and keep it for Windows PowerShell.  It seems safe enough to remove
in Nano.
2016-09-28 15:47:08 -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
Manikyam Bavandla MSFT
c69520c261 Updating the ModuleVersion to 1.1.0.0 2016-09-28 15:33:05 -07:00
Manikyam Bavandla MSFT
16b86bfb89 Merging the changes from Windows Source Depot.
Change details:
- Add metadata to the PowerShellGet.psd1
- Fixed special chars in PSGet.Resource.psd1
- Catalog signing verification changes from Windows Source Depot
2016-09-28 15:33:05 -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
Sergei Vorobev
f45c6f2242 Merge pull request #2375 from mirichmo/mirichmo/validating-properties-reads
Validating JSON Properties File Reads Prior to Processing
2016-09-28 11:31:17 -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
9f9add03f6 Fixing PowerShellProperties.json reads to do a basic validity check prior to processing the JSON 2016-09-28 10:55:48 -07:00
Dongbo Wang
18f732f1e0 Improve Start-PSPackage to support zip package, downlevel packages for win-plat. Fix the version issue and package name for creating msi and appx (#2361)
* Improve Start-PSPackage to support zip package, downlevel packages for win-plat. Fix the version issue and package name for creating msi and appx

* Address comments about New-PSOptions

* Update Start-PSPackage to not show the warning from New-PSOptions
2016-09-28 10:47:16 -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
James Truher [MSFT]
379cc52b95 update testing guidelines
* correct links in test-guidelines.md (issue #1665)

added specific links for PesterDoAndDont and WritingPesterTests
added new section in WritingPesterTests.md on bulk skipping tests

* update test directories to include a directory for remoting tests

* fix lines in document to use semantic line breaks

also remove trailing spaces after "."
2016-09-27 12:55:47 -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
Jason Shirk (POWERSHELL)
c7951e13c0 Remove most Maximum* capacity variables
MaximumErrorCount is fixed at 256 (we may want to consider an environment variable to make this bigger)

MaximumAliasCount, MaximumDriveCount, MaximumFunctionCount, and MaximumVariableCount have been removed.
2016-09-26 15:16:35 -07:00
Andrew Schwartzmeyer
f4b565161e Remove bundler v1.13.1
The new version of bundler is buggy and causing installation of fpm to
fail, which causes builds to fail.
2016-09-26 14:51:54 -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
Jason Shirk (POWERSHELL)
07b0964be4 Fix hang when reading stdin from ruby
This is a workaround for a full clr issue that causes a hang when calling PowerShell from ruby.
They use named pipes instead of anonymous pipes, and for some reason that triggers the hang.
2016-09-26 11:22:28 -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
Andrew Schwartzmeyer
663e2429bc Ignore macOS failures on Travis CI (#2345)
Since the Travis CI OS X infrastructure is incredibly unstable,
we need to let the builds run on a best effort basis,
but not report failure and not hang a result until its finished.

With this setup, the Linux build dictates the success,
completely ignoring OS X.
2016-09-22 15:09:26 -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
Dongbo Wang
2b163f610b Merge pull request #2267 from ChrisUbben/PortTestMultiMachineProvidersPSDrive
Adding test coverage for PSDrive provider
2016-09-21 15:22:20 -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
Andrew Schwartzmeyer
eebe0b0d7d Merge pull request #2311 from andschwa/dependencies
Update dependency list
2016-09-20 16:31:38 -07:00
Andrew Schwartzmeyer
8a24d26e8d Patch System.Net.Http.Native.dylib
Again, .NET Core expects users to forcibly link the third party OpenSSL
libraries into system directories, which the Homebrew team advises
strongly against (and attempts to prevent). This also affects the
System.Net.Http library, and results in runtime errors during SSL
certificate validation. So instead, we patch what we can, when we can.
2016-09-20 14:34:32 -07:00
Andrew Schwartzmeyer
1b0a99fc13 Add one-line installation instruction 2016-09-20 14:10:40 -07:00
Andrew Schwartzmeyer
153ff43b50 Update Linux installation docs to resolve dependencies
Use `dpkg -i` followed by `apt-get install -f`. Alternatives considered
included using `apt install`, which does not work, and copying the
PowerShell package to `/var/cache/apt/archives` which is just as messy
as this. At least this follows the same steps as `download.sh`.
2016-09-20 14:02:16 -07:00