From a87495d07c95f7d42f0d4e6db61f379bd87c3e19 Mon Sep 17 00:00:00 2001 From: ShachafGoldstein Date: Tue, 11 Jun 2019 00:07:10 +0300 Subject: [PATCH] win_pagefile: not using testPath (#57093) * win_pagefile: not using testPath * Added changelog --- .../fragments/57093-win_pagefile-Bug-not-using-testPath.yml | 2 ++ lib/ansible/modules/windows/win_pagefile.ps1 | 2 +- test/sanity/pslint/ignore.txt | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/57093-win_pagefile-Bug-not-using-testPath.yml diff --git a/changelogs/fragments/57093-win_pagefile-Bug-not-using-testPath.yml b/changelogs/fragments/57093-win_pagefile-Bug-not-using-testPath.yml new file mode 100644 index 00000000000000..9b427145b0791f --- /dev/null +++ b/changelogs/fragments/57093-win_pagefile-Bug-not-using-testPath.yml @@ -0,0 +1,2 @@ +bugfixes: + - "win_pagefile - not using testPath" \ No newline at end of file diff --git a/lib/ansible/modules/windows/win_pagefile.ps1 b/lib/ansible/modules/windows/win_pagefile.ps1 index 84dad687c0490c..c3a88d5a8ee3d2 100644 --- a/lib/ansible/modules/windows/win_pagefile.ps1 +++ b/lib/ansible/modules/windows/win_pagefile.ps1 @@ -91,7 +91,7 @@ if ($state -eq "absent") { } # Make sure drive is accessible - if (($test_path) -and (-not (Test-Path "${drive}:"))) { + if (($testPath) -and (-not (Test-Path "${drive}:"))) { Fail-Json $result "Unable to access '${drive}:' drive" } diff --git a/test/sanity/pslint/ignore.txt b/test/sanity/pslint/ignore.txt index 44649ab595ef73..6513a050b017e6 100644 --- a/test/sanity/pslint/ignore.txt +++ b/test/sanity/pslint/ignore.txt @@ -99,7 +99,6 @@ lib/ansible/modules/windows/win_pagefile.ps1 PSAvoidUsingCmdletAliases lib/ansible/modules/windows/win_pagefile.ps1 PSAvoidUsingPositionalParameters lib/ansible/modules/windows/win_pagefile.ps1 PSAvoidUsingWMICmdlet lib/ansible/modules/windows/win_pagefile.ps1 PSCustomUseLiteralPath -lib/ansible/modules/windows/win_pagefile.ps1 PSUseDeclaredVarsMoreThanAssignments lib/ansible/modules/windows/win_pagefile.ps1 PSUseSupportsShouldProcess lib/ansible/modules/windows/win_pester.ps1 PSCustomUseLiteralPath lib/ansible/modules/windows/win_product_facts.ps1 PSAvoidTrailingWhitespace