-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Description
test-module.ps1 uses locally installed Az.Accounts if its version is higher than the embedded one, but it didn't and caused the test cases of Functions to fail.
To reproduce
git checkout main
git reset --hard upstream/main
git checkout -b functions-update-stacks-may-2025-base
# generate code
autorest --reset
autorest --powershell --debug --verbose 3>&1 2>&1 > log.txt
# build module
.\build-module.ps1
# run tests
.\test-module.ps1 -Playback
Tests completed in 9.32s
Tests Passed: 0, Failed: 64, Skipped: 18, Pending: 0, Inconclusive: 0
PS C:\Users\x\code\azure-powershell\src\Functions\Functions.Autorest [68.08s]> gmo az.accounts -li
Directory: C:\Users\x\Documents\PowerShell\Modules
ModuleType Version PreRelease Name PSEdition ExportedCommands
---------- ------- ---------- ---- --------- ----------------
Script 4.2.0 Az.Accounts Core,Desk {Disable-AzDataCollection, Disable-AzContextAutosave, Enable-AzDataCollection, Enable-AzContextAutosave…}
Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version PreRelease Name PSEdition ExportedCommands
---------- ------- ---------- ---- --------- ----------------
Script 4.0.2 Az.Accounts Core,Desk {Disable-AzDataCollection, Disable-AzContextAutosave, Enable-AzDataCollection, Enable-AzContextAutosave…}
Mannually remove the one in .\generated\modules\Az.Accounts can workaround this problem.