Add test for RHEL-50557
This commit is contained in:
parent
476c27d9e1
commit
e5cc388bb1
2 changed files with 56 additions and 0 deletions
24
Sanity/default-map-type/main.fmf
Normal file
24
Sanity/default-map-type/main.fmf
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
summary: Default map type
|
||||
description: 'Tests default map type'
|
||||
contact: František Hrdina <fhrdina@redhat.com>
|
||||
component:
|
||||
- postfix
|
||||
test: ./test.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- postfix
|
||||
- postfix-lmdb
|
||||
duration: 5m
|
||||
enabled: true
|
||||
tag:
|
||||
- Tier1
|
||||
tier: '1'
|
||||
link:
|
||||
- verifies: https://issues.redhat.com/browse/RHEL-50557
|
||||
adjust:
|
||||
- enabled: false
|
||||
when: distro < rhel-8
|
||||
continue: false
|
||||
- enabled: false
|
||||
when: distro < centos-stream-8
|
||||
continue: false
|
||||
32
Sanity/default-map-type/test.sh
Executable file
32
Sanity/default-map-type/test.sh
Executable file
|
|
@ -0,0 +1,32 @@
|
|||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm "postfix"
|
||||
# postfix-lmdb presented on rhel9.3 and higher, but default only on rhel10/c10s and higher and fedora
|
||||
(rlIsRHEL '>=9.3' || rlIsFedora || rlIsCentOS '>=9') && rlAssertRpm "postfix-lmdb"
|
||||
rlFileBackup --clean /etc/postfix
|
||||
rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory"
|
||||
rlRun "pushd $tmp"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun "echo \"test_key test_value\" > /etc/postfix/test" 0 "Creating config"
|
||||
rlRun "postmap /etc/postfix/test &> postmap.log" 0 "Running postmap"
|
||||
|
||||
if rlIsRHELLike '<10' || rlIsFedora; then
|
||||
rlAssertExists "/etc/postfix/test.db"
|
||||
else
|
||||
rlAssertExists "/etc/postfix/test.lmdb"
|
||||
fi
|
||||
rlAssertNotGrep "postmap: fatal: unsupported map type: hash" postmap.log
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlFileRestore
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $tmp" 0 "Remove tmp directory"
|
||||
rlPhaseEnd
|
||||
rlJournalEnd
|
||||
Loading…
Add table
Add a link
Reference in a new issue