Remove broken gating tests
This commit is contained in:
parent
1a2f6fd891
commit
e9a7cb7a2c
@ -1 +0,0 @@
|
|||||||
1
|
|
19
gating.yaml
19
gating.yaml
@ -1,19 +0,0 @@
|
|||||||
--- !Policy
|
|
||||||
product_versions:
|
|
||||||
- fedora-*
|
|
||||||
decision_context: bodhi_update_push_stable
|
|
||||||
subject_type: koji_build
|
|
||||||
rules:
|
|
||||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
|
||||||
--- !Policy
|
|
||||||
product_versions:
|
|
||||||
- rhel-8
|
|
||||||
decision_context: osci_compose_gate
|
|
||||||
rules:
|
|
||||||
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}
|
|
||||||
--- !Policy
|
|
||||||
product_versions:
|
|
||||||
- rhel-9
|
|
||||||
decision_context: osci_compose_gate
|
|
||||||
rules:
|
|
||||||
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}
|
|
@ -1,6 +0,0 @@
|
|||||||
summary: CI Gating Plan
|
|
||||||
discover:
|
|
||||||
how: fmf
|
|
||||||
directory: tests
|
|
||||||
execute:
|
|
||||||
how: beakerlib
|
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: python-%{pypi_name}
|
Name: python-%{pypi_name}
|
||||||
Version: 2.3
|
Version: 2.3
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Resolve JSON Pointers in Python
|
Summary: Resolve JSON Pointers in Python
|
||||||
|
|
||||||
License: BSD
|
License: BSD
|
||||||
@ -45,6 +45,9 @@ BuildRequires: python3-devel
|
|||||||
%{_bindir}/jsonpointer
|
%{_bindir}/jsonpointer
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Mar 25 2023 Igor Raits <igor@gooddata.com> - 2.3-2
|
||||||
|
- Remove broken gating tests
|
||||||
|
|
||||||
* Sat Mar 11 2023 Igor Raits <igor@gooddata.com> - 2.3-1
|
* Sat Mar 11 2023 Igor Raits <igor@gooddata.com> - 2.3-1
|
||||||
- Update to 2.3
|
- Update to 2.3
|
||||||
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
This is a repo for tests for python-jsonpointer.
|
|
@ -1,63 +0,0 @@
|
|||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
#
|
|
||||||
# Makefile of /tools/python-jsonpointer/Sanity/python-compliance
|
|
||||||
# Description: Check for a compliance with Fedora Packaging Guidelines
|
|
||||||
# Author: Jan Kuřík <jkurik@redhat.com>
|
|
||||||
#
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
#
|
|
||||||
# Copyright (c) 2020-2021 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/.
|
|
||||||
#
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
export TEST=/tools/python-jsonpointer/Sanity/python-compliance
|
|
||||||
export TESTVERSION=1.0
|
|
||||||
|
|
||||||
BUILT_FILES=
|
|
||||||
|
|
||||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE
|
|
||||||
|
|
||||||
.PHONY: all install download clean
|
|
||||||
|
|
||||||
run: $(FILES) build
|
|
||||||
./runtest.sh
|
|
||||||
|
|
||||||
build: $(BUILT_FILES)
|
|
||||||
test -x runtest.sh || chmod a+x runtest.sh
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *~ $(BUILT_FILES)
|
|
||||||
|
|
||||||
|
|
||||||
include /usr/share/rhts/lib/rhts-make.include
|
|
||||||
|
|
||||||
$(METADATA): Makefile
|
|
||||||
@echo "Owner: Jan Kuřík <jkurik@redhat.com>" > $(METADATA)
|
|
||||||
@echo "Name: $(TEST)" >> $(METADATA)
|
|
||||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
|
||||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
|
||||||
@echo "Description: Check for a compliance with Fedora Packaging Guidelines" >> $(METADATA)
|
|
||||||
@echo "Type: Sanity" >> $(METADATA)
|
|
||||||
@echo "TestTime: 15m" >> $(METADATA)
|
|
||||||
@echo "RunFor: python-jsonpointer" >> $(METADATA)
|
|
||||||
@echo "Requires: python-jsonpointer python3-jsonpointer" >> $(METADATA)
|
|
||||||
@echo "Priority: Normal" >> $(METADATA)
|
|
||||||
@echo "License: GPLv2+" >> $(METADATA)
|
|
||||||
@echo "Confidential: no" >> $(METADATA)
|
|
||||||
@echo "Destructive: no" >> $(METADATA)
|
|
||||||
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
|
|
||||||
|
|
||||||
rhts-lint $(METADATA)
|
|
@ -1,3 +0,0 @@
|
|||||||
PURPOSE of /tools/python-jsonpointer/Sanity/python-compliance
|
|
||||||
Description: Check for a compliance with Fedora Packaging Guidelines
|
|
||||||
Author: Jan Kuřík <jkurik@redhat.com>
|
|
@ -1,13 +0,0 @@
|
|||||||
summary: Check for a compliance with Fedora Packaging Guidelines
|
|
||||||
description: ''
|
|
||||||
contact: Jan Kuřík <jkurik@redhat.com>
|
|
||||||
component:
|
|
||||||
- python-jsonpointer
|
|
||||||
test: ./runtest.sh
|
|
||||||
framework: beakerlib
|
|
||||||
recommend:
|
|
||||||
- python-jsonpointer
|
|
||||||
- python3-jsonpointer
|
|
||||||
duration: 15m
|
|
||||||
extra-summary: /tools/python-jsonpointer/Sanity/python-compliance
|
|
||||||
extra-task: /tools/python-jsonpointer/Sanity/python-compliance
|
|
@ -1,76 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
#
|
|
||||||
# runtest.sh of /tools/python-jsonpointer/Sanity/python-compliance
|
|
||||||
# Description: Check for a compliance with Fedora Packaging Guidelines
|
|
||||||
# Author: Jan Kuřík <jkurik@redhat.com>
|
|
||||||
#
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
#
|
|
||||||
# Copyright (c) 2020-2021 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
|
|
||||||
|
|
||||||
|
|
||||||
rlJournalStart
|
|
||||||
rlPhaseStartSetup
|
|
||||||
rlLog "Compliance with Fedora Packaging Guidelines test"
|
|
||||||
rlLog "Check https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/"
|
|
||||||
|
|
||||||
if rpm -q --quiet python-jsonpointer; then
|
|
||||||
PACKAGE="python-jsonpointer"
|
|
||||||
elif rpm -q --quiet python3-jsonpointer; then
|
|
||||||
PACKAGE="python3-jsonpointer"
|
|
||||||
else
|
|
||||||
rlDie "No python's jsonpointer package is installed"
|
|
||||||
fi
|
|
||||||
PYPACKAGE="jsonpointer"
|
|
||||||
|
|
||||||
rlAssertRpm ${PACKAGE}
|
|
||||||
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
|
||||||
rlRun "pushd $TmpDir"
|
|
||||||
rlPhaseEnd
|
|
||||||
|
|
||||||
rlPhaseStartTest "Check for *.pyc files"
|
|
||||||
rlRun "rpm -ql ${PACKAGE} > filelist.list"
|
|
||||||
while read f; do
|
|
||||||
if [[ ${f##*.} == "py" ]]; then
|
|
||||||
rlLog "Checking PYC file for $f"
|
|
||||||
BASE=$(basename $f)
|
|
||||||
DIR=$(dirname $f)
|
|
||||||
if [[ "${PACKAGE%%-*}" == "python3" ]]; then
|
|
||||||
rlAssertGrep "${DIR}/__pycache__/${BASE%.*}\..*\.pyc" filelist.list -E
|
|
||||||
else
|
|
||||||
rlAssertGrep "${DIR}/${BASE%.*}.*\.pyc" filelist.list -E
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done < "filelist.list"
|
|
||||||
rlPhaseEnd
|
|
||||||
|
|
||||||
rlPhaseStartTest "Check for egg-info files"
|
|
||||||
rlAssertGrep "/${PACKAGE#*-}-.*\.egg-info" filelist.list -E
|
|
||||||
rlPhaseEnd
|
|
||||||
|
|
||||||
rlPhaseStartCleanup
|
|
||||||
rlRun "popd"
|
|
||||||
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
|
||||||
rlPhaseEnd
|
|
||||||
rlJournalPrintText
|
|
||||||
rlJournalEnd
|
|
@ -1,63 +0,0 @@
|
|||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
#
|
|
||||||
# Makefile of /tools/python-jsonpointer/Sanity/smoke
|
|
||||||
# Description: Testing of basic functionality.
|
|
||||||
# Author: Peter Hostacny <phostacn@redhat.com>, Jan Kuřík <jkurik@redhat.com>
|
|
||||||
#
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
#
|
|
||||||
# Copyright (c) 2021 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/.
|
|
||||||
#
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
export TEST=/tools/python-jsonpointer/Sanity/smoke
|
|
||||||
export TESTVERSION=1.0
|
|
||||||
|
|
||||||
BUILT_FILES=
|
|
||||||
|
|
||||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE
|
|
||||||
|
|
||||||
.PHONY: all install download clean
|
|
||||||
|
|
||||||
run: $(FILES) build
|
|
||||||
./runtest.sh
|
|
||||||
|
|
||||||
build: $(BUILT_FILES)
|
|
||||||
test -x runtest.sh || chmod a+x runtest.sh
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *~ $(BUILT_FILES)
|
|
||||||
|
|
||||||
|
|
||||||
include /usr/share/rhts/lib/rhts-make.include
|
|
||||||
|
|
||||||
$(METADATA): Makefile
|
|
||||||
@echo "Owner: Jan Kuřík <jkurik@redhat.com>" > $(METADATA)
|
|
||||||
@echo "Name: $(TEST)" >> $(METADATA)
|
|
||||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
|
||||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
|
||||||
@echo "Description: Testing of basic functionality." >> $(METADATA)
|
|
||||||
@echo "Type: Sanity" >> $(METADATA)
|
|
||||||
@echo "TestTime: 5m" >> $(METADATA)
|
|
||||||
@echo "RunFor: python-jsonpointer" >> $(METADATA)
|
|
||||||
@echo "Requires: python-jsonpointer python2-jsonpointer python3-jsonpointer" >> $(METADATA)
|
|
||||||
@echo "Priority: Normal" >> $(METADATA)
|
|
||||||
@echo "License: GPLv2+" >> $(METADATA)
|
|
||||||
@echo "Confidential: no" >> $(METADATA)
|
|
||||||
@echo "Destructive: no" >> $(METADATA)
|
|
||||||
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
|
|
||||||
|
|
||||||
rhts-lint $(METADATA)
|
|
@ -1,3 +0,0 @@
|
|||||||
PURPOSE of /tools/python-jsonpointer/Sanity/smoke
|
|
||||||
Description: Test of basic functionality.
|
|
||||||
Author: Jan Kuřík <jkurik@redhat.com>
|
|
@ -1,14 +0,0 @@
|
|||||||
summary: Testing of basic functionality.
|
|
||||||
description: ''
|
|
||||||
contact: Jan Kuřík <jkurik@redhat.com>
|
|
||||||
component:
|
|
||||||
- python-jsonpointer
|
|
||||||
test: ./runtest.sh
|
|
||||||
framework: beakerlib
|
|
||||||
recommend:
|
|
||||||
- python-jsonpointer
|
|
||||||
- python2-jsonpointer
|
|
||||||
- python3-jsonpointer
|
|
||||||
duration: 5m
|
|
||||||
extra-summary: /tools/python-jsonpointer/Sanity/smoke
|
|
||||||
extra-task: /tools/python-jsonpointer/Sanity/smoke
|
|
@ -1,68 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
#
|
|
||||||
# runtest.sh of /tools/python-jsonpointer/Sanity/smoke
|
|
||||||
# Description: Testing of basic functionality.
|
|
||||||
# Author: Peter Hostacny <phostacn@redhat.com>, Jan Kuřík <jkurik@redhat.com>
|
|
||||||
#
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
#
|
|
||||||
# Copyright (c) 2015-2021 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
|
|
||||||
|
|
||||||
rlJournalStart
|
|
||||||
rlPhaseStartSetup
|
|
||||||
if rpm -q --quiet python-jsonpointer; then
|
|
||||||
PACKAGE="python-jsonpointer"
|
|
||||||
elif rpm -q --quiet python3-jsonpointer; then
|
|
||||||
PACKAGE="python3-jsonpointer"
|
|
||||||
else
|
|
||||||
rlDie "No python's jsonpointer package is installed"
|
|
||||||
fi
|
|
||||||
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
|
||||||
rlRun "pushd $TmpDir"
|
|
||||||
|
|
||||||
rlRun "echo '{ \"a\": [1, 2, 3] }' > a.json" 0 "Creating test-file."
|
|
||||||
rlRun "echo '{ \"a\": {\"b\": [1, 3, 4]}, \"b\": 1 }' > b.json" 0 "Creating test-file."
|
|
||||||
rlRun "echo '\"/a\"' > ptr.json" 0 "Creating test-file."
|
|
||||||
|
|
||||||
# Setting of pipefail shell option
|
|
||||||
set -o pipefail
|
|
||||||
rlPhaseEnd
|
|
||||||
|
|
||||||
rlPhaseStartTest
|
|
||||||
if rlTestVersion $(rpm -q --qf '%{version}' ${PACKAGE}) '<' 2; then
|
|
||||||
__ptr="ptr.json"
|
|
||||||
else
|
|
||||||
__ptr=$(tr -d '"' < ptr.json)
|
|
||||||
fi
|
|
||||||
rlRun -s "jsonpointer '${__ptr}' a.json b.json" 0 \
|
|
||||||
"Testing of jsonpointer commandline utility - simple run."
|
|
||||||
rlAssertGrep "[1, 2, 3]" "${rlRun_LOG}"
|
|
||||||
rlAssertGrep "{\"b\": \[1, 3, 4\]}" "${rlRun_LOG}"
|
|
||||||
rlPhaseEnd
|
|
||||||
|
|
||||||
rlPhaseStartCleanup
|
|
||||||
rlRun "popd"
|
|
||||||
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
|
||||||
rlPhaseEnd
|
|
||||||
rlJournalPrintText
|
|
||||||
rlJournalEnd
|
|
@ -1,64 +0,0 @@
|
|||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
#
|
|
||||||
# Makefile of /tools/python-jsonpointer/Sanity/writeable-suid-guid
|
|
||||||
# Description: Test for BZ#1025583 (python-jsonpointer creates a world writeable directory)
|
|
||||||
# Author: Milos Prchlik <mprchlik@redhat.com>, Jan Kuřík <jkurik@redhat.com>
|
|
||||||
#
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
#
|
|
||||||
# Copyright (c) 2014-2021 Red Hat, Inc.
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
#
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
export TEST=/tools/python-jsonpointer/Sanity/writeable-suid-guid
|
|
||||||
export TESTVERSION=1.0
|
|
||||||
|
|
||||||
BUILT_FILES=
|
|
||||||
|
|
||||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE
|
|
||||||
|
|
||||||
.PHONY: all install download clean
|
|
||||||
|
|
||||||
run: $(FILES) build
|
|
||||||
./runtest.sh
|
|
||||||
|
|
||||||
build: $(BUILT_FILES)
|
|
||||||
test -x runtest.sh || chmod a+x runtest.sh
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *~ $(BUILT_FILES)
|
|
||||||
|
|
||||||
|
|
||||||
include /usr/share/rhts/lib/rhts-make.include
|
|
||||||
|
|
||||||
$(METADATA): Makefile
|
|
||||||
@echo "Owner: Jan Kuřík <jkurik@redhat.com>" > $(METADATA)
|
|
||||||
@echo "Name: $(TEST)" >> $(METADATA)
|
|
||||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
|
||||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
|
||||||
@echo "Description: Test for suid files" >> $(METADATA)
|
|
||||||
@echo "Type: Sanity" >> $(METADATA)
|
|
||||||
@echo "TestTime: 15m" >> $(METADATA)
|
|
||||||
@echo "RunFor: python-jsonpointer" >> $(METADATA)
|
|
||||||
@echo "Requires: python-jsonpointer python3-jsonpointer" >> $(METADATA)
|
|
||||||
@echo "Releases: -RHEL4 -RHEL6 -RHELClient5 -RHELServer5" >> $(METADATA)
|
|
||||||
@echo "Priority: Normal" >> $(METADATA)
|
|
||||||
@echo "License: GPLv2" >> $(METADATA)
|
|
||||||
@echo "Confidential: no" >> $(METADATA)
|
|
||||||
@echo "Destructive: no" >> $(METADATA)
|
|
||||||
|
|
||||||
rhts-lint $(METADATA)
|
|
@ -1,3 +0,0 @@
|
|||||||
PURPOSE of /tools/python-jsonpointer/Sanity/writeable-suid-guid
|
|
||||||
Description: Test for suid files
|
|
||||||
Author: Milos Prchlik <mprchlik@redhat.com>, Jan Kuřík <jkurik@redhat.com>
|
|
@ -1,13 +0,0 @@
|
|||||||
summary: Test for suid files
|
|
||||||
description: ''
|
|
||||||
contact: Jan Kuřík <jkurik@redhat.com>
|
|
||||||
component:
|
|
||||||
- python-jsonpointer
|
|
||||||
test: ./runtest.sh
|
|
||||||
framework: beakerlib
|
|
||||||
recommend:
|
|
||||||
- python-jsonpointer
|
|
||||||
- python3-jsonpointer
|
|
||||||
duration: 15m
|
|
||||||
extra-summary: /tools/python-jsonpointer/Sanity/writeable-suid-guid
|
|
||||||
extra-task: /tools/python-jsonpointer/Sanity/writeable-suid-guid
|
|
@ -1,72 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
#
|
|
||||||
# runtest.sh of /tools/python-jsonpointer/Sanity/writeable-suid-guid
|
|
||||||
# Description: Test for suid files
|
|
||||||
# Author: Milos Prchlik <mprchlik@redhat.com>, Jan Kuřík <jkurik@redhat.com>
|
|
||||||
#
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
#
|
|
||||||
# Copyright (c) 2014-2021 Red Hat, Inc.
|
|
||||||
#
|
|
||||||
# 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="python-jsonpointer"
|
|
||||||
|
|
||||||
rlJournalStart
|
|
||||||
rlPhaseStartSetup
|
|
||||||
if rpm -q --quiet python-jsonpointer; then
|
|
||||||
PACKAGE="python-jsonpointer"
|
|
||||||
elif rpm -q --quiet python3-jsonpointer; then
|
|
||||||
PACKAGE="python3-jsonpointer"
|
|
||||||
else
|
|
||||||
rlDie "No python's jsonpointer package is installed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
rlAssertRpm ${PACKAGE}
|
|
||||||
rlRun "T=\$(mktemp -d)"
|
|
||||||
rlRun "pushd ${T}" || rlDie "Can not 'cd' into a temporary directory"
|
|
||||||
rlPhaseEnd
|
|
||||||
|
|
||||||
rlPhaseStartTest
|
|
||||||
rlRun -s "find $(rpm -ql ${PACKAGE} | tr '\n' ' ') \
|
|
||||||
\\( -perm -4000 -fprintf suid.txt '%#m %u:%g %p\\\\n' \\) , \
|
|
||||||
\\( -perm -2000 -fprintf guid.txt '%#m %u:%g %p\\\\n' \\) , \
|
|
||||||
\\( -perm -1000 -fprintf sticky.txt '%#m %u:%g %p\\\\n' \\) , \
|
|
||||||
\\( -type d -perm -0002 -fprintf writeable-d.txt '%#m %u:%g %p\\\\n' \\) , \
|
|
||||||
\\( -type f -perm -0002 -fprintf writeable-f.txt '%#m %u:%g %p\\\\n' \\) \
|
|
||||||
" 0 "Search for world-writable, SUID, GUID or sticky bit files and directories"
|
|
||||||
for f in suid.txt guid.txt sticky.txt writeable-d.txt writeable-f.txt; do
|
|
||||||
if [[ -s ${f} ]]; then
|
|
||||||
rlLogInfo "${f} contains the following files:"
|
|
||||||
rlLogInfo "$(cat ${f})"
|
|
||||||
rlFail "${PACKAGE} files/dirs should not contain SUID, GUID, sticky or world" \
|
|
||||||
"writeable files"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
rlPhaseEnd
|
|
||||||
|
|
||||||
rlPhaseStartCleanup
|
|
||||||
rlRun "popd"
|
|
||||||
rlRun "rm -rf ${T}"
|
|
||||||
rlPhaseEnd
|
|
||||||
rlJournalPrintText
|
|
||||||
rlJournalEnd
|
|
Loading…
Reference in New Issue
Block a user