Make test-case for --replacepkgs stricter
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 1 Jun 2011 06:35:47 +0000 (09:35 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 1 Jun 2011 06:35:47 +0000 (09:35 +0300)
- Actually verify we got the expected result, ie exactly one instance
  of the pkg installed after successful reinstall.

tests/rpmdb.at

index d73e4ef..cecd355 100644 (file)
@@ -73,9 +73,14 @@ RPMDB_INIT
 
 tpkg="/data/RPMS/foo-1.0-1.noarch.rpm"
 
-runroot rpm -i "${tpkg}" && runroot rpm -U --replacepkgs "${tpkg}"
+runroot rpm -i "${tpkg}" && 
+  runroot rpm -U --replacepkgs "${tpkg}" &&
+  runroot rpm -qa
 ],
-[0])
+[0],
+[foo-1.0-1.noarch
+],
+[])
 
 AT_CLEANUP