test: optimize win_psmodule tests (#53431)

This commit is contained in:
Jordan Borean 2019-03-11 05:43:21 +10:00 committed by GitHub
parent 57f706e5a0
commit 830a11dd38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 841 additions and 1235 deletions

View file

@ -291,6 +291,7 @@ Function Install-Repository {
[string]$Url,
[bool]$CheckMode
)
Add-DeprecationWarning -obj $result -message "Adding a repo with this module is deprecated, the repository parameter should only be used to select a repo. Use win_psrepository to manage repos" -version 2.12
# Install NuGet provider if needed.
Install-NugetProvider -CheckMode $CheckMode
@ -318,6 +319,7 @@ Function Remove-Repository{
[string]$Name,
[bool]$CheckMode
)
Add-DeprecationWarning -obj $result -message "Removing a repo with this module is deprecated, use win_psrepository to manage repos" -version 2.12
$Repo = (Get-PSRepository).Name

View file

@ -70,11 +70,13 @@ options:
version_added: "2.8"
repository:
description:
- Name of the custom repository to register or use.
- Name of the custom repository to use.
type: str
url:
description:
- URL of the custom repository to register.
- This option is deprecated and will be removed in Ansible 2.12. Use the
M(win_psrepository) module instead.
type: str
notes:
- PowerShell modules needed