mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 13:17:54 +00:00
Small improvements for software generator module (#6833)
This commit is contained in:
@@ -520,6 +520,39 @@ Describe "Comparer.E2E" {
|
||||
| EE | 66 |
|
||||
|
||||
|
||||
'@
|
||||
}
|
||||
|
||||
It "Reports are identical" {
|
||||
# Previous report
|
||||
$prevSoftwareReport = [SoftwareReport]::new("macOS 11")
|
||||
$prevSoftwareReport.Root.AddToolVersion("OS Version:", "macOS 11.7.1 (20G817)")
|
||||
$prevSoftwareReport.Root.AddToolVersion("Image Version:", "20220918.1")
|
||||
$prevInstalledSoftware = $prevSoftwareReport.Root.AddHeader("Installed Software")
|
||||
$prevTools = $prevInstalledSoftware.AddHeader("Tools")
|
||||
$prevTools.AddToolVersion("ToolA", "1.0.0")
|
||||
$prevTools.AddToolVersion("ToolB", "3.0.1")
|
||||
|
||||
# Next report
|
||||
$nextSoftwareReport = [SoftwareReport]::new("macOS 11")
|
||||
$nextSoftwareReport.Root.AddToolVersion("OS Version:", "macOS 11.7.1 (20G817)")
|
||||
$nextSoftwareReport.Root.AddToolVersion("Image Version:", "20220922.1")
|
||||
$nextInstalledSoftware = $nextSoftwareReport.Root.AddHeader("Installed Software")
|
||||
$nextTools = $nextInstalledSoftware.AddHeader("Tools")
|
||||
$nextTools.AddToolVersion("ToolA", "1.0.0")
|
||||
$nextTools.AddToolVersion("ToolB", "3.0.1")
|
||||
|
||||
# Compare reports
|
||||
$comparer = [SoftwareReportDifferenceCalculator]::new($prevSoftwareReport, $nextSoftwareReport)
|
||||
$comparer.CompareReports()
|
||||
$comparer.GetMarkdownReport() | Should -BeExactly @'
|
||||
# :desktop_computer: Actions Runner Image: macOS 11
|
||||
- OS Version: macOS 11.7.1 (20G817)
|
||||
- Image Version: 20220922.1
|
||||
|
||||
## :mega: What's changed?
|
||||
|
||||
|
||||
'@
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user