From 7388678f7f10ef33dc8461e51460b8ad492edb7a Mon Sep 17 00:00:00 2001 From: clime Date: Jan 25 2017 09:03:39 +0000 Subject: [beaker-tests-sanity] chroot updates --- diff --git a/beaker-tests/Sanity/copr-cli-basic-operations/runtest.sh b/beaker-tests/Sanity/copr-cli-basic-operations/runtest.sh index 052dba8..88ecead 100755 --- a/beaker-tests/Sanity/copr-cli-basic-operations/runtest.sh +++ b/beaker-tests/Sanity/copr-cli-basic-operations/runtest.sh @@ -66,15 +66,15 @@ rlJournalStart rlPhaseStartTest ### ---- CREATING PROJECTS ------ ### # create - OK - rlRun "copr-cli create --chroot fedora-23-x86_64 ${NAME_PREFIX}Project1" + rlRun "copr-cli create --chroot fedora-25-x86_64 ${NAME_PREFIX}Project1" # create - the same name again - rlRun "copr-cli create --chroot fedora-23-x86_64 ${NAME_PREFIX}Project1" 1 + rlRun "copr-cli create --chroot fedora-25-x86_64 ${NAME_PREFIX}Project1" 1 # create - wrong chroot name rlRun "copr-cli create --chroot wrong-chroot-name ${NAME_PREFIX}Project2" 1 # create second project - rlRun "copr-cli create --chroot fedora-23-x86_64 --repo 'copr://${NAME_PREFIX}Project1' ${NAME_PREFIX}Project2" + rlRun "copr-cli create --chroot fedora-25-x86_64 --repo 'copr://${NAME_PREFIX}Project1' ${NAME_PREFIX}Project2" # create third project - rlRun "copr-cli create --chroot fedora-23-x86_64 --repo 'copr://${NAME_PREFIX}Project1' ${NAME_PREFIX}Project3" + rlRun "copr-cli create --chroot fedora-25-x86_64 --repo 'copr://${NAME_PREFIX}Project1' ${NAME_PREFIX}Project3" ### left after this section: Project1, Project2, Project3 ### ---- BUILDING --------------- ### @@ -89,7 +89,7 @@ rlJournalStart # build - FAIL (syntax error in source code) rlRun "copr-cli build ${NAME_PREFIX}Project1 http://asamalik.fedorapeople.org/evilhello-2.8-1.fc20.src.rpm" 4 # enable Project1 repo - rlRun "yes | dnf copr enable ${NAME_PREFIX}Project1 fedora-23-x86_64" + rlRun "yes | dnf copr enable ${NAME_PREFIX}Project1 fedora-25-x86_64" # install hello package rlRun "dnf install -y hello" # and check wheter it's installed @@ -110,7 +110,7 @@ rlJournalStart # build 1st package rlRun "copr-cli build ${NAME_PREFIX}Project2 http://asamalik.fedorapeople.org/hello-2.8-1.fc20.src.rpm" # enable Project2 repo - rlRun "yes | dnf copr enable ${NAME_PREFIX}Project2 fedora-23-x86_64" + rlRun "yes | dnf copr enable ${NAME_PREFIX}Project2 fedora-25-x86_64" # try to install - FAIL ( public project metadata not updated) rlRun "dnf install -y hello" 1 # build 2nd package ( requires 1st package for the build) @@ -227,7 +227,7 @@ rlJournalStart SOURCE_JSON=`mktemp` # create special repo for our test - rlRun "copr-cli create --chroot fedora-23-x86_64 ${NAME_PREFIX}Project4" + rlRun "copr-cli create --chroot fedora-25-x86_64 ${NAME_PREFIX}Project4" # invalid package data rlRun "copr-cli add-package-tito ${NAME_PREFIX}Project4 --name test_package_tito --git-url invalid_url" 1 @@ -361,7 +361,7 @@ rlJournalStart rlAssertEquals "len(package_list) == 5" `copr-cli list-packages ${NAME_PREFIX}Project4 | jq '. | length'` 5 ## Test package listing attributes - rlRun "copr-cli create --chroot fedora-23-x86_64 ${NAME_PREFIX}Project5" + rlRun "copr-cli create --chroot fedora-25-x86_64 ${NAME_PREFIX}Project5" rlRun "copr-cli add-package-tito ${NAME_PREFIX}Project5 --name example --git-url http://github.com/clime/example.git" BUILDS=`mktemp` @@ -408,37 +408,37 @@ rlJournalStart ## test package building # create special repo for our test - rlRun "copr-cli create --chroot fedora-23-x86_64 --chroot fedora-22-x86_64 ${NAME_PREFIX}Project6" + rlRun "copr-cli create --chroot fedora-25-x86_64 --chroot fedora-24-x86_64 ${NAME_PREFIX}Project6" # create tito package rlRun "copr-cli add-package-tito ${NAME_PREFIX}Project6 --name test_package_tito --git-url http://github.com/clime/example.git --test on" # build the package - rlRun "copr-cli build-package --name test_package_tito ${NAME_PREFIX}Project6 --timeout 10000 -r fedora-23-x86_64" # TODO: timeout not honored + rlRun "copr-cli build-package --name test_package_tito ${NAME_PREFIX}Project6 --timeout 10000 -r fedora-25-x86_64" # TODO: timeout not honored # test disable_createrepo - rlRun "copr-cli create --chroot fedora-23-x86_64 --disable_createrepo false ${NAME_PREFIX}DisableCreaterepoFalse" + rlRun "copr-cli create --chroot fedora-25-x86_64 --disable_createrepo false ${NAME_PREFIX}DisableCreaterepoFalse" rlRun "copr-cli build ${NAME_PREFIX}DisableCreaterepoFalse http://asamalik.fedorapeople.org/hello-2.8-1.fc20.src.rpm" - rlRun "curl --silent $BACKEND_URL/results/${NAME_PREFIX}DisableCreaterepoFalse/fedora-23-x86_64/devel/repodata/ | grep \"404.*Not Found\"" 0 + rlRun "curl --silent $BACKEND_URL/results/${NAME_PREFIX}DisableCreaterepoFalse/fedora-25-x86_64/devel/repodata/ | grep \"404.*Not Found\"" 0 - rlRun "copr-cli create --chroot fedora-23-x86_64 --disable_createrepo true ${NAME_PREFIX}DisableCreaterepoTrue" + rlRun "copr-cli create --chroot fedora-25-x86_64 --disable_createrepo true ${NAME_PREFIX}DisableCreaterepoTrue" rlRun "copr-cli build ${NAME_PREFIX}DisableCreaterepoTrue http://asamalik.fedorapeople.org/hello-2.8-1.fc20.src.rpm" - rlRun "curl --silent $BACKEND_URL/results/${NAME_PREFIX}DisableCreaterepoTrue/fedora-23-x86_64/devel/repodata/ | grep -E \"404.*Not Found\"" 1 + rlRun "curl --silent $BACKEND_URL/results/${NAME_PREFIX}DisableCreaterepoTrue/fedora-25-x86_64/devel/repodata/ | grep -E \"404.*Not Found\"" 1 # test unlisted_on_hp project attribute - rlRun "copr-cli create --unlisted-on-hp on --chroot fedora-23-x86_64 ${NAME_PREFIX}Project7" + rlRun "copr-cli create --unlisted-on-hp on --chroot fedora-25-x86_64 ${NAME_PREFIX}Project7" rlRun "curl $FRONTEND_URL --silent | grep Project7" 1 # project won't be present on hp rlRun "copr-cli modify --unlisted-on-hp off ${NAME_PREFIX}Project7" rlRun "curl $FRONTEND_URL --silent | grep Project7" 0 # project should be visible on hp now # test search index update by copr insertion - rlRun "copr-cli create --chroot fedora-23-x86_64 --chroot fedora-22-x86_64 ${NAME_PREFIX}Project8" + rlRun "copr-cli create --chroot fedora-25-x86_64 --chroot fedora-24-x86_64 ${NAME_PREFIX}Project8" rlRun "curl $FRONTEND_URL/coprs/fulltext/?fulltext=${NAME_VAR}Project8 --silent | grep -E \"href=.*${NAME_VAR}Project8.*\"" 1 # search results _not_ returned rlRun "curl -X POST $FRONTEND_URL/coprs/update_search_index/" rlRun "curl $FRONTEND_URL/coprs/fulltext/?fulltext=${NAME_VAR}Project8 --silent | grep -E \"href=.*${NAME_VAR}Project8.*\"" 0 # search results returned # test search index update by package addition - rlRun "copr-cli create --chroot fedora-23-x86_64 --chroot fedora-22-x86_64 ${NAME_PREFIX}Project9" && sleep 65 + rlRun "copr-cli create --chroot fedora-25-x86_64 --chroot fedora-24-x86_64 ${NAME_PREFIX}Project9" && sleep 65 rlRun "curl -X POST $FRONTEND_URL/coprs/update_search_index/" rlRun "curl $FRONTEND_URL/coprs/fulltext/?fulltext=${NAME_VAR}Project9 --silent | grep -E \"href=.*${NAME_VAR}Project9.*\"" 1 # search results _not_ returned rlRun "copr-cli add-package-tito ${NAME_PREFIX}Project9 --name test_package_tito --git-url http://github.com/clime/example.git --test on" # insert package to the copr @@ -446,13 +446,13 @@ rlJournalStart rlRun "curl $FRONTEND_URL/coprs/fulltext/?fulltext=${NAME_VAR}Project9 --silent | grep -E \"href=.*${NAME_VAR}Project9.*\"" 0 # search results are returned now # TODO: Modularity integration tests - rlRun "copr-cli create --chroot fedora-23-x86_64 ${NAME_PREFIX}Project11" - #rlRun "curl -X POST --user aufnfpybzwwqjtalbial:qmxehlybyghkqlwmyumxuhahbhzxrq --form \"file=@metadata.yaml;filename=module_md\" http://localhost:8080/api/coprs/${NAME_PREFIX}Project11/modify/fedora-23-x86_64/" + rlRun "copr-cli create --chroot fedora-25-x86_64 ${NAME_PREFIX}Project11" + #rlRun "curl -X POST --user aufnfpybzwwqjtalbial:qmxehlybyghkqlwmyumxuhahbhzxrq --form \"file=@metadata.yaml;filename=module_md\" http://localhost:8080/api/coprs/${NAME_PREFIX}Project11/modify/fedora-25-x86_64/" ### ---- FORKING PROJECTS -------- ### # default fork usage OUTPUT=`mktemp` - rlRun "copr-cli create --chroot fedora-23-x86_64 ${NAME_PREFIX}Project10" + rlRun "copr-cli create --chroot fedora-25-x86_64 ${NAME_PREFIX}Project10" rlRun "copr-cli build ${NAME_PREFIX}Project10 http://asamalik.fedorapeople.org/hello-2.8-1.fc20.src.rpm" rlRun "copr-cli fork ${NAME_PREFIX}Project10 ${NAME_PREFIX}Project10Fork > $OUTPUT" rlAssertEquals "Forking project" `grep -r 'Forking project' $OUTPUT |wc -l` 1 @@ -474,7 +474,7 @@ rlJournalStart sleep 60 # use package from forked project - rlRun "yes | dnf copr enable ${NAME_PREFIX}Project10Fork fedora-23-x86_64" + rlRun "yes | dnf copr enable ${NAME_PREFIX}Project10Fork fedora-25-x86_64" rlRun "dnf install -y hello" # check repo properties @@ -485,7 +485,7 @@ rlJournalStart # check whether pubkey.gpg exists rlRun "curl -f $(grep "^gpgkey=" ${REPOFILE} |sed 's/^gpgkey=//g')" - rlRun "yes | dnf copr enable ${NAME_PREFIX}Project10 fedora-23-x86_64" + rlRun "yes | dnf copr enable ${NAME_PREFIX}Project10 fedora-25-x86_64" REPOFILE_SOURCE=$(echo /etc/yum.repos.d/_copr_${NAME_PREFIX}Project10.repo |sed 's/\/TEST/-TEST/g') rlRun "wget $(grep "^gpgkey=" ${REPOFILE_SOURCE} |sed 's/^gpgkey=//g') -O pubkey_source.gpg" rlRun "wget $(grep "^gpgkey=" ${REPOFILE} |sed 's/^gpgkey=//g') -O pubkey_fork.gpg" @@ -497,7 +497,7 @@ rlJournalStart # Bug 1365882 - on create group copr, gpg key is generated for user and not for group WAITING=`mktemp` - rlRun "copr-cli create ${NAME_PREFIX}Project12 --chroot fedora-23-x86_64" 0 + rlRun "copr-cli create ${NAME_PREFIX}Project12 --chroot fedora-25-x86_64" 0 while :; do curl --silent $FRONTEND_URL/backend/waiting/ > $WAITING; if [ `cat $WAITING |wc -l` -gt 4 ]; then break; fi; done cat $WAITING # debug rlRun "cat $WAITING | grep -E '.*data.*username.*' | grep $OWNER" 0 @@ -505,7 +505,7 @@ rlJournalStart # Bug 1368181 - delete-project action run just after delete-build action will bring action_dispatcher down # FIXME: this test is not a reliable reproducer. Depends on timing as few others. # TODO: Remove this. - rlRun "copr-cli create ${NAME_PREFIX}TestConsequentDeleteActions --chroot fedora-23-x86_64" 0 + rlRun "copr-cli create ${NAME_PREFIX}TestConsequentDeleteActions --chroot fedora-25-x86_64" 0 rlRun "copr-cli add-package-tito ${NAME_PREFIX}TestConsequentDeleteActions --name example --git-url http://github.com/clime/example.git" rlRun "copr-cli build-package --name example ${NAME_PREFIX}TestConsequentDeleteActions" rlAssertEquals "Test that the project was successfully created on backend" `curl -w '%{response_code}' -silent -o /dev/null $BACKEND_URL/results/${NAME_PREFIX}TestConsequentDeleteActions/` 200 @@ -514,33 +514,33 @@ rlJournalStart rlAssertEquals "Test that the project was successfully deleted from backend" `curl -w '%{response_code}' -silent -o /dev/null $BACKEND_URL/results/${NAME_PREFIX}TestConsequentDeleteActions/` 404 # Bug 1368259 - Deleting a build from a group project doesn't delete backend files - rlRun "copr-cli create ${NAME_PREFIX}TestDeleteGroupBuild --chroot fedora-23-x86_64" 0 + rlRun "copr-cli create ${NAME_PREFIX}TestDeleteGroupBuild --chroot fedora-25-x86_64" 0 rlRun "copr-cli add-package-tito ${NAME_PREFIX}TestDeleteGroupBuild --name example --git-url http://github.com/clime/example.git" rlRun "copr-cli build-package --name example ${NAME_PREFIX}TestDeleteGroupBuild | grep 'Created builds:' | sed 's/Created builds: \([0-9][0-9]*\)/\1/g' > TestDeleteGroupBuild_example_build_id.txt" BUILD_ID=`cat TestDeleteGroupBuild_example_build_id.txt` MYTMPDIR=`mktemp -d -p .` && cd $MYTMPDIR - wget -r -np $BACKEND_URL/results/${NAME_PREFIX}TestDeleteGroupBuild/fedora-23-x86_64/ + wget -r -np $BACKEND_URL/results/${NAME_PREFIX}TestDeleteGroupBuild/fedora-25-x86_64/ rlRun "find . -type d | grep '${BUILD_ID}-example'" 0 "Test that the build directory (ideally with results) is present on backend" cd - && rm -r $MYTMPDIR MYTMPDIR=`mktemp -d -p .` && cd $MYTMPDIR rlRun "copr-cli delete-package --name example ${NAME_PREFIX}TestDeleteGroupBuild" # FIXME: We don't have copr-cli delete-build yet sleep 11 # default sleeptime + 1 - wget -r -np $BACKEND_URL/results/${NAME_PREFIX}TestDeleteGroupBuild/fedora-23-x86_64/ + wget -r -np $BACKEND_URL/results/${NAME_PREFIX}TestDeleteGroupBuild/fedora-25-x86_64/ rlRun "find . -type d | grep '${BUILD_ID}-example'" 1 "Test that the build directory is not present on backend" cd - && rm -r $MYTMPDIR # test that results and configs are correctly retrieved from builders after build - rlRun "copr-cli create ${NAME_PREFIX}DownloadMockCfgs --chroot fedora-23-x86_64" 0 + rlRun "copr-cli create ${NAME_PREFIX}DownloadMockCfgs --chroot fedora-25-x86_64" 0 rlRun "copr-cli build ${NAME_PREFIX}DownloadMockCfgs http://asamalik.fedorapeople.org/hello-2.8-1.fc20.src.rpm" MYTMPDIR=`mktemp -d -p .` && cd $MYTMPDIR - wget -r -np $BACKEND_URL/results/${NAME_PREFIX}DownloadMockCfgs/fedora-23-x86_64/ - rlRun "find . -type f | grep 'configs/fedora-23-x86_64.cfg'" 0 + wget -r -np $BACKEND_URL/results/${NAME_PREFIX}DownloadMockCfgs/fedora-25-x86_64/ + rlRun "find . -type f | grep 'configs/fedora-25-x86_64.cfg'" 0 rlRun "find . -type f | grep 'mockchain.log'" 0 rlRun "find . -type f | grep 'root.log'" 0 cd - && rm -r $MYTMPDIR # Bug 1370704 - Internal Server Error (too many values to unpack) - rlRun "copr-cli create ${NAME_PREFIX}TestBug1370704 --chroot fedora-23-x86_64" 0 + rlRun "copr-cli create ${NAME_PREFIX}TestBug1370704 --chroot fedora-25-x86_64" 0 rlRun "copr-cli add-package-tito ${NAME_PREFIX}TestBug1370704 --name example --git-url http://github.com/clime/example.git" rlRun "copr-cli build-package --name example ${NAME_PREFIX}TestBug1370704" rlAssertEquals "Test OK return code from the monitor API" `curl -w '%{response_code}' -silent -o /dev/null ${FRONTEND_URL}/api/coprs/${NAME_PREFIX}TestBug1370704/monitor/` 200