From 6c80f9910f9a6cf26392c6d0ec2fb21293628e55 Mon Sep 17 00:00:00 2001 From: Weston Steimel Date: Sat, 27 Feb 2021 01:58:59 +0000 Subject: [PATCH] add to dpkg integration test cases to detect packages from /var/lib/dpkg/status.d/ Signed-off-by: Weston Steimel --- test/integration/pkg_cases_test.go | 4 +++- .../var/lib/dpkg/status.d/dash | 18 ++++++++++++++++++ .../var/lib/dpkg/status.d/netbase | 11 +++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 test/integration/test-fixtures/image-pkg-coverage/var/lib/dpkg/status.d/dash create mode 100644 test/integration/test-fixtures/image-pkg-coverage/var/lib/dpkg/status.d/netbase diff --git a/test/integration/pkg_cases_test.go b/test/integration/pkg_cases_test.go index da5607353..81946aeac 100644 --- a/test/integration/pkg_cases_test.go +++ b/test/integration/pkg_cases_test.go @@ -144,7 +144,9 @@ var commonTestCases = []testCase{ name: "find dpkg packages", pkgType: pkg.DebPkg, pkgInfo: map[string]string{ - "apt": "1.8.2", + "apt": "1.8.2", + "dash": "0.5.8-2.4", + "netbase": "5.4", }, }, { diff --git a/test/integration/test-fixtures/image-pkg-coverage/var/lib/dpkg/status.d/dash b/test/integration/test-fixtures/image-pkg-coverage/var/lib/dpkg/status.d/dash new file mode 100644 index 000000000..fadd180a1 --- /dev/null +++ b/test/integration/test-fixtures/image-pkg-coverage/var/lib/dpkg/status.d/dash @@ -0,0 +1,18 @@ +Package: dash +Version: 0.5.8-2.4 +Architecture: amd64 +Essential: yes +Maintainer: Gerrit Pape +Installed-Size: 204 +Pre-Depends: libc6 (>= 2.14) +Depends: debianutils (>= 2.15), dpkg (>= 1.15.0) +Section: shells +Priority: required +Homepage: http://gondor.apana.org.au/~herbert/dash/ +Description: POSIX-compliant shell + The Debian Almquist Shell (dash) is a POSIX-compliant shell derived + from ash. + . + Since it executes scripts faster than bash, and has fewer library + dependencies (making it more robust against software or hardware + failures), it is used as the default system shell on Debian systems. diff --git a/test/integration/test-fixtures/image-pkg-coverage/var/lib/dpkg/status.d/netbase b/test/integration/test-fixtures/image-pkg-coverage/var/lib/dpkg/status.d/netbase new file mode 100644 index 000000000..4d0475aa6 --- /dev/null +++ b/test/integration/test-fixtures/image-pkg-coverage/var/lib/dpkg/status.d/netbase @@ -0,0 +1,11 @@ +Package: netbase +Version: 5.4 +Architecture: all +Maintainer: Marco d'Itri +Installed-Size: 44 +Section: admin +Priority: important +Multi-Arch: foreign +Description: Basic TCP/IP networking system + This package provides the necessary infrastructure for basic TCP/IP based + networking.