From 63dcea5085ac73dfa15d001dcf8fa0cd87486f96 Mon Sep 17 00:00:00 2001 From: pdancak Date: Tue, 4 Apr 2023 13:54:47 +0200 Subject: [PATCH] We will use upstream test --- .../Cups_browsed_with_local_printer/main.fmf | 18 ----- .../runtest.sh | 70 ------------------- 2 files changed, 88 deletions(-) delete mode 100644 Sanity/Cups_browsed_with_local_printer/main.fmf delete mode 100755 Sanity/Cups_browsed_with_local_printer/runtest.sh diff --git a/Sanity/Cups_browsed_with_local_printer/main.fmf b/Sanity/Cups_browsed_with_local_printer/main.fmf deleted file mode 100644 index eb14b75..0000000 --- a/Sanity/Cups_browsed_with_local_printer/main.fmf +++ /dev/null @@ -1,18 +0,0 @@ -summary: The test tests cups-browsed without any remote printer. This should help - us test cups-browsed on fedora without our printers. -description: '' -contact: Petr Dancak -component: - - cups-browsed -test: ./runtest.sh -framework: beakerlib -recommend: - - cups-browsed - - cups - - cups-printerapp - - avahi -duration: 10m -extra-summary: /CoreOS/cups-browsed/Sanity/Cups_browsed_with_local_printer -extra-task: /CoreOS/cups-browsed/Sanity/Cups_browsed_with_local_printer -extra-nitrate: TC#0615129 -id: 59f96529-453e-4654-979e-e8b492949f5d diff --git a/Sanity/Cups_browsed_with_local_printer/runtest.sh b/Sanity/Cups_browsed_with_local_printer/runtest.sh deleted file mode 100755 index 14d66ac..0000000 --- a/Sanity/Cups_browsed_with_local_printer/runtest.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/cups-browsed/Sanity/Cups_browsed_with_local_printer -# Description: The test tests cups-browsed without any remote printer. This should help us test cups-browsed on fedora without our printers. -# Author: Petr Dancak -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2023 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 - -PACKAGE="cups-browsed" -PACKAGE2="cups-printerapp" -PACKAGE3="avahi" -PACKAGE4="cups" -PRINTER="test$RANDOM" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlAssertRpm $PACKAGE2 - rlAssertRpm $PACKAGE3 - rlAssertRpm $PACKAGE4 - rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" - rlRun "pushd $TmpDir" - rlServiceStop "cups-browsed" - rlServiceStart "cups" "avahi-daemon" - rlLog "Installing local printer test with mDNS record" - ippeveprinter -D "$TmpDir/test_output" -c /usr/bin/cat "$PRINTER" & - sleep 20 - rlPhaseEnd - - rlPhaseStartTest - rlRun "lpstat -a | grep $PRINTER" 1 "$PRINTER shouldn't be found when cups-browsed is not active" - rlRun "systemctl start cups-browsed" 0 "Start cups-browsed to find $PRINTER" - sleep 20 - rlRun "lpstat -a | grep $PRINTER" 0 "Lpstat should find $PRINTER" - rlRun "lp -d $PRINTER /etc/fstab" - sleep 120 - rlAssertExists "$TmpDir/test_output" - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "kill -9 `pidof ippeveprinter`" "0-199" - rlServiceRestore "avahi-daemon" "cups" "cups-browsed" - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlRun "rm -rf /var/cache/cups/*" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd