mirror of
https://github.com/release-engineering/dist-git.git
synced 2025-02-23 15:02:54 +00:00
also test no default namespace being set
This commit is contained in:
parent
62fcde705d
commit
2a0f076dab
8 changed files with 79 additions and 2 deletions
|
@ -55,11 +55,17 @@ vagrant ssh -c "echo $PUBKEY > /tmp/id_rsa.pub.remote"
|
|||
|
||||
vagrant ssh -c '
|
||||
sudo mkdir -p /home/clime/.ssh
|
||||
sudo touch /home/clime/.ssh/authorized_keys
|
||||
sudo mv /tmp/id_rsa.pub.remote /home/clime/.ssh/authorized_keys
|
||||
sudo cp /tmp/id_rsa.pub.remote /home/clime/.ssh/authorized_keys
|
||||
sudo chown -R clime:clime /home/clime/.ssh
|
||||
sudo chmod 700 /home/clime/.ssh
|
||||
sudo chmod 600 /home/clime/.ssh/authorized_keys
|
||||
' distgit
|
||||
|
||||
vagrant ssh -c '
|
||||
sudo mkdir -p /root/.ssh
|
||||
sudo cp /tmp/id_rsa.pub.remote /root/.ssh/authorized_keys
|
||||
sudo chmod 700 /root/.ssh
|
||||
sudo chmod 600 /root/.ssh/authorized_keys
|
||||
' distgit
|
||||
|
||||
cd $SCRIPTPATH
|
||||
|
|
14
beaker-tests/tests/basic-test/dist-git.conf
Normal file
14
beaker-tests/tests/basic-test/dist-git.conf
Normal file
|
@ -0,0 +1,14 @@
|
|||
[dist-git]
|
||||
git_author_name = Fedora Release Engineering
|
||||
git_author_email = rel-eng@lists.fedoraproject.org
|
||||
|
||||
cache_dir = /var/lib/dist-git/cache
|
||||
gitroot_dir = /var/lib/dist-git/git
|
||||
|
||||
gitolite = True
|
||||
grok = True
|
||||
fedmsgs = True
|
||||
old_paths = True
|
||||
nomd5 = True
|
||||
|
||||
default_namespace = rpms
|
|
@ -16,6 +16,7 @@ rlJournalStart
|
|||
pkgs_cmd 'git config --global user.email "clime@redhat.com"'
|
||||
pkgs_cmd 'git config --global user.name "clime"'
|
||||
pkgs_cmd '/usr/share/dist-git/setup_git_package rpms/prunerepo'
|
||||
scp -o 'StrictHostKeyChecking no' $SCRIPTDIR/dist-git.conf root@pkgs.example.org:/etc/dist-git/dist-git.conf
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest BasicTest
|
||||
|
|
12
beaker-tests/tests/direct-test/dist-git-no-namespace.conf
Normal file
12
beaker-tests/tests/direct-test/dist-git-no-namespace.conf
Normal file
|
@ -0,0 +1,12 @@
|
|||
[dist-git]
|
||||
git_author_name = Fedora Release Engineering
|
||||
git_author_email = rel-eng@lists.fedoraproject.org
|
||||
|
||||
cache_dir = /var/lib/dist-git/cache
|
||||
gitroot_dir = /var/lib/dist-git/git
|
||||
|
||||
gitolite = True
|
||||
grok = True
|
||||
fedmsgs = True
|
||||
old_paths = True
|
||||
nomd5 = True
|
14
beaker-tests/tests/direct-test/dist-git.conf
Normal file
14
beaker-tests/tests/direct-test/dist-git.conf
Normal file
|
@ -0,0 +1,14 @@
|
|||
[dist-git]
|
||||
git_author_name = Fedora Release Engineering
|
||||
git_author_email = rel-eng@lists.fedoraproject.org
|
||||
|
||||
cache_dir = /var/lib/dist-git/cache
|
||||
gitroot_dir = /var/lib/dist-git/git
|
||||
|
||||
gitolite = True
|
||||
grok = True
|
||||
fedmsgs = True
|
||||
old_paths = True
|
||||
nomd5 = True
|
||||
|
||||
default_namespace = rpms
|
|
@ -13,6 +13,7 @@ function pkgs_cmd {
|
|||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup DirectTest
|
||||
scp -o 'StrictHostKeyChecking no' $SCRIPTDIR/dist-git.conf root@pkgs.example.org:/etc/dist-git/dist-git.conf
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest DirectTest
|
||||
|
@ -38,12 +39,26 @@ rlJournalStart
|
|||
resp=`curl --silent -X POST http://pkgs.example.org/repo/pkgs/upload.cgi -F name=foo -F md5sum=80e541f050d558424d62743195481595 -F file=@"$SCRIPTDIR/../../data/prunerepo-1.1-1.fc23.src.rpm"`
|
||||
rlRun "grep -q 'Uploads with md5 are no longer allowed.' <<< '$resp'"
|
||||
|
||||
# try operate without default namespacing
|
||||
scp -o 'StrictHostKeyChecking no' $SCRIPTDIR/dist-git-no-namespace.conf root@pkgs.example.org:/etc/dist-git/dist-git.conf
|
||||
|
||||
pkgs_cmd '/usr/share/dist-git/setup_git_package prunerepo'
|
||||
rlRun "git clone git://pkgs.example.org/prunerepo.git prunerepo2"
|
||||
|
||||
resp=`curl --silent -X POST http://pkgs.example.org/repo/pkgs/upload.cgi -F name=prunerepo -F sha512sum=a5f31ae7586dae8dc1ca9a91df208893a0c3ab0032ab153c12eb4255f7219e4baec4c7581f353295c52522fee155c64f1649319044fd1bbb40451f123496b6b3 -F file=@"$SCRIPTDIR/../../data/prunerepo-1.1-1.fc23.src.rpm"`
|
||||
rlRun "grep -q 'stored OK' <<< '$resp'"
|
||||
|
||||
# test of presence of the uploaded file
|
||||
rlRun 'wget http://pkgs.example.org/repo/pkgs/prunerepo/prunerepo-1.1-1.fc23.src.rpm/sha512/a5f31ae7586dae8dc1ca9a91df208893a0c3ab0032ab153c12eb4255f7219e4baec4c7581f353295c52522fee155c64f1649319044fd1bbb40451f123496b6b3/prunerepo-1.1-1.fc23.src.rpm'
|
||||
|
||||
cd $CWD
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup DirectTest
|
||||
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
|
||||
rlJournalEnd &> /dev/null
|
||||
|
|
14
beaker-tests/tests/fedpkg-test/dist-git.conf
Normal file
14
beaker-tests/tests/fedpkg-test/dist-git.conf
Normal file
|
@ -0,0 +1,14 @@
|
|||
[dist-git]
|
||||
git_author_name = Fedora Release Engineering
|
||||
git_author_email = rel-eng@lists.fedoraproject.org
|
||||
|
||||
cache_dir = /var/lib/dist-git/cache
|
||||
gitroot_dir = /var/lib/dist-git/git
|
||||
|
||||
gitolite = True
|
||||
grok = True
|
||||
fedmsgs = True
|
||||
old_paths = True
|
||||
nomd5 = True
|
||||
|
||||
default_namespace = rpms
|
|
@ -16,6 +16,7 @@ rlJournalStart
|
|||
pkgs_cmd 'git config --global user.email "clime@redhat.com"'
|
||||
pkgs_cmd 'git config --global user.name "clime"'
|
||||
pkgs_cmd '/usr/share/dist-git/setup_git_package rpms/prunerepo'
|
||||
scp -o 'StrictHostKeyChecking no' $SCRIPTDIR/dist-git.conf root@pkgs.example.org:/etc/dist-git/dist-git.conf
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest FedpkgTest
|
||||
|
|
Loading…
Add table
Reference in a new issue