From c06a41216a58d37f66bfc5cecc3556a7d4d91d7c Mon Sep 17 00:00:00 2001 From: Christian Zunker <827818+czunker@users.noreply.github.com> Date: Thu, 21 Nov 2024 07:33:39 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20Azure/Windows=20tests=20(#?= =?UTF-8?q?4905)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian Zunker --- .../os/id/azcompute/testdata/metadata_linux.toml | 4 ++-- .../id/azcompute/testdata/metadata_windows.toml | 2 +- .../os/resources/smbios/testdata/windows.toml | 16 ++++++++++------ 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/providers/os/id/azcompute/testdata/metadata_linux.toml b/providers/os/id/azcompute/testdata/metadata_linux.toml index 73a2313a85..8ef6094ebd 100644 --- a/providers/os/id/azcompute/testdata/metadata_linux.toml +++ b/providers/os/id/azcompute/testdata/metadata_linux.toml @@ -8,8 +8,8 @@ stdout = "x86_64" stdout = "4.9.125-linuxkit" -[commands.e836b2521559a328a3f268b48fcde22c18a189f6a759923d9a610180507171e8] -command = "curl --noproxy '*' -H Metadata:true http://169.254.169.254/metadata/instance?api-version=2021-02-01" +[commands.a419040a7b125c49546d58475ce656422b349fd6cc1e72a57debe0825e707c11] +command = "curl --retry 5 --retry-delay 1 --connect-timeout 1 --retry-max-time 5 --max-time 10 --noproxy '*' -H Metadata:true http://169.254.169.254/metadata/instance?api-version=2021-02-01" stdout = """ { "compute": { diff --git a/providers/os/id/azcompute/testdata/metadata_windows.toml b/providers/os/id/azcompute/testdata/metadata_windows.toml index 8fdf17f5e4..1a15a96595 100644 --- a/providers/os/id/azcompute/testdata/metadata_windows.toml +++ b/providers/os/id/azcompute/testdata/metadata_windows.toml @@ -1,5 +1,5 @@ [commands] - [commands.4eaa1aadc1d75f75433a5f414826d30902818c2a2b857752a4f625b12ea73efb] + [commands.cd180a351282d1585cfae39bd7492a4cfd50c0208646cc77d3c42661563f98c4] command = "powershell.exe -NoProfile -EncodedCommand JABQAHIAbwBnAHIAZQBzAHMAUAByAGUAZgBlAHIAZQBuAGMAZQA9ACcAUwBpAGwAZQBuAHQAbAB5AEMAbwBuAHQAaQBuAHUAZQAnADsASQBuAHYAbwBrAGUALQBSAGUAcwB0AE0AZQB0AGgAbwBkACAALQBUAGkAbQBlAG8AdQB0AFMAZQBjACAAMQAgAC0ASABlAGEAZABlAHIAcwAgAEAAewAiAE0AZQB0AGEAZABhAHQAYQAiAD0AIgB0AHIAdQBlACIAfQAgAC0ATQBlAHQAaABvAGQAIABHAEUAVAAgAC0AVQBSAEkAIABoAHQAdABwADoALwAvADEANgA5AC4AMgA1ADQALgAxADYAOQAuADIANQA0AC8AbQBlAHQAYQBkAGEAdABhAC8AaQBuAHMAdABhAG4AYwBlAD8AYQBwAGkALQB2AGUAcgBzAGkAbwBuAD0AMgAwADIAMQAtADAAMgAtADAAMQAgAC0AVQBzAGUAQgBhAHMAaQBjAFAAYQByAHMAaQBuAGcAIAB8ACAAQwBvAG4AdgBlAHIAdABUAG8ALQBKAHMAbwBuAA==" exit_status = 0 stdout = """ diff --git a/providers/os/resources/smbios/testdata/windows.toml b/providers/os/resources/smbios/testdata/windows.toml index dfe20416f5..d3e60a708b 100644 --- a/providers/os/resources/smbios/testdata/windows.toml +++ b/providers/os/resources/smbios/testdata/windows.toml @@ -1,10 +1,13 @@ -[commands."wmic os get * /format:csv"] -stdout = """Node,BootDevice,BuildNumber,BuildType,Caption,CodeSet,CountryCode,CreationClassName,CSCreationClassName,CSDVersion,CSName,CurrentTimeZone,DataExecutionPrevention_32BitApplications,DataExecutionPrevention_Available,DataExecutionPrevention_Drivers,DataExecutionPrevention_SupportPolicy,Debug,Description,Distributed,EncryptionLevel,ForegroundApplicationBoost,FreePhysicalMemory,FreeSpaceInPagingFiles,FreeVirtualMemory,InstallDate,LargeSystemCache,LastBootUpTime,LocalDateTime,Locale,Manufacturer,MaxNumberOfProcesses,MaxProcessMemorySize,MUILanguages,Name,NumberOfLicensedUsers,NumberOfProcesses,NumberOfUsers,OperatingSystemSKU,Organization,OSArchitecture,OSLanguage,OSProductSuite,OSType,OtherTypeDescription,PAEEnabled,PlusProductID,PlusVersionNumber,PortableOperatingSystem,Primary,ProductType,RegisteredUser,SerialNumber,ServicePackMajorVersion,ServicePackMinorVersion,SizeStoredInPagingFiles,Status,SuiteMask,SystemDevice,SystemDirectory,SystemDrive,TotalSwapSpaceSize,TotalVirtualMemorySize,TotalVisibleMemorySize,Version,WindowsDirectory +[commands] + [commands.7ce30b85e14a034d16c5c90a783f09e0533e1fdf0369223c97c93913ccf1586a] + command = "wmic os get * /format:csv" + stdout = """Node,BootDevice,BuildNumber,BuildType,Caption,CodeSet,CountryCode,CreationClassName,CSCreationClassName,CSDVersion,CSName,CurrentTimeZone,DataExecutionPrevention_32BitApplications,DataExecutionPrevention_Available,DataExecutionPrevention_Drivers,DataExecutionPrevention_SupportPolicy,Debug,Description,Distributed,EncryptionLevel,ForegroundApplicationBoost,FreePhysicalMemory,FreeSpaceInPagingFiles,FreeVirtualMemory,InstallDate,LargeSystemCache,LastBootUpTime,LocalDateTime,Locale,Manufacturer,MaxNumberOfProcesses,MaxProcessMemorySize,MUILanguages,Name,NumberOfLicensedUsers,NumberOfProcesses,NumberOfUsers,OperatingSystemSKU,Organization,OSArchitecture,OSLanguage,OSProductSuite,OSType,OtherTypeDescription,PAEEnabled,PlusProductID,PlusVersionNumber,PortableOperatingSystem,Primary,ProductType,RegisteredUser,SerialNumber,ServicePackMajorVersion,ServicePackMinorVersion,SizeStoredInPagingFiles,Status,SuiteMask,SystemDevice,SystemDirectory,SystemDrive,TotalSwapSpaceSize,TotalVirtualMemorySize,TotalVisibleMemorySize,Version,WindowsDirectory VAGRANT,\\Device\\HarddiskVolume1,17763,Multiprocessor Free,Microsoft Windows Server 2019 Datacenter Evaluation,1252,1,Win32_OperatingSystem,Win32_ComputerSystem,,VAGRANT,-420,TRUE,TRUE,TRUE,3,FALSE,,FALSE,256,2,721716,979372,1922780,20190906065515.000000-420,,20190908011749.580533-420,20190908042731.608000-420,0409,Microsoft Corporation,4294967295,137438953344,{en-US},Microsoft Windows Server 2019 Datacenter Evaluation|C:\\Windows|\\Device\\Harddisk0\\Partition2,0,69,1,80,Vagrant,64-bit,1033,400,18,,,,,FALSE,TRUE,3,,00431-20000-00000-AA838,0,0,1179648,OK,400,\\Device\\HarddiskVolume2,C:\\Windows\\system32,C:,,3276340,2096692,10.0.17763,C:\\Windows """ -[commands."powershell -c \"Get-ItemProperty -Path 'HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion' -Name CurrentBuild, UBR, EditionID | ConvertTo-Json\""] -stdout=""" + [commands.e76ca74af8f43c08ea7e3986d859c3805b6497bb33f022ac2da9655a3fe5a2e0] + command = "powershell -c \"Get-ItemProperty -Path 'HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion' -Name CurrentBuild, UBR, EditionID | ConvertTo-Json\"" + stdout=""" { "CurrentBuild": "17763", "EditionID": "ServerDatacenterEval", @@ -12,8 +15,9 @@ stdout=""" } """ -[commands."powershell.exe -NoProfile -EncodedCommand JABQAHIAbwBnAHIAZQBzAHMAUAByAGUAZgBlAHIAZQBuAGMAZQA9ACcAUwBpAGwAZQBuAHQAbAB5AEMAbwBuAHQAaQBuAHUAZQAnADsACgAkAGIAaQBvAHMAIAA9ACAARwBlAHQALQBXAG0AaQBPAGIAagBlAGMAdAAgAC0AYwBsAGEAcwBzACAAVwBpAG4AMwAyAF8AQgBpAG8AcwAKACQAYgBhAHMAZQBiAG8AYQByAGQAIAA9ACAARwBlAHQALQBXAG0AaQBPAGIAagBlAGMAdAAgAFcAaQBuADMAMgBfAEIAYQBzAGUAQgBvAGEAcgBkAAoAJABjAGgAYQBzAHMAaQBzACAAPQAgAEAAKABHAGUAdAAtAFcAbQBpAE8AYgBqAGUAYwB0ACAAVwBpAG4AMwAyAF8AUwB5AHMAdABlAG0ARQBuAGMAbABv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GUAIABOAG8AdABlAFAAcgBvAHAAZQByAHQAeQAgAC0AVgBhAGwAdQBlACAAJABzAHkAcwAgAC0ATgBhAG0AZQAgAFMAeQBzAHQAZQBtAAoAJABzAG0AYgBpAG8AcwAgAHwAIABBAGQAZAAtAE0AZQBtAGIAZQByACAALQBNAGUAbQBiAGUAcgBUAHkAcABlACAATgBvAHQAZQBQAHIAbwBwAGUAcgB0AHkAIAAtAFYAYQBsAHUAZQAgACQAcwB5AHMAUAByAG8AZAB1AGMAdAAgAC0ATgBhAG0AZQAgAFMAeQBzAHQAZQBtAFAAcgBvAGQAdQBjAHQACgAKACQAcwBtAGIAaQBvAHMAIAB8ACAAQwBvAG4AdgBlAHIAdABUAG8ALQBKAHMAbwBuAAoA"] -stdout = """ + [commands.947d2a9bcd024b21cff05ccc63cbe70f1afa9316aef6b6bb7a32583d64951a07] + command = "powershell.exe -NoProfile -EncodedCommand JABQAHIAbwBnAHIAZQBzAHMAUAByAGUAZgBlAHIAZQBuAGMAZQA9ACcAUwBpAGwAZQBuAHQAbAB5AEMAbwBuAHQAaQBuAHUAZQAnADsACgAkAGIAaQBvAHMAIAA9ACAARwBlAHQALQBXAG0AaQBPAGIAagBlAGMAdAAgAC0AYwBsAGEAcwBzACAAVwBpAG4AMwAyAF8AQgBpAG8AcwAKACQAYgBhAHMAZQBiAG8AYQByAGQAIAA9ACAARwBlAHQALQBXAG0AaQBPAGIAagBlAGMAdAAgAFcAaQBuADMAMgBfAEIAYQBzAGUAQgBvAGEAcgBkAAoAJABjAGgAYQBzAHMAaQBzACAAPQAgAEAAKABHAGUAdAAtAFcAbQBpAE8AYgBqAGUAYwB0ACAAVwBpAG4AMwAyAF8AUwB5AHMAdABlAG0ARQBuAGMAbABvAHMAdQByAGUAKQAKACQAcwB5AHMAIAA9ACAARwBlAHQALQBXAG0AaQBPAGIAagBlAGMAdAAgAFcAaQBuADMAMgBfAEMAbwBtAHAAdQB0AGUAcgBTAHkAcwB0AGUAbQAKACQAcwB5AH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