mirror of
https://github.com/release-engineering/dist-git.git
synced 2025-02-23 15:02:54 +00:00
fix tests
This commit is contained in:
parent
31bf40b310
commit
d40a3489eb
11 changed files with 44 additions and 38 deletions
|
@ -1,5 +1,5 @@
|
||||||
[distgit]
|
[distgit]
|
||||||
lookaside = http://pkgs.example.org/repo/pkgs/%(pkg)s/%(filename)s/%(hashtype)s/%(hash)s/%(filename)s
|
lookaside = http://pkgs.example.org/repo/pkgs/%(ns1)s/%(pkg)s/%(filename)s/%(hashtype)s/%(hash)s/%(filename)s
|
||||||
lookaside_cgi = https://pkgs.example.org/repo/pkgs/upload.cgi
|
lookaside_cgi = https://pkgs.example.org/repo/pkgs/upload.cgi
|
||||||
gitbaseurl = ssh://clime@pkgs.example.org/var/lib/dist-git/git/%(module)s
|
gitbaseurl = ssh://clime@pkgs.example.org/var/lib/dist-git/git/%(module)s
|
||||||
anongiturl = git://pkgs.example.org/%(module)s
|
anongiturl = git://pkgs.example.org/%(module)s
|
||||||
|
|
|
@ -15,7 +15,8 @@ clone_config =
|
||||||
bz.default-component %(module)s
|
bz.default-component %(module)s
|
||||||
sendemail.to %(module)s-owner@fedoraproject.org
|
sendemail.to %(module)s-owner@fedoraproject.org
|
||||||
push.default simple
|
push.default simple
|
||||||
#distgit_namespaced = True
|
distgit_namespaced = True
|
||||||
|
lookaside_namespaced = True
|
||||||
kerberos_realms = FEDORAPROJECT.ORG
|
kerberos_realms = FEDORAPROJECT.ORG
|
||||||
|
|
||||||
[fedpkg.bodhi]
|
[fedpkg.bodhi]
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
SSLCertificateKeyFile /etc/pki/tls/certs/pkgs.example.org.pem
|
SSLCertificateKeyFile /etc/pki/tls/certs/pkgs.example.org.pem
|
||||||
SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt
|
SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt
|
||||||
|
|
||||||
LogLevel trace8
|
LogLevel trace6
|
||||||
|
|
||||||
# provide this manually for upload.cgi
|
# provide this manually for upload.cgi
|
||||||
SetEnv SSL_CLIENT_S_DN_CN clime
|
SetEnv SSL_CLIENT_S_DN_CN clime
|
||||||
|
|
|
@ -32,7 +32,15 @@ systemctl enable libvirtd && systemctl start libvirtd
|
||||||
systemctl start virtlogd.socket # this is currently needed in f25 for vagrant to work with libvirtd
|
systemctl start virtlogd.socket # this is currently needed in f25 for vagrant to work with libvirtd
|
||||||
|
|
||||||
cd $DISTGITROOTDIR
|
cd $DISTGITROOTDIR
|
||||||
vagrant reload distgit || vagrant up distgit
|
|
||||||
|
DISTGITSTATUS=`mktemp`
|
||||||
|
vagrant status distgit | tee $DISTGITSTATUS
|
||||||
|
if grep -q 'not created' $DISTGITSTATUS; then
|
||||||
|
vagrant up distgit
|
||||||
|
else
|
||||||
|
vagrant reload distgit
|
||||||
|
fi
|
||||||
|
rm $DISTGITSTATUS
|
||||||
|
|
||||||
IPADDR=`vagrant ssh -c "ifconfig eth0 | grep -E 'inet\s' | sed 's/\s*inet\s*\([0-9.]*\).*/\1/'"`
|
IPADDR=`vagrant ssh -c "ifconfig eth0 | grep -E 'inet\s' | sed 's/\s*inet\s*\([0-9.]*\).*/\1/'"`
|
||||||
echo "$IPADDR pkgs.example.org" >> /etc/hosts
|
echo "$IPADDR pkgs.example.org" >> /etc/hosts
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
{"/prunerepo.git": {"owner": null, "fingerprint": "0b75e76a72fd50ae37aa3fd706f6d28fa9c4a4d6", "description": "prunerepo", "reference": null, "modified": 1517593891}}
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit b546f41b8974b2736c461ede35fb5e88fdc5fd38
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit a265563d8e26994c819234fdf646bf852eebdd22
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit a265563d8e26994c819234fdf646bf852eebdd22
|
|
|
@ -3,7 +3,9 @@
|
||||||
. /usr/bin/rhts-environment.sh || exit 1
|
. /usr/bin/rhts-environment.sh || exit 1
|
||||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||||
|
|
||||||
export TESTPATH="$( builtin cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
export SCRIPTDIR="$( builtin cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
export CWD=`pwd`
|
||||||
|
export TEST_CWD=`mktemp -d`
|
||||||
|
|
||||||
function pkgs_cmd {
|
function pkgs_cmd {
|
||||||
ssh -o 'StrictHostKeyChecking no' clime@pkgs.example.org $1
|
ssh -o 'StrictHostKeyChecking no' clime@pkgs.example.org $1
|
||||||
|
@ -13,26 +15,25 @@ rlJournalStart
|
||||||
rlPhaseStartSetup BasicTest
|
rlPhaseStartSetup BasicTest
|
||||||
pkgs_cmd 'git config --global user.email "clime@redhat.com"'
|
pkgs_cmd 'git config --global user.email "clime@redhat.com"'
|
||||||
pkgs_cmd 'git config --global user.name "clime"'
|
pkgs_cmd 'git config --global user.name "clime"'
|
||||||
pkgs_cmd '/usr/share/dist-git/setup_git_package prunerepo'
|
pkgs_cmd '/usr/share/dist-git/setup_git_package rpms/prunerepo'
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlPhaseStartTest BasicTest
|
rlPhaseStartTest BasicTest
|
||||||
CWD=`pwd`
|
cd $TEST_CWD
|
||||||
|
echo "Running tests in $TEST_CWD"
|
||||||
cd $TESTPATH
|
|
||||||
|
|
||||||
# clone repo using rpkg
|
# clone repo using rpkg
|
||||||
rlRun "rpkg clone /var/lib/dist-git/git/prunerepo"
|
rlRun "rpkg clone rpms/prunerepo"
|
||||||
|
|
||||||
cd prunerepo || exit
|
cd prunerepo
|
||||||
git config user.email "somebody@example.com"
|
git config user.email "somebody@example.com"
|
||||||
git config user.name "Some name"
|
git config user.name "Some name"
|
||||||
|
|
||||||
# upload into lookaside and working tree update
|
# upload into lookaside and working tree update
|
||||||
rlRun "rpkg import --skip-diffs ../../../data/prunerepo-1.1-1.fc23.src.rpm"
|
rlRun "rpkg import --skip-diffs $SCRIPTDIR/../../data/prunerepo-1.1-1.fc23.src.rpm"
|
||||||
|
|
||||||
# test of presence of the uploaded file
|
# test of presence of the uploaded file
|
||||||
rlRun 'wget http://pkgs.example.org/repo/pkgs/prunerepo/prunerepo-1.1.tar.gz/sha512/6a6a30c0e8c661176ba0cf7e8f1909a493a298fd5088389f5eb630b577dee157106e5f89dc429bcf2a6fdffe4bc10b498906b9746220882827560bc5f72a1b01/prunerepo-1.1.tar.gz'
|
rlRun 'wget http://pkgs.example.org/repo/pkgs/rpms/prunerepo/prunerepo-1.1.tar.gz/sha512/6a6a30c0e8c661176ba0cf7e8f1909a493a298fd5088389f5eb630b577dee157106e5f89dc429bcf2a6fdffe4bc10b498906b9746220882827560bc5f72a1b01/prunerepo-1.1.tar.gz'
|
||||||
|
|
||||||
# commit of spec and updated sources and push into the git repo
|
# commit of spec and updated sources and push into the git repo
|
||||||
rlRun "git add -A && git commit -m 'test commit'"
|
rlRun "git add -A && git commit -m 'test commit'"
|
||||||
|
@ -47,8 +48,8 @@ rlJournalStart
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# test git-daemon and git-http-backend by read access
|
# test git-daemon and git-http-backend by read access
|
||||||
rlRun "git clone git://pkgs.example.org/prunerepo.git prunerepo-copy"
|
rlRun "git clone git://pkgs.example.org/rpms/prunerepo.git prunerepo-copy"
|
||||||
rlRun "git clone http://pkgs.example.org/git/prunerepo prunerepo-copy2"
|
rlRun "git clone http://pkgs.example.org/git/rpms/prunerepo prunerepo-copy2"
|
||||||
|
|
||||||
# test manifest file update
|
# test manifest file update
|
||||||
rlRun "wget http://pkgs.example.org/manifest.js.gz"
|
rlRun "wget http://pkgs.example.org/manifest.js.gz"
|
||||||
|
@ -57,7 +58,7 @@ rlJournalStart
|
||||||
mv ./manifest.js manifest.js.prev
|
mv ./manifest.js manifest.js.prev
|
||||||
|
|
||||||
# clone repo using rpkg
|
# clone repo using rpkg
|
||||||
rlRun "rpkg clone /var/lib/dist-git/git/prunerepo prunerepo2"
|
rlRun "rpkg clone rpms/prunerepo prunerepo2"
|
||||||
|
|
||||||
cd prunerepo2
|
cd prunerepo2
|
||||||
echo "manifest test" > sources
|
echo "manifest test" > sources
|
||||||
|
@ -71,8 +72,8 @@ rlJournalStart
|
||||||
gunzip ./manifest.js.gz
|
gunzip ./manifest.js.gz
|
||||||
rlRun "cat manifest.js | grep prunerepo.git"
|
rlRun "cat manifest.js | grep prunerepo.git"
|
||||||
|
|
||||||
modified_prev=`jq '.["/prunerepo.git"].modified' manifest.js.prev`
|
modified_prev=`jq '.["/rpms/prunerepo.git"].modified' manifest.js.prev`
|
||||||
modified=`jq '.["/prunerepo.git"].modified' manifest.js`
|
modified=`jq '.["/rpms/prunerepo.git"].modified' manifest.js`
|
||||||
|
|
||||||
rlAssertGreater "Check that 'modifed' timestamp has been updated in the manifest file" $modified $modified_prev
|
rlAssertGreater "Check that 'modifed' timestamp has been updated in the manifest file" $modified $modified_prev
|
||||||
|
|
||||||
|
@ -80,8 +81,8 @@ rlJournalStart
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlPhaseStartCleanup BasicTest
|
rlPhaseStartCleanup BasicTest
|
||||||
rm -rf $TESTPATH/prunerepo $TESTPATH/prunerepo-copy* $TESTPATH/prunerepo2 $TESTPATH/prunerepo-1.1.tar.gz $TESTPATH/manifest*
|
pkgs_cmd 'rm -rf /var/lib/dist-git/git/rpms/prunerepo.git'
|
||||||
#pkgs_cmd 'rm -rf /var/lib/dist-git/git/prunerepo.git'
|
pkgs_cmd 'sudo rm -rf /var/lib/dist-git/cache/lookaside/pkgs/rpms/prunerepo'
|
||||||
#pkgs_cmd 'sudo rm -rf /var/lib/dist-git/cache/lookaside/pkgs/prunerepo'
|
rm -rf $TEST_CWD
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
rlJournalEnd &> /dev/null
|
rlJournalEnd &> /dev/null
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
manifest test
|
|
|
@ -3,7 +3,9 @@
|
||||||
. /usr/bin/rhts-environment.sh || exit 1
|
. /usr/bin/rhts-environment.sh || exit 1
|
||||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||||
|
|
||||||
export TESTPATH="$( builtin cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
export SCRIPTDIR="$( builtin cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
export CWD=`pwd`
|
||||||
|
export TEST_CWD=`mktemp -d`
|
||||||
|
|
||||||
function pkgs_cmd {
|
function pkgs_cmd {
|
||||||
ssh -o 'StrictHostKeyChecking no' clime@pkgs.example.org $1
|
ssh -o 'StrictHostKeyChecking no' clime@pkgs.example.org $1
|
||||||
|
@ -13,26 +15,25 @@ rlJournalStart
|
||||||
rlPhaseStartSetup FedpkgTest
|
rlPhaseStartSetup FedpkgTest
|
||||||
pkgs_cmd 'git config --global user.email "clime@redhat.com"'
|
pkgs_cmd 'git config --global user.email "clime@redhat.com"'
|
||||||
pkgs_cmd 'git config --global user.name "clime"'
|
pkgs_cmd 'git config --global user.name "clime"'
|
||||||
pkgs_cmd '/usr/share/dist-git/setup_git_package prunerepo'
|
pkgs_cmd '/usr/share/dist-git/setup_git_package rpms/prunerepo'
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlPhaseStartTest FedpkgTest
|
rlPhaseStartTest FedpkgTest
|
||||||
CWD=`pwd`
|
cd $TEST_CWD
|
||||||
|
echo "Running tests in $TEST_CWD"
|
||||||
cd $TESTPATH
|
|
||||||
|
|
||||||
# clone repo using fedpkg
|
# clone repo using fedpkg
|
||||||
rlRun "fedpkg clone /var/lib/dist-git/git/prunerepo"
|
rlRun "fedpkg clone rpms/prunerepo"
|
||||||
|
|
||||||
cd prunerepo || exit
|
cd prunerepo
|
||||||
git config user.email "somebody@example.com"
|
git config user.email "somebody@example.com"
|
||||||
git config user.name "Some name"
|
git config user.name "Some name"
|
||||||
|
|
||||||
# upload into lookaside and working tree update
|
# upload into lookaside and working tree update
|
||||||
rlRun "fedpkg import --skip-diffs ../../../data/prunerepo-1.1-1.fc23.src.rpm"
|
rlRun "fedpkg import --skip-diffs $SCRIPTDIR/../../data/prunerepo-1.1-1.fc23.src.rpm"
|
||||||
|
|
||||||
# test of presence of the uploaded file
|
# test of presence of the uploaded file
|
||||||
rlRun 'wget http://pkgs.example.org/repo/pkgs/prunerepo/prunerepo-1.1.tar.gz/sha512/6a6a30c0e8c661176ba0cf7e8f1909a493a298fd5088389f5eb630b577dee157106e5f89dc429bcf2a6fdffe4bc10b498906b9746220882827560bc5f72a1b01/prunerepo-1.1.tar.gz'
|
rlRun 'wget http://pkgs.example.org/repo/pkgs/rpms/prunerepo/prunerepo-1.1.tar.gz/sha512/6a6a30c0e8c661176ba0cf7e8f1909a493a298fd5088389f5eb630b577dee157106e5f89dc429bcf2a6fdffe4bc10b498906b9746220882827560bc5f72a1b01/prunerepo-1.1.tar.gz'
|
||||||
|
|
||||||
# commit of spec and updated sources and push into the git repo
|
# commit of spec and updated sources and push into the git repo
|
||||||
rlRun "git add -A && git commit -m 'test commit'"
|
rlRun "git add -A && git commit -m 'test commit'"
|
||||||
|
@ -45,8 +46,8 @@ rlJournalStart
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlPhaseStartCleanup FedpkgTest
|
rlPhaseStartCleanup FedpkgTest
|
||||||
rm -rf $TESTPATH/prunerepo $TESTPATH/prunerepo-1.1.tar.gz
|
pkgs_cmd 'rm -rf /var/lib/dist-git/git/rpms/prunerepo.git'
|
||||||
pkgs_cmd 'rm -rf /var/lib/dist-git/git/prunerepo.git'
|
pkgs_cmd 'sudo rm -rf /var/lib/dist-git/cache/lookaside/pkgs/rpms/prunerepo'
|
||||||
pkgs_cmd 'sudo rm -rf /var/lib/dist-git/cache/lookaside/pkgs/prunerepo'
|
rm -rf $TEST_CWD
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
rlJournalEnd &> /dev/null
|
rlJournalEnd &> /dev/null
|
||||||
|
|
Loading…
Add table
Reference in a new issue