tests/non-root-user-download: fix test failures
This commit is contained in:
parent
4ad1229e9d
commit
dd6ee45b2d
@ -7,6 +7,7 @@ require:
|
|||||||
- findutils
|
- findutils
|
||||||
- libselinux-utils
|
- libselinux-utils
|
||||||
- openssh-clients
|
- openssh-clients
|
||||||
|
- openssh-server
|
||||||
- passwd
|
- passwd
|
||||||
test: ./runtest.sh
|
test: ./runtest.sh
|
||||||
framework: beakerlib
|
framework: beakerlib
|
||||||
|
@ -31,9 +31,9 @@
|
|||||||
|
|
||||||
PACKAGE="curl"
|
PACKAGE="curl"
|
||||||
|
|
||||||
FTP_URL=ftp://ftp.scientificlinux.org/linux/fedora/releases/18/Live/x86_64/Fedora-18-x86_64-Live-CHECKSUM
|
FTP_URL=ftp://ftp.fi.muni.cz/pub/linux/fedora/linux/releases/36/Everything/x86_64/iso/Fedora-Everything-36-1.5-x86_64-CHECKSUM
|
||||||
HTTP_URL=https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/18/Live/x86_64/Fedora-18-x86_64-Live-CHECKSUM
|
HTTP_URL=https://archives.fedoraproject.org/pub/fedora/linux/releases/36/Everything/x86_64/iso/Fedora-Everything-36-1.5-x86_64-CHECKSUM
|
||||||
CONTENT=a276e06d244e04b765f0a35532d9036ad84f340b0bdcc32e0233a8fbc31d5bed
|
CONTENT=85cb450443d68d513b41e57b0bd818a740279dac5dfc09c68e681ff8a3006404
|
||||||
PASSWORD=pAssw0rd
|
PASSWORD=pAssw0rd
|
||||||
OPTIONS=""
|
OPTIONS=""
|
||||||
rlIsRHEL 7 && OPTIONS="--insecure"
|
rlIsRHEL 7 && OPTIONS="--insecure"
|
||||||
@ -46,9 +46,11 @@ rlJournalStart
|
|||||||
rlRun "useradd -m curltester" 0 "Adding the test user"
|
rlRun "useradd -m curltester" 0 "Adding the test user"
|
||||||
rlRun "echo $PASSWORD | passwd --stdin curltester" 0 "Setting the password for the test user"
|
rlRun "echo $PASSWORD | passwd --stdin curltester" 0 "Setting the password for the test user"
|
||||||
rlRun "su - curltester -c 'echo $CONTENT > ~/testfile'" 0 "Creating ~curltester/testfile"
|
rlRun "su - curltester -c 'echo $CONTENT > ~/testfile'" 0 "Creating ~curltester/testfile"
|
||||||
|
rlFileBackup --clean --missing-ok $HOME/.ssh /etc/hosts
|
||||||
|
rlRun "rm -f $HOME/.ssh/*"
|
||||||
[ -d $HOME/.ssh ] || ( mkdir $HOME/.ssh && restorecon HOME/.ssh )
|
[ -d $HOME/.ssh ] || ( mkdir $HOME/.ssh && restorecon HOME/.ssh )
|
||||||
rlFileBackup $HOME/.ssh/known_hosts /etc/hosts
|
rlRun "rlServiceStart sshd"
|
||||||
ssh-keygen -F localhost -f $HOME/.ssh/known_hosts || rlRun "ssh-keyscan localhost >> $HOME/.ssh/known_hosts"
|
rlRun "ssh-keyscan localhost >> $HOME/.ssh/known_hosts"
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlPhaseStartTest "http download"
|
rlPhaseStartTest "http download"
|
||||||
@ -81,7 +83,7 @@ if ! rlIsRHEL 5; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
rlPhaseStartCleanup
|
rlPhaseStartCleanup
|
||||||
rlRun "rm -f $HOME/.ssh/known_hosts"
|
rlRun "rlServiceRestore"
|
||||||
rlFileRestore
|
rlFileRestore
|
||||||
rlRun "popd"
|
rlRun "popd"
|
||||||
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
||||||
|
Loading…
Reference in New Issue
Block a user