Add gating configuration for C10S/RHEL10
Resolves: RHEL-52103
This commit is contained in:
parent
81fc40841c
commit
15f06cda53
10
ci.fmf
10
ci.fmf
@ -1,9 +1 @@
|
||||
discover:
|
||||
how: fmf
|
||||
prepare:
|
||||
how: install
|
||||
exclude:
|
||||
- libcurl-minimal
|
||||
- curl-minimal
|
||||
execute:
|
||||
how: tmt
|
||||
resultsdb-testcase: separate
|
||||
|
@ -1,7 +1,7 @@
|
||||
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
|
||||
Name: curl
|
||||
Version: 8.9.1
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
License: curl
|
||||
Source0: https://curl.se/download/%{name}-%{version}.tar.xz
|
||||
Source1: https://curl.se/download/%{name}-%{version}.tar.xz.asc
|
||||
@ -398,6 +398,9 @@ rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/mk-ca-bundle.1*
|
||||
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
|
||||
|
||||
%changelog
|
||||
* Fri Aug 02 2024 Jacek Migacz <jmigacz@redhat.com> - 8.9.1-2
|
||||
- add gating configuration (RHEL-52103)
|
||||
|
||||
* Wed Jul 31 2024 Jacek Migacz <jmigacz@redhat.com> - 8.9.1-1
|
||||
- new upstream release (RHEL-50806)
|
||||
|
||||
|
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-*
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build./plans/tier1-internal.functional}
|
10
plans.fmf
Normal file
10
plans.fmf
Normal file
@ -0,0 +1,10 @@
|
||||
/tier1-internal:
|
||||
discover:
|
||||
how: fmf
|
||||
url: https://gitlab.com/redhat/rhel/tests/curl.git
|
||||
filter: 'tier: 1'
|
||||
execute:
|
||||
how: tmt
|
||||
adjust:
|
||||
enabled: false
|
||||
when: distro == centos-stream or distro == fedora
|
@ -1,18 +0,0 @@
|
||||
summary: various download methods with non-root user
|
||||
description: ''
|
||||
contact: Daniel Rusek <drusek@redhat.com>
|
||||
component:
|
||||
- curl
|
||||
require:
|
||||
- findutils
|
||||
- libselinux-utils
|
||||
- openssh-clients
|
||||
- openssh-server
|
||||
- passwd
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
duration: 5m
|
||||
enabled: true
|
||||
tier: '1'
|
||||
link:
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1049921
|
@ -1,93 +0,0 @@
|
||||
#!/bin/bash
|
||||
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /CoreOS/curl/Sanity/non-root-user-download
|
||||
# Description: various download methods with non-root user
|
||||
# Author: Karel Srot <ksrot@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2013 Red Hat, Inc. All rights reserved.
|
||||
#
|
||||
# This copyrighted material is made available to anyone wishing
|
||||
# to use, modify, copy, or redistribute it subject to the terms
|
||||
# and conditions of the GNU General Public License version 2.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public
|
||||
# License along with this program; if not, write to the Free
|
||||
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
# Include Beaker environment
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
PACKAGE="curl"
|
||||
|
||||
FTP_URL=ftp://ftp.fi.muni.cz/pub/linux/fedora/linux/releases/38/Everything/x86_64/iso/Fedora-Everything-38-1.6-x86_64-CHECKSUM
|
||||
HTTP_URL=https://archives.fedoraproject.org/pub/fedora/linux/releases/38/Everything/x86_64/iso/Fedora-Everything-38-1.6-x86_64-CHECKSUM
|
||||
CONTENT=4d042dedc8886856db10bc882074b84dcce52f829ea7b3f31d8031db8d84df20
|
||||
PASSWORD=pAssw0rd
|
||||
OPTIONS=""
|
||||
rlIsRHEL 7 && OPTIONS="--insecure"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm $PACKAGE
|
||||
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
||||
rlRun "pushd $TmpDir"
|
||||
rlRun "useradd -m curltester" 0 "Adding 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"
|
||||
rlFileBackup --clean --missing-ok $HOME/.ssh /etc/hosts
|
||||
rlRun "rm -f $HOME/.ssh/*"
|
||||
[ -d $HOME/.ssh ] || ( mkdir $HOME/.ssh && restorecon HOME/.ssh )
|
||||
rlRun "rlServiceStart sshd"
|
||||
rlRun "ssh-keyscan localhost >> $HOME/.ssh/known_hosts"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "http download"
|
||||
rlRun "su - curltester -c 'curl $HTTP_URL' &> http.log"
|
||||
cat http.log
|
||||
rlAssertGrep "$CONTENT" http.log
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "ftp download"
|
||||
rlRun "su - curltester -c 'curl $FTP_URL' &> ftp.log"
|
||||
cat ftp.log
|
||||
rlAssertGrep "$CONTENT" ftp.log
|
||||
rlPhaseEnd
|
||||
|
||||
if ! rlIsRHEL 5; then
|
||||
# scp sftp not supported on RHEL5
|
||||
|
||||
rlPhaseStartTest "scp download"
|
||||
rlRun "curl -u curltester:$PASSWORD $OPTIONS scp://localhost/home/curltester/testfile &> scp.log"
|
||||
cat scp.log
|
||||
rlAssertGrep "$CONTENT" scp.log
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "sftp download"
|
||||
rlRun "curl -u curltester:$PASSWORD $OPTIONS sftp://localhost/home/curltester/testfile &> sftp.log"
|
||||
cat sftp.log
|
||||
rlAssertGrep "$CONTENT" sftp.log
|
||||
rlPhaseEnd
|
||||
|
||||
fi
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "rlServiceRestore"
|
||||
rlFileRestore
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
||||
rlRun "userdel -r --force curltester"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
@ -1,20 +0,0 @@
|
||||
summary: downloads test file through scp and sftp
|
||||
description: |
|
||||
Test scenario:
|
||||
- scp download
|
||||
- sftp download
|
||||
- scp upload
|
||||
- sftp upload
|
||||
|
||||
When PUBKEY_PARAM global variable is set to 'empty' or 'none', scenarios are executed
|
||||
with empty --pubkey parameter (--pubkey "") or with the paramiter omitted
|
||||
contact: Daniel Rusek <drusek@redhat.com>
|
||||
require:
|
||||
- findutils
|
||||
component:
|
||||
- curl
|
||||
test: ./runtest.sh
|
||||
path: /tests/scp-and-sftp-download-test
|
||||
framework: beakerlib
|
||||
duration: 10m
|
||||
enabled: true
|
@ -1,129 +0,0 @@
|
||||
#!/bin/bash
|
||||
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /CoreOS/curl/Sanity/scp-and-sftp-download-test
|
||||
# Description: downloads test file through scp and sftp
|
||||
# Author: Karel Srot <ksrot@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2012 Red Hat, Inc. All rights reserved.
|
||||
#
|
||||
# This copyrighted material is made available to anyone wishing
|
||||
# to use, modify, copy, or redistribute it subject to the terms
|
||||
# and conditions of the GNU General Public License version 2.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public
|
||||
# License along with this program; if not, write to the Free
|
||||
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
# Include Beaker environment
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
PACKAGE="curl"
|
||||
|
||||
# GLOBAL/ENVIRONMENT VARIABLE:
|
||||
# PUBKEY_PARAM
|
||||
|
||||
if [ "$PUBKEY_PARAM" == 'none' ]; then
|
||||
PUBKEY_PARAM=""
|
||||
elif [ "$PUBKEY_PARAM" == 'empty' ]; then
|
||||
PUBKEY_PARAM="--pubkey ''"
|
||||
else
|
||||
PUBKEY_PARAM='--pubkey /root/.ssh/id_rsa.pub'
|
||||
fi
|
||||
|
||||
FILESIZE=200 #MB
|
||||
OPTIONS=""
|
||||
rlIsRHEL 7 && OPTIONS="--insecure"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm $PACKAGE
|
||||
rlFileBackup --clean /root/.ssh/known_hosts /root/.ssh
|
||||
rlFileBackup --clean /etc/ssh/sshd_config
|
||||
rlRun "useradd -m curltestuser"
|
||||
|
||||
# In FIPS-140 we need to explicitly allow one of libssh2-implemented
|
||||
# Kex algorithms (eg. DH14-SHA1).
|
||||
rlRun "echo 'KexAlgorithms +diffie-hellman-group14-sha1' >> /etc/ssh/sshd_config" 0
|
||||
rlServiceStop "sshd"
|
||||
rlRun "service sshd start && sleep 5" 0
|
||||
|
||||
# file for download test
|
||||
rlRun "su - curltestuser -c 'dd if=/dev/zero of=testfile bs=1M count=200'" 0 "Creating $FILESIZE MB large test file"
|
||||
SUM=`sha256sum /home/curltestuser/testfile | cut -d ' ' -f 1`
|
||||
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
||||
rlRun "pushd $TmpDir"
|
||||
rlRun "rm -vf /root/.ssh/*"
|
||||
rlRun "ssh-keygen -t rsa -f /root/.ssh/id_rsa -N ''" 0 "Generate ssh key"
|
||||
rlRun "mkdir /home/curltestuser/.ssh && cat /root/.ssh/id_rsa.pub > /home/curltestuser/.ssh/authorized_keys && chown -R curltestuser.curltestuser /home/curltestuser/.ssh/" 0 "Save the key to .ssh/authorized_keys"
|
||||
|
||||
# this is a workaround as libssh2 is not able to use newer hashes
|
||||
#rlRun "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/root/.ssh/known_hosts curltestuser@localhost 'exit'" 0 "First ssh login to add localhost to known_hosts"
|
||||
rlRun "ssh-keyscan localhost >>/root/.ssh/known_hosts"
|
||||
|
||||
# files for upload test
|
||||
rlRun "dd if=/dev/zero of=uploadfile1 bs=1M count=50" 0 "Creating 50 MB large test file"
|
||||
UPSUM1=`sha256sum uploadfile1 | cut -d ' ' -f 1`
|
||||
rlRun "dd if=/dev/zero of=uploadfile2 bs=1M count=20" 0 "Creating 20 MB large test file"
|
||||
UPSUM2=`sha256sum uploadfile2 | cut -d ' ' -f 1`
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "scp download test"
|
||||
rlRun "curl -o ./scp_file -u curltestuser: --key /root/.ssh/id_rsa $PUBKEY_PARAM $OPTIONS scp://localhost/home/curltestuser/testfile" 0 "Initiate curl scp download"
|
||||
rlAssertExists scp_file
|
||||
SCPSUM=`sha256sum ./scp_file | cut -d ' ' -f 1`
|
||||
rlAssertEquals "Checking that whole file was properly downloaded" $SUM $SCPSUM
|
||||
rm -f ./scp_file
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "sftp download test"
|
||||
rlRun "curl -o ./sftp_file -u curltestuser: --key /root/.ssh/id_rsa $PUBKEY_PARAM $OPTIONS sftp://localhost/home/curltestuser/testfile" 0 "Initiate curl scp download"
|
||||
rlAssertExists sftp_file
|
||||
SFTPSUM=`sha256sum ./sftp_file | cut -d ' ' -f 1`
|
||||
rlAssertEquals "Checking that whole file was properly downloaded" $SUM $SFTPSUM
|
||||
rm -f ./sftp_file
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "scp upload test"
|
||||
rlRun "curl -T '{uploadfile1,uploadfile2}' scp://localhost/home/curltestuser/ -u curltestuser: --key /root/.ssh/id_rsa $PUBKEY_PARAM $OPTIONS" 0 "Initiate curl scp upload"
|
||||
rlAssertExists /home/curltestuser/uploadfile1
|
||||
rlAssertExists /home/curltestuser/uploadfile2
|
||||
SCPUPSUM1=`sha256sum /home/curltestuser/uploadfile1 | cut -d ' ' -f 1`
|
||||
SCPUPSUM2=`sha256sum /home/curltestuser/uploadfile2 | cut -d ' ' -f 1`
|
||||
rlAssertEquals "Checking that 1st file was properly uploaded" ${UPSUM1} ${SCPUPSUM1}
|
||||
rlAssertEquals "Checking that 2nd file was properly uploaded" ${UPSUM2} ${SCPUPSUM2}
|
||||
rm -f /home/curltestuser/uploadfile1 /home/curltestuser/uploadfile2
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "sftp upload test"
|
||||
rlRun "curl -T '{uploadfile1,uploadfile2}' sftp://localhost/home/curltestuser/ -u curltestuser: --key /root/.ssh/id_rsa $PUBKEY_PARAM $OPTIONS" 0 "Initiate curl sftp upload"
|
||||
rlAssertExists /home/curltestuser/uploadfile1
|
||||
rlAssertExists /home/curltestuser/uploadfile2
|
||||
SFTPUPSUM1=`sha256sum /home/curltestuser/uploadfile1 | cut -d ' ' -f 1`
|
||||
SFTPUPSUM2=`sha256sum /home/curltestuser/uploadfile2 | cut -d ' ' -f 1`
|
||||
rlAssertEquals "Checking that 1st file was properly uploaded" ${UPSUM1} ${SFTPUPSUM1}
|
||||
rlAssertEquals "Checking that 2nd file was properly uploaded" ${UPSUM2} ${SFTPUPSUM2}
|
||||
rm -f /home/curltestuser/uploadfile1 /home/curltestuser/uploadfile2
|
||||
rlPhaseEnd
|
||||
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "userdel -r --force curltestuser"
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
||||
rlFileRestore
|
||||
rlServiceRestore "sshd"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
Loading…
Reference in New Issue
Block a user