Add a basic testcase for bogus filename triplet detection
This commit is contained in:
parent
502d07cf24
commit
79bfdd7e9c
|
@ -127,7 +127,7 @@ for e in ts:
|
||||||
[foo-1.0-1.noarch]
|
[foo-1.0-1.noarch]
|
||||||
)
|
)
|
||||||
|
|
||||||
RPMPY_TEST([add bogus package to transaction],[
|
RPMPY_TEST([add bogus package to transaction 1],[
|
||||||
ts = rpm.ts()
|
ts = rpm.ts()
|
||||||
h = rpm.hdr()
|
h = rpm.hdr()
|
||||||
h['name'] = "foo"
|
h['name'] = "foo"
|
||||||
|
@ -141,6 +141,27 @@ for e in ts:
|
||||||
[adding package to transaction failed]
|
[adding package to transaction failed]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
RPMPY_TEST([add bogus package to transaction 2],[
|
||||||
|
ts = rpm.ts()
|
||||||
|
h = rpm.hdr()
|
||||||
|
h['name'] = 'foo'
|
||||||
|
h['version'] = '1.0'
|
||||||
|
h['release'] = '1'
|
||||||
|
h['os'] = 'linux'
|
||||||
|
h['arch'] = 'noarch'
|
||||||
|
h['basenames'] = ['bing', 'bang', 'bong']
|
||||||
|
h['dirnames'] = ['/opt' '/flopt']
|
||||||
|
h['dirindexes'] = [ 1, 2, 3 ]
|
||||||
|
try:
|
||||||
|
ts.addInstall(h, 'foo', 'u')
|
||||||
|
except rpm.error, err:
|
||||||
|
myprint(err)
|
||||||
|
for e in ts:
|
||||||
|
myprint(e.NEVRA())
|
||||||
|
],
|
||||||
|
[adding package to transaction failed]
|
||||||
|
)
|
||||||
|
|
||||||
AT_SETUP([database iterators])
|
AT_SETUP([database iterators])
|
||||||
AT_KEYWORDS([python rpmdb])
|
AT_KEYWORDS([python rpmdb])
|
||||||
AT_CHECK([
|
AT_CHECK([
|
||||||
|
|
Loading…
Reference in New Issue