Check rpm executable
Before launching unit tests, we check if 'rpm' command is present or not. Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
This commit is contained in:
parent
4dc9ea39dd
commit
011f6356e1
@ -15,6 +15,7 @@
|
||||
package packages
|
||||
|
||||
import (
|
||||
"os/exec"
|
||||
"testing"
|
||||
|
||||
"github.com/coreos/clair/database"
|
||||
@ -42,5 +43,10 @@ var rpmPackagesTests = []packagesTest{
|
||||
}
|
||||
|
||||
func TestRpmPackagesDetector(t *testing.T) {
|
||||
_, err := exec.LookPath("rpm")
|
||||
if err != nil {
|
||||
log.Warningf("could not find rpm executable. skipping")
|
||||
return
|
||||
}
|
||||
testPackagesDetector(t, &RpmPackagesDetector{}, rpmPackagesTests)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user