mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-14 13:56:47 +00:00
[Ubuntu] Implement first Pester tests (#2270)
* implement first pester tests * add comment for azcopy test * remove extra importing and old function * resolve comments * fix typo
This commit is contained in:
committed by
GitHub
parent
be672cb22c
commit
2b93b03377
23
images/linux/scripts/helpers/SoftwareReport.Helpers.psm1
Normal file
23
images/linux/scripts/helpers/SoftwareReport.Helpers.psm1
Normal file
@@ -0,0 +1,23 @@
|
||||
function Take-OutputPart {
|
||||
param (
|
||||
[Parameter(ValueFromPipeline)]
|
||||
[string] $toolOutput,
|
||||
[string] $Delimiter = " ",
|
||||
[int[]] $Part
|
||||
)
|
||||
$parts = $toolOutput.Split($Delimiter, [System.StringSplitOptions]::RemoveEmptyEntries)
|
||||
$selectedParts = $parts[$Part]
|
||||
return [string]::Join($Delimiter, $selectedParts)
|
||||
}
|
||||
|
||||
function New-MDNewLine {
|
||||
param (
|
||||
[int] $Count = 1
|
||||
)
|
||||
$newLineSymbol = [System.Environment]::NewLine
|
||||
return $newLineSymbol * $Count
|
||||
}
|
||||
|
||||
function Restore-UserOwner {
|
||||
sudo chown -R ${env:USER}: $env:HOME
|
||||
}
|
||||
Reference in New Issue
Block a user