-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Expand file tree
/
Copy pathApt.Tests.ps1
More file actions
34 lines (30 loc) · 1.51 KB
/
Apt.Tests.ps1
File metadata and controls
34 lines (30 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
Describe "Apt" {
$packages = (Get-ToolsetContent).apt.cmd_packages + (Get-ToolsetContent).apt.vital_packages
$testCases = $packages | ForEach-Object { @{ toolName = $_ } }
It "<toolName> is available" -TestCases $testCases {
$originalName = $toolName
switch ($toolName) {
"acl" { $toolName = "getfacl"; break }
"aria2" { $toolName = "aria2c"; break }
"libnss3-tools" { $toolName = "certutil"; break }
"httpie" { $toolName = "http"; break }
"p7zip-full" { $toolName = "p7zip"; break }
"7zip" { $toolName = "7z"; break }
"subversion" { $toolName = "svn"; break }
"sphinxsearch" { $toolName = "searchd"; break }
"binutils" { $toolName = "strings"; break }
"coreutils" { $toolName = "tr"; break }
"net-tools" { $toolName = "netstat"; break }
"mercurial" { $toolName = "hg"; break }
"findutils" { $toolName = "find"; break }
"systemd-coredump" { $toolName = "coredumpctl"; break }
}
(Get-Command -Name $toolName).CommandType | Should -BeExactly "Application"
if ($originalName -eq "httpie") {
$path = (Get-Command -Name $toolName).Source
$owner = dpkg -S $path
$owner | Should -Match "httpie"
}
}
}