-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests\Integration\MSFT_xScriptResource.Integration.Tests.ps1: Doesn't Work Outside of AppVeyor #582
Comments
I'm willing to work on this one (and the other AppVeyor related issues I opened), but would like to discuss what the best approach to this is. It seems that multiple Tests rely on using admin credentials and knowing the password. Part of this assumes that the tests are running on AppVeyor, which implies a known administrator account name. So the tests go in and randomly change the password on this account, and then create a credential object using that randomly generated password. There's a few problems with this:
One potential partial solution to this would be to have the test create a new account with Administrator privs, with a randomly generated password, and use that instead of relying on an existing account. I'm not sure what the best way to re-use those credentials throughout the job is though. A Global variable comes to mind, but I know that's frowned upon. Tagging @PlagueHO , @johlju , and @tmeckel for comment. Open to comments from the rest of the community too though. |
In the integration test template it was added the possibility of using a JSON file for real scenario testing. It would be great if there were a way to pass in the correct admin and password and the configuration creates the account. Not sure how to pass in an already existing account to use in the real scenario testing (outside of AppVeyor) |
Details of the scenario you tried and the problem that is occurring
Tests in 'Tests\Integration\MSFT_xScriptResource.Integration.Tests.ps1' currently fail when run from outside of AppVeyor. These tests should be adjusted to run on any supported system.
Verbose logs showing the problem
The operating system the target node is running
PS C:> Get-ComputerInfo -Property @(
'OsName',
'OsOperatingSystemSKU',
'OSArchitecture',
'WindowsVersion',
'WindowsBuildLabEx',
'OsLanguage',
'OsMuiLanguages')
OsName : Microsoft Windows Server 2019 Standard
OsOperatingSystemSKU : StandardServerEdition
OsArchitecture : 64-bit
WindowsVersion : 1809
WindowsBuildLabEx : 17763.1.amd64fre.rs5_release.180914-1434
OsLanguage : en-US
OsMuiLanguages : {en-US}
Version and build of PowerShell the target node is running
PS C:> $PSVersionTable
Name Value
PSVersion 5.1.17763.316
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.316
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Version of the DSC module that was used ('dev' if using current dev branch)
dev
The text was updated successfully, but these errors were encountered: