adjust tiers

This commit is contained in:
Ondrej Mejzlik 2024-10-22 11:44:12 +02:00
commit 4e72bf76ad
6 changed files with 168 additions and 2 deletions

View file

@ -20,9 +20,9 @@ tag:
- TIPfail_systemd
- TIPpass
- TIPpass_Apps
- Tier1
- Tier2
- noexpectedness
tier: '1'
tier: '2'
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1364524
adjust:

7
Sanity/tls12/fetch Normal file
View file

@ -0,0 +1,7 @@
open localhost
set ssl:priority "NORMAL:+VERS-TLS1.2"
set net:max-retries 1
login anonymous ftp@example.com
ls
get duck
bye

44
Sanity/tls12/main.fmf Normal file
View file

@ -0,0 +1,44 @@
summary: Test TLS 12 support
description: |
Test TLS 12 support
contact: Ondrej Mejzlik <omejzlik@redhat.com>
component:
- lftp
test: ./runtest.sh
framework: beakerlib
require:
- library(openssl/certgen)
- library(distribution/epel)
recommend:
- lftp
- proftpd
duration: 5m
enabled: true
tag:
- NoRHEL4
- NoRHEL5
- NoRHEL7
- TIPfail_infra
- TIPfail_samba
- TIPfail_systemd
- TIPpass
- TIPpass_Apps
- rhel-buildroot
- epel
- Tier1
tier: 1
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1363629
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=2124943
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1743571
adjust:
- enabled: false
when: distro == rhel-4, rhel-5, rhel-7, rhel-alt-7
continue: false
- enabled: false
when: arch !=i386 and arch != ppc64 and arch != x86_64
continue: false
extra-nitrate: TC#0544315
extra-summary: /CoreOS/lftp/Sanity/tls12
extra-task: /CoreOS/lftp/Sanity/tls12
id: c88a22b5-1efa-4377-b073-63940f64f0ad

20
Sanity/tls12/proftpd.conf Normal file
View file

@ -0,0 +1,20 @@
<IfDefine TLS>
TLSEngine on
TLSRequired on
TLSRSACertificateFile /etc/pki/tls/certs/localhost.crt
TLSRSACertificateKeyFile /etc/pki/tls/private/localhost.key
TLSCipherSuite ALL:!ADH:!DES
TLSOptions AllowClientRenegotiations NoSessionReuseRequired
TLSVerifyClient off
TLSProtocol TLSv1.2
TLSLog /var/log/proftpd/tls.log
</IfDefine>
<IfDefine ANONYMOUS_FTP>
<Anonymous ~ftp>
User ftp
Group ftp
UserAlias anonymous ftp
RequireValidShell off
</Anonymous>
</IfDefine>

89
Sanity/tls12/runtest.sh Executable file
View file

@ -0,0 +1,89 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/lftp/Sanity/tls12
# Description: Test TLS 1.2 support
# Author: Martin Frodl <mfrodl@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2016 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# 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, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGES="lftp"
rlJournalStart
rlPhaseStartSetup
rlRun "rlImport --all"
if rlIsRHEL; then
rlRun "yum -y install proftpd --enablerepo \*" 0 "Install proftpd"
fi
rlAssertRpm 'proftpd' || rlDie "Package proftpd not installed"
rlAssertRpm $PACKAGES || rlDie "Package $PACKAGES not installed"
CONF="/etc/proftpd.conf"
rlFileBackup ${CONF}
rlRun "cp proftpd.conf ${CONF}" 0 "Configuring FTP server"
SYSCONF="/etc/sysconfig/proftpd"
rlFileBackup ${SYSCONF}
rlRun "echo 'PROFTPD_OPTIONS=\"-DANONYMOUS_FTP -DTLS\"' > ${SYSCONF}" 0 "Enabling anonymous access over TLS"
rlRun "rlFileBackup --clean /var/ftp" 0 "Backing up FTP server contents"
rlRun "echo 'Quack!' > /var/ftp/duck" 0 "Creating a test file on FTP server"
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "cp fetch ${TmpDir}" 0 "Copying lftp script to tmp directory"
rlRun "pushd ${TmpDir}"
rlRun "x509KeyGen server" 0 "Generating server key pair"
rlRun "x509KeyGen ca" 0 "Generating CA certificate"
rlRun "x509SelfSign ca" 0 "Self-signing CA certificate"
rlRun "x509CertSign --CA ca server" 0 "Signing server certificate"
rlFileBackup --clean /etc/pki
rlRun "cat $(x509Cert ca) >> /etc/pki/tls/certs/ca-bundle.crt"
rlRun "cp $(x509Cert server) /etc/pki/tls/certs/localhost.crt"
rlRun "cp $(x509Key server) /etc/pki/tls/private/localhost.key"
rlRun "rlServiceStart proftpd" 0 "Starting FTP server"
rlPhaseEnd
rlPhaseStartTest
rlRun -s "curl -v --ssl ftp://localhost/duck" 0 "Checking that FTP server is up and working properly"
rlAssertGrep 'Quack!' ${rlRun_LOG}
rlRun -s "lftp -d -f ./fetch" 0 "Downloading test file with lftp"
rlAssertNotGrep 'A TLS packet with unexpected length was received' ${rlRun_LOG}
rlAssertExists "duck"
rlAssertGrep 'Quack!' "duck"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "rlServiceStop proftpd" 0 "Stopping FTP server"
rlRun "x509RmAlias server"
rlRun "x509RmAlias ca"
rlRun "popd"
rlRun "rm -r ${TmpDir}" 0 "Removing tmp directory"
rlFileRestore
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

6
plans/ci.fmf Normal file
View file

@ -0,0 +1,6 @@
summary: CI plan, picks up all tests, runs in beakerlib.
discover:
- name: fedora
how: fmf
execute:
how: tmt