From e3a9c3d60ac481d2bae4ddd7986c0b08b5870d92 Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Thu, 8 Dec 2022 09:52:50 +0100 Subject: [PATCH 1/3] behave: Rename test projects, consistently use the 'test:' prefix --- behave/container-setup-initial-data.sh | 24 +++---- behave/container-setup-prebuilt-rpms.sh | 32 +++++----- behave/features/add.feature | 6 +- behave/features/checkout.feature | 62 +++++++++---------- ...ies-project-package-repo-arch-file.feature | 16 ++--- ...binaries-project-package-repo-arch.feature | 10 +-- .../getbinaries-project-repo-arch.feature | 6 +- .../getbinaries-repo-arch-pkgcheckout.feature | 10 +-- .../getbinaries-repo-arch-prjcheckout.feature | 10 +-- .../getbinaries-repo-pkgcheckout.feature | 12 ++-- .../getbinaries-repo-prjcheckout.feature | 10 +-- behave/features/list.feature | 10 +-- behave/fixtures/prj/home_Admin.xml | 3 +- .../prj/{devel.xml => test_devel.xml} | 4 +- ...{openSUSE_Factory.xml => test_factory.xml} | 4 +- .../prj/{release.xml => test_release.xml} | 14 +++-- 16 files changed, 117 insertions(+), 116 deletions(-) rename behave/fixtures/prj/{devel.xml => test_devel.xml} (84%) rename behave/fixtures/prj/{openSUSE_Factory.xml => test_factory.xml} (82%) rename behave/fixtures/prj/{release.xml => test_release.xml} (56%) diff --git a/behave/container-setup-initial-data.sh b/behave/container-setup-initial-data.sh index 636d65cd..283fc0fc 100644 --- a/behave/container-setup-initial-data.sh +++ b/behave/container-setup-initial-data.sh @@ -18,17 +18,17 @@ OSC="osc -A https://localhost" # create projects $OSC api -X PUT '/source/openSUSE.org/_meta' --file "$FIXTURES_DIR/prj/openSUSE.org.xml" -$OSC api -X PUT '/source/devel/_meta' --file "$FIXTURES_DIR/prj/devel.xml" -$OSC api -X PUT '/source/release/_meta' --file "$FIXTURES_DIR/prj/release.xml" -$OSC api -X PUT '/source/openSUSE:Factory/_meta' --file "$FIXTURES_DIR/prj/openSUSE_Factory.xml" +$OSC api -X PUT '/source/test:devel/_meta' --file "$FIXTURES_DIR/prj/test_devel.xml" +$OSC api -X PUT '/source/test:factory/_meta' --file "$FIXTURES_DIR/prj/test_factory.xml" +$OSC api -X PUT '/source/test:release/_meta' --file "$FIXTURES_DIR/prj/test_release.xml" $OSC api -X PUT '/source/home:Admin/_meta' --file "$FIXTURES_DIR/prj/home_Admin.xml" -# create package 'openSUSE:Factory/test-pkgA' +# create package 'test:factory/test-pkgA' TMP_DIR=$(mktemp -d) cd "$TMP_DIR" -$OSC checkout openSUSE:Factory +$OSC checkout test:factory cd "$_" $OSC mkpac test-pkgA @@ -50,11 +50,11 @@ $OSC commit -m 'Version 3' rm -rf "$TMP_DIR" -# create package 'openSUSE:Factory/test-pkgB' +# create package 'test:factory/test-pkgB' TMP_DIR=$(mktemp -d) cd "$TMP_DIR" -$OSC checkout openSUSE:Factory +$OSC checkout test:factory cd "$_" $OSC mkpac test-pkgB @@ -72,11 +72,11 @@ $OSC commit -m 'Version 2' rm -rf "$TMP_DIR" -# create package 'openSUSE:Factory/multibuild-pkg' +# create package 'test:factory/multibuild-pkg' TMP_DIR=$(mktemp -d) cd "$TMP_DIR" -$OSC checkout openSUSE:Factory +$OSC checkout test:factory cd "$_" $OSC mkpac multibuild-pkg @@ -92,11 +92,11 @@ $OSC commit -m 'Initial commit' rm -rf "$TMP_DIR" -# create package 'devel/test-pkgA' +# create package 'test:devel/test-pkgA' TMP_DIR=$(mktemp -d) cd "$TMP_DIR" -$OSC checkout devel +$OSC checkout test:devel cd "$_" $OSC mkpac test-pkgA @@ -106,4 +106,4 @@ cd "$_" $OSC commit -m 'Initial commit' # set the devel project -$OSC setdevelproject openSUSE:Factory/test-pkgA devel/test-pkgA +$OSC setdevelproject test:factory/test-pkgA test:devel/test-pkgA diff --git a/behave/container-setup-prebuilt-rpms.sh b/behave/container-setup-prebuilt-rpms.sh index 16c227fe..d65a1ffb 100644 --- a/behave/container-setup-prebuilt-rpms.sh +++ b/behave/container-setup-prebuilt-rpms.sh @@ -39,43 +39,43 @@ function upload_rpms() { } -# build package 'openSUSE:Factory/test-pkgA' +# build package 'test:factory/test-pkgA' TMP_DIR=$(mktemp -d) rpmbuild -ba "$FIXTURES_DIR/pac/test-pkgA-3.spec" --define "_topdir $TMP_DIR" -upload_rpms "$TMP_DIR" openSUSE:Factory standard i586 test-pkgA -upload_rpms "$TMP_DIR" openSUSE:Factory standard x86_64 test-pkgA +upload_rpms "$TMP_DIR" test:factory standard i586 test-pkgA +upload_rpms "$TMP_DIR" test:factory standard x86_64 test-pkgA rm -rf "$TMP_DIR" -# build package 'openSUSE:Factory/test-pkgB' +# build package 'test:factory/test-pkgB' TMP_DIR=$(mktemp -d) rpmbuild -ba "$FIXTURES_DIR/pac/test-pkgB-2.spec" --define "_topdir $TMP_DIR" -upload_rpms "$TMP_DIR" openSUSE:Factory standard i586 test-pkgB -upload_rpms "$TMP_DIR" openSUSE:Factory standard x86_64 test-pkgB +upload_rpms "$TMP_DIR" test:factory standard i586 test-pkgB +upload_rpms "$TMP_DIR" test:factory standard x86_64 test-pkgB rm -rf "$TMP_DIR" -# build package 'openSUSE:Factory/multibuild-pkg' +# build package 'test:factory/multibuild-pkg' TMP_DIR=$(mktemp -d) rpmbuild -ba "$FIXTURES_DIR/pac/multibuild-pkg-1.spec" --define "_topdir $TMP_DIR" --target=x86_64,i586 --define "flavor %{nil}" -upload_rpms "$TMP_DIR" openSUSE:Factory standard i586 multibuild-pkg -upload_rpms "$TMP_DIR" openSUSE:Factory standard x86_64 multibuild-pkg +upload_rpms "$TMP_DIR" test:factory standard i586 multibuild-pkg +upload_rpms "$TMP_DIR" test:factory standard x86_64 multibuild-pkg rm -rf "$TMP_DIR" -# build package 'openSUSE:Factory/multibuild-pkg:flavor1' +# build package 'test:factory/multibuild-pkg:flavor1' TMP_DIR=$(mktemp -d) rpmbuild -ba "$FIXTURES_DIR/pac/multibuild-pkg-1.spec" --define "_topdir $TMP_DIR" --target=x86_64,i586 --define "flavor flavor1" -upload_rpms "$TMP_DIR" openSUSE:Factory standard i586 multibuild-pkg:flavor1 -upload_rpms "$TMP_DIR" openSUSE:Factory standard x86_64 multibuild-pkg:flavor1 +upload_rpms "$TMP_DIR" test:factory standard i586 multibuild-pkg:flavor1 +upload_rpms "$TMP_DIR" test:factory standard x86_64 multibuild-pkg:flavor1 rm -rf "$TMP_DIR" -# build package 'openSUSE:Factory/multibuild-pkg:flavor2' +# build package 'test:factory/multibuild-pkg:flavor2' TMP_DIR=$(mktemp -d) rpmbuild -ba "$FIXTURES_DIR/pac/multibuild-pkg-1.spec" --define "_topdir $TMP_DIR" --target=x86_64,i586 --define "flavor flavor2" -upload_rpms "$TMP_DIR" openSUSE:Factory standard i586 multibuild-pkg:flavor2 -upload_rpms "$TMP_DIR" openSUSE:Factory standard x86_64 multibuild-pkg:flavor2 +upload_rpms "$TMP_DIR" test:factory standard i586 multibuild-pkg:flavor2 +upload_rpms "$TMP_DIR" test:factory standard x86_64 multibuild-pkg:flavor2 rm -rf "$TMP_DIR" @@ -91,7 +91,7 @@ FILES="_buildenv _statistics rpmlint.log" for ARCH in $ARCHES; do for PACKAGE in $PACKAGES; do for FILE in $FILES; do - touch /srv/obs/build/openSUSE:Factory/standard/$ARCH/$PACKAGE/$FILE + touch /srv/obs/build/test:factory/standard/$ARCH/$PACKAGE/$FILE done done done diff --git a/behave/features/add.feature b/behave/features/add.feature index fe2f1d05..3fbc0d93 100644 --- a/behave/features/add.feature +++ b/behave/features/add.feature @@ -3,9 +3,9 @@ Feature: `osc add` command Scenario: Run `osc add` on a new file in a package Given I set working directory to "{context.osc.temp}" - And I execute osc with args "checkout openSUSE:Factory test-pkgA" - And I set working directory to "{context.osc.temp}/openSUSE:Factory/test-pkgA" - And I copy file "{context.fixtures}/pac/test-pkgA-1.spec" to "{context.osc.temp}/openSUSE:Factory/test-pkgA/new_file" + And I execute osc with args "checkout test:factory test-pkgA" + And I set working directory to "{context.osc.temp}/test:factory/test-pkgA" + And I copy file "{context.fixtures}/pac/test-pkgA-1.spec" to "{context.osc.temp}/test:factory/test-pkgA/new_file" And I execute osc with args "status --verbose" And stdout is """ diff --git a/behave/features/checkout.feature b/behave/features/checkout.feature index 956ac967..319a40cd 100644 --- a/behave/features/checkout.feature +++ b/behave/features/checkout.feature @@ -3,59 +3,59 @@ Feature: `osc checkout` command Scenario: Run `osc checkout` on a project Given I set working directory to "{context.osc.temp}" - When I execute osc with args "checkout openSUSE:Factory" - Then directory "{context.osc.temp}/openSUSE:Factory" exists - And directory "{context.osc.temp}/openSUSE:Factory/.osc" exists - And directory "{context.osc.temp}/openSUSE:Factory/test-pkgA" exists - And directory "{context.osc.temp}/openSUSE:Factory/test-pkgA/.osc" exists - And file "{context.osc.temp}/openSUSE:Factory/test-pkgA/test-pkgA.spec" exists - And file "{context.osc.temp}/openSUSE:Factory/test-pkgA/test-pkgA.changes" exists - And directory "{context.osc.temp}/openSUSE:Factory/test-pkgB" exists - And directory "{context.osc.temp}/openSUSE:Factory/test-pkgB/.osc" exists - And file "{context.osc.temp}/openSUSE:Factory/test-pkgB/test-pkgB.spec" exists - And file "{context.osc.temp}/openSUSE:Factory/test-pkgB/test-pkgB.changes" exists + When I execute osc with args "checkout test:factory" + Then directory "{context.osc.temp}/test:factory" exists + And directory "{context.osc.temp}/test:factory/.osc" exists + And directory "{context.osc.temp}/test:factory/test-pkgA" exists + And directory "{context.osc.temp}/test:factory/test-pkgA/.osc" exists + And file "{context.osc.temp}/test:factory/test-pkgA/test-pkgA.spec" exists + And file "{context.osc.temp}/test:factory/test-pkgA/test-pkgA.changes" exists + And directory "{context.osc.temp}/test:factory/test-pkgB" exists + And directory "{context.osc.temp}/test:factory/test-pkgB/.osc" exists + And file "{context.osc.temp}/test:factory/test-pkgB/test-pkgB.spec" exists + And file "{context.osc.temp}/test:factory/test-pkgB/test-pkgB.changes" exists Scenario: Run `osc checkout` on a package Given I set working directory to "{context.osc.temp}" - When I execute osc with args "checkout openSUSE:Factory test-pkgA" - Then directory "{context.osc.temp}/openSUSE:Factory" exists - And directory "{context.osc.temp}/openSUSE:Factory/.osc" exists - And directory "{context.osc.temp}/openSUSE:Factory/test-pkgA" exists - And directory "{context.osc.temp}/openSUSE:Factory/test-pkgA/.osc" exists - And file "{context.osc.temp}/openSUSE:Factory/test-pkgA/test-pkgA.spec" exists - And file "{context.osc.temp}/openSUSE:Factory/test-pkgA/test-pkgA.changes" exists - And directory "{context.osc.temp}/openSUSE:Factory/test-pkgB" does not exist + When I execute osc with args "checkout test:factory test-pkgA" + Then directory "{context.osc.temp}/test:factory" exists + And directory "{context.osc.temp}/test:factory/.osc" exists + And directory "{context.osc.temp}/test:factory/test-pkgA" exists + And directory "{context.osc.temp}/test:factory/test-pkgA/.osc" exists + And file "{context.osc.temp}/test:factory/test-pkgA/test-pkgA.spec" exists + And file "{context.osc.temp}/test:factory/test-pkgA/test-pkgA.changes" exists + And directory "{context.osc.temp}/test:factory/test-pkgB" does not exist # Unlike other checkouts, file checkout doesn't create any subdirs # and puts files directly in the working directory. Scenario: Run `osc checkout` on a file Given I set working directory to "{context.osc.temp}" - When I execute osc with args "checkout openSUSE:Factory test-pkgA test-pkgA.spec" - Then directory "{context.osc.temp}/openSUSE:Factory" does not exist + When I execute osc with args "checkout test:factory test-pkgA test-pkgA.spec" + Then directory "{context.osc.temp}/test:factory" does not exist And file "{context.osc.temp}/test-pkgA.spec" exists And file "{context.osc.temp}/test-pkgA.changes" does not exist Scenario: Run `osc checkout` on a package, use a file size limit Given I set working directory to "{context.osc.temp}" - When I execute osc with args "checkout openSUSE:Factory test-pkgA --limit-size=200" - And file "{context.osc.temp}/openSUSE:Factory/test-pkgA/test-pkgA.spec" does not exist - And file "{context.osc.temp}/openSUSE:Factory/test-pkgA/test-pkgA.changes" exists + When I execute osc with args "checkout test:factory test-pkgA --limit-size=200" + And file "{context.osc.temp}/test:factory/test-pkgA/test-pkgA.spec" does not exist + And file "{context.osc.temp}/test:factory/test-pkgA/test-pkgA.changes" exists Scenario: Run `osc checkout` on a package in a specified revision Given I set working directory to "{context.osc.temp}" - When I execute osc with args "checkout openSUSE:Factory test-pkgA --revision=2" - Then file "{context.osc.temp}/openSUSE:Factory/test-pkgA/test-pkgA.spec" is identical to "{context.fixtures}/pac/test-pkgA-2.spec" - And file "{context.osc.temp}/openSUSE:Factory/test-pkgA/test-pkgA.changes" is identical to "{context.fixtures}/pac/test-pkgA-2.changes" + When I execute osc with args "checkout test:factory test-pkgA --revision=2" + Then file "{context.osc.temp}/test:factory/test-pkgA/test-pkgA.spec" is identical to "{context.fixtures}/pac/test-pkgA-2.spec" + And file "{context.osc.temp}/test:factory/test-pkgA/test-pkgA.changes" is identical to "{context.fixtures}/pac/test-pkgA-2.changes" Scenario: Run `osc checkout` on a package, place the files in a specified output directory Given I set working directory to "{context.osc.temp}" - When I execute osc with args "checkout openSUSE:Factory test-pkgA --output-dir=pkgA" - And directory "{context.osc.temp}/openSUSE:Factory/test-pkgA" does not exist + When I execute osc with args "checkout test:factory test-pkgA --output-dir=pkgA" + And directory "{context.osc.temp}/test:factory/test-pkgA" does not exist And directory "{context.osc.temp}/pkgA" exists And directory "{context.osc.temp}/pkgA/.osc" exists And file "{context.osc.temp}/pkgA/test-pkgA.spec" exists @@ -67,8 +67,8 @@ Scenario: Run `osc checkout` on a package, place the files in a specified output # One would expect the package to go to the working dir. Scenario: Run `osc checkout` on a package, place the files in the working directory Given I set working directory to "{context.osc.temp}" - When I execute osc with args "checkout openSUSE:Factory test-pkgA --current-dir" - And directory "{context.osc.temp}/openSUSE:Factory/test-pkgA" does not exist + When I execute osc with args "checkout test:factory test-pkgA --current-dir" + And directory "{context.osc.temp}/test:factory/test-pkgA" does not exist And directory "{context.osc.temp}/.osc" exists And directory "{context.osc.temp}/test-pkgA/.osc" exists And file "{context.osc.temp}/test-pkgA/test-pkgA.spec" exists diff --git a/behave/features/getbinaries-project-package-repo-arch-file.feature b/behave/features/getbinaries-project-package-repo-arch-file.feature index 14335158..5c5678df 100644 --- a/behave/features/getbinaries-project-package-repo-arch-file.feature +++ b/behave/features/getbinaries-project-package-repo-arch-file.feature @@ -7,7 +7,7 @@ Background: Scenario: Run `osc getbinaries ` - When I execute osc with args "getbinaries openSUSE:Factory multibuild-pkg standard x86_64 multibuild-pkg-1-1.x86_64.rpm" + When I execute osc with args "getbinaries test:factory multibuild-pkg standard x86_64 multibuild-pkg-1-1.x86_64.rpm" Then directory listing of "{context.osc.temp}/binaries/" is """ multibuild-pkg-1-1.x86_64.rpm @@ -15,13 +15,13 @@ Scenario: Run `osc getbinaries ` Scenario: Run `osc getbinaries --multibuild-package=` - When I execute osc with args "getbinaries openSUSE:Factory multibuild-pkg standard x86_64 multibuild-pkg-flavor1-1-1.x86_64.rpm --multibuild-package=flavor1" + When I execute osc with args "getbinaries test:factory multibuild-pkg standard x86_64 multibuild-pkg-flavor1-1-1.x86_64.rpm --multibuild-package=flavor1" # the option is allowed only in a package checkout Then the exit code is 2 Scenario: Run `osc getbinaries : ` where file is a package - When I execute osc with args "getbinaries openSUSE:Factory multibuild-pkg:flavor1 standard x86_64 multibuild-pkg-flavor1-1-1.x86_64.rpm" + When I execute osc with args "getbinaries test:factory multibuild-pkg:flavor1 standard x86_64 multibuild-pkg-flavor1-1-1.x86_64.rpm" Then directory listing of "{context.osc.temp}/binaries/" is """ multibuild-pkg-flavor1-1-1.x86_64.rpm @@ -29,14 +29,14 @@ Scenario: Run `osc getbinaries : Scenario: Run `osc getbinaries ` where file is a source package - When I execute osc with args "getbinaries openSUSE:Factory multibuild-pkg standard x86_64 multibuild-pkg-1-1.src.rpm" + When I execute osc with args "getbinaries test:factory multibuild-pkg standard x86_64 multibuild-pkg-1-1.src.rpm" Then directory listing of "{context.osc.temp}/binaries/" is """ """ Scenario: Run `osc getbinaries --source` where file is a source package - When I execute osc with args "getbinaries openSUSE:Factory multibuild-pkg standard x86_64 multibuild-pkg-1-1.src.rpm --source" + When I execute osc with args "getbinaries test:factory multibuild-pkg standard x86_64 multibuild-pkg-1-1.src.rpm --source" Then directory listing of "{context.osc.temp}/binaries/" is """ multibuild-pkg-1-1.src.rpm @@ -44,14 +44,14 @@ Scenario: Run `osc getbinaries --source Scenario: Run `osc getbinaries ` where file is a debuginfo package - When I execute osc with args "getbinaries openSUSE:Factory multibuild-pkg standard x86_64 multibuild-pkg-debuginfo-1-1.x86_64.rpm" + When I execute osc with args "getbinaries test:factory multibuild-pkg standard x86_64 multibuild-pkg-debuginfo-1-1.x86_64.rpm" Then directory listing of "{context.osc.temp}/binaries/" is """ """ Scenario: Run `osc getbinaries --debuginfo` where file is a debuginfo package - When I execute osc with args "getbinaries openSUSE:Factory multibuild-pkg standard x86_64 multibuild-pkg-debuginfo-1-1.x86_64.rpm --debuginfo" + When I execute osc with args "getbinaries test:factory multibuild-pkg standard x86_64 multibuild-pkg-debuginfo-1-1.x86_64.rpm --debuginfo" Then directory listing of "{context.osc.temp}/binaries/" is """ multibuild-pkg-debuginfo-1-1.x86_64.rpm @@ -59,7 +59,7 @@ Scenario: Run `osc getbinaries --debugi Scenario: Run `osc getbinaries ` where file is a log file - When I execute osc with args "getbinaries openSUSE:Factory multibuild-pkg standard x86_64 rpmlint.log" + When I execute osc with args "getbinaries test:factory multibuild-pkg standard x86_64 rpmlint.log" Then directory listing of "{context.osc.temp}/binaries/" is """ rpmlint.log diff --git a/behave/features/getbinaries-project-package-repo-arch.feature b/behave/features/getbinaries-project-package-repo-arch.feature index c8489489..38654337 100644 --- a/behave/features/getbinaries-project-package-repo-arch.feature +++ b/behave/features/getbinaries-project-package-repo-arch.feature @@ -7,7 +7,7 @@ Background: Scenario: Run `osc getbinaries ` - When I execute osc with args "getbinaries openSUSE:Factory multibuild-pkg standard x86_64" + When I execute osc with args "getbinaries test:factory multibuild-pkg standard x86_64" Then directory listing of "{context.osc.temp}/binaries/" is """ multibuild-pkg-1-1.x86_64.rpm @@ -18,13 +18,13 @@ Scenario: Run `osc getbinaries ` Scenario: Run `osc getbinaries --multibuild-package=` - When I execute osc with args "getbinaries openSUSE:Factory multibuild-pkg standard x86_64 --multibuild-package=flavor1" + When I execute osc with args "getbinaries test:factory multibuild-pkg standard x86_64 --multibuild-package=flavor1" # the option is allowed only in a package checkout Then the exit code is 2 Scenario: Run `osc getbinaries : ` - When I execute osc with args "getbinaries openSUSE:Factory multibuild-pkg:flavor1 standard x86_64" + When I execute osc with args "getbinaries test:factory multibuild-pkg:flavor1 standard x86_64" Then directory listing of "{context.osc.temp}/binaries/" is """ multibuild-pkg-flavor1-1-1.x86_64.rpm @@ -35,7 +35,7 @@ Scenario: Run `osc getbinaries : ` Scenario: Run `osc getbinaries : --source` - When I execute osc with args "getbinaries openSUSE:Factory multibuild-pkg:flavor1 standard x86_64 --source" + When I execute osc with args "getbinaries test:factory multibuild-pkg:flavor1 standard x86_64 --source" Then directory listing of "{context.osc.temp}/binaries/" is """ multibuild-pkg-1-1.src.rpm @@ -47,7 +47,7 @@ Scenario: Run `osc getbinaries : --sour Scenario: Run `osc getbinaries : --debuginfo` - When I execute osc with args "getbinaries openSUSE:Factory multibuild-pkg:flavor1 standard x86_64 --debuginfo" + When I execute osc with args "getbinaries test:factory multibuild-pkg:flavor1 standard x86_64 --debuginfo" Then directory listing of "{context.osc.temp}/binaries/" is """ multibuild-pkg-flavor1-1-1.x86_64.rpm diff --git a/behave/features/getbinaries-project-repo-arch.feature b/behave/features/getbinaries-project-repo-arch.feature index 1d267978..689c323c 100644 --- a/behave/features/getbinaries-project-repo-arch.feature +++ b/behave/features/getbinaries-project-repo-arch.feature @@ -7,7 +7,7 @@ Background: Scenario: Run `osc getbinaries ` - When I execute osc with args "getbinaries openSUSE:Factory standard x86_64" + When I execute osc with args "getbinaries test:factory standard x86_64" Then directory tree in "{context.osc.temp}/binaries/" is """ multibuild-pkg-1-1.x86_64.rpm @@ -34,13 +34,13 @@ Scenario: Run `osc getbinaries ` Scenario: Run `osc getbinaries --multibuild-package=` - When I execute osc with args "getbinaries openSUSE:Factory standard x86_64 --multibuild-package=flavor1" + When I execute osc with args "getbinaries test:factory standard x86_64 --multibuild-package=flavor1" # the option is allowed only in a package checkout Then the exit code is 2 Scenario: Run `osc getbinaries --debuginfo` - When I execute osc with args "getbinaries openSUSE:Factory standard x86_64 --debuginfo" + When I execute osc with args "getbinaries test:factory standard x86_64 --debuginfo" Then directory tree in "{context.osc.temp}/binaries/" is """ multibuild-pkg-1-1.x86_64.rpm diff --git a/behave/features/getbinaries-repo-arch-pkgcheckout.feature b/behave/features/getbinaries-repo-arch-pkgcheckout.feature index 279c355e..cf844e2e 100644 --- a/behave/features/getbinaries-repo-arch-pkgcheckout.feature +++ b/behave/features/getbinaries-repo-arch-pkgcheckout.feature @@ -4,13 +4,13 @@ Feature: `osc getbinaries ` command from a package checkout # common steps for all scenarios Background: Given I set working directory to "{context.osc.temp}" - And I execute osc with args "checkout openSUSE:Factory multibuild-pkg" - And I set working directory to "{context.osc.temp}/openSUSE:Factory/multibuild-pkg" + And I execute osc with args "checkout test:factory multibuild-pkg" + And I set working directory to "{context.osc.temp}/test:factory/multibuild-pkg" Scenario: Run `osc getbinaries ` from a package checkout When I execute osc with args "getbinaries standard x86_64" - Then directory listing of "{context.osc.temp}/openSUSE:Factory/multibuild-pkg/binaries/" is + Then directory listing of "{context.osc.temp}/test:factory/multibuild-pkg/binaries/" is """ multibuild-pkg-1-1.x86_64.rpm _buildenv @@ -21,7 +21,7 @@ Scenario: Run `osc getbinaries ` from a package checkout Scenario: Run `osc getbinaries --multibuild-package=` from a package checkout When I execute osc with args "getbinaries standard x86_64 --multibuild-package=flavor1" - Then directory listing of "{context.osc.temp}/openSUSE:Factory/multibuild-pkg/binaries/" is + Then directory listing of "{context.osc.temp}/test:factory/multibuild-pkg/binaries/" is """ multibuild-pkg-flavor1-1-1.x86_64.rpm _buildenv @@ -32,7 +32,7 @@ Scenario: Run `osc getbinaries --multibuild-package=` from Scenario: Run `osc getbinaries --debuginfo` from a package checkout When I execute osc with args "getbinaries standard x86_64 --debuginfo" - Then directory listing of "{context.osc.temp}/openSUSE:Factory/multibuild-pkg/binaries/" is + Then directory listing of "{context.osc.temp}/test:factory/multibuild-pkg/binaries/" is """ multibuild-pkg-1-1.x86_64.rpm multibuild-pkg-debuginfo-1-1.x86_64.rpm diff --git a/behave/features/getbinaries-repo-arch-prjcheckout.feature b/behave/features/getbinaries-repo-arch-prjcheckout.feature index d04044fe..28147275 100644 --- a/behave/features/getbinaries-repo-arch-prjcheckout.feature +++ b/behave/features/getbinaries-repo-arch-prjcheckout.feature @@ -4,13 +4,13 @@ Feature: `osc getbinaries ` command from a project checkout # common steps for all scenarios Background: Given I set working directory to "{context.osc.temp}" - And I execute osc with args "checkout openSUSE:Factory" - And I set working directory to "{context.osc.temp}/openSUSE:Factory" + And I execute osc with args "checkout test:factory" + And I set working directory to "{context.osc.temp}/test:factory" Scenario: Run `osc getbinaries ` from a project checkout When I execute osc with args "getbinaries standard x86_64" - Then directory tree in "{context.osc.temp}/openSUSE:Factory/binaries/" is + Then directory tree in "{context.osc.temp}/test:factory/binaries/" is """ multibuild-pkg-1-1.x86_64.rpm multibuild-pkg-flavor1-1-1.x86_64.rpm @@ -43,7 +43,7 @@ Scenario: Run `osc getbinaries --multibuild-package=` from Scenario: Run `osc getbinaries --sources` from a project checkout When I execute osc with args "getbinaries standard x86_64 --sources" - Then directory tree in "{context.osc.temp}/openSUSE:Factory/binaries/" is + Then directory tree in "{context.osc.temp}/test:factory/binaries/" is """ multibuild-pkg-1-1.src.rpm multibuild-pkg-1-1.x86_64.rpm @@ -75,7 +75,7 @@ Scenario: Run `osc getbinaries --sources` from a project checkout Scenario: Run `osc getbinaries --debuginfo` from a project checkout When I execute osc with args "getbinaries standard x86_64 --debuginfo" - Then directory tree in "{context.osc.temp}/openSUSE:Factory/binaries/" is + Then directory tree in "{context.osc.temp}/test:factory/binaries/" is """ multibuild-pkg-1-1.x86_64.rpm multibuild-pkg-debuginfo-1-1.x86_64.rpm diff --git a/behave/features/getbinaries-repo-pkgcheckout.feature b/behave/features/getbinaries-repo-pkgcheckout.feature index 1d129eba..05a8f8b1 100644 --- a/behave/features/getbinaries-repo-pkgcheckout.feature +++ b/behave/features/getbinaries-repo-pkgcheckout.feature @@ -4,14 +4,14 @@ Feature: `osc getbinaries ` command from a project checkout # common steps for all scenarios Background: Given I set working directory to "{context.osc.temp}" - And I execute osc with args "checkout openSUSE:Factory multibuild-pkg" - And I set working directory to "{context.osc.temp}/openSUSE:Factory/multibuild-pkg" + And I execute osc with args "checkout test:factory multibuild-pkg" + And I set working directory to "{context.osc.temp}/test:factory/multibuild-pkg" Scenario: Run `osc getbinaries ` from a package checkout - Given I set working directory to "{context.osc.temp}/openSUSE:Factory/multibuild-pkg" + Given I set working directory to "{context.osc.temp}/test:factory/multibuild-pkg" When I execute osc with args "getbinaries standard" - Then directory listing of "{context.osc.temp}/openSUSE:Factory/multibuild-pkg/binaries/" is + Then directory listing of "{context.osc.temp}/test:factory/multibuild-pkg/binaries/" is """ multibuild-pkg-1-1.i586.rpm multibuild-pkg-1-1.x86_64.rpm @@ -23,7 +23,7 @@ Scenario: Run `osc getbinaries ` from a package checkout Scenario: Run `osc getbinaries --multibuild-package=` from a package checkout When I execute osc with args "getbinaries standard --multibuild-package=flavor1" - Then directory listing of "{context.osc.temp}/openSUSE:Factory/multibuild-pkg/binaries/" is + Then directory listing of "{context.osc.temp}/test:factory/multibuild-pkg/binaries/" is """ multibuild-pkg-flavor1-1-1.i586.rpm multibuild-pkg-flavor1-1-1.x86_64.rpm @@ -35,7 +35,7 @@ Scenario: Run `osc getbinaries --multibuild-package=` from a pack Scenario: Run `osc getbinaries --debuginfo` from a package checkout When I execute osc with args "getbinaries standard --debuginfo" - Then directory listing of "{context.osc.temp}/openSUSE:Factory/multibuild-pkg/binaries/" is + Then directory listing of "{context.osc.temp}/test:factory/multibuild-pkg/binaries/" is """ multibuild-pkg-1-1.i586.rpm multibuild-pkg-1-1.x86_64.rpm diff --git a/behave/features/getbinaries-repo-prjcheckout.feature b/behave/features/getbinaries-repo-prjcheckout.feature index bcdd8ee5..c7bb918a 100644 --- a/behave/features/getbinaries-repo-prjcheckout.feature +++ b/behave/features/getbinaries-repo-prjcheckout.feature @@ -4,13 +4,13 @@ Feature: `osc getbinaries ` command from a project checkout # common steps for all scenarios Background: Given I set working directory to "{context.osc.temp}" - And I execute osc with args "checkout openSUSE:Factory" - And I set working directory to "{context.osc.temp}/openSUSE:Factory" + And I execute osc with args "checkout test:factory" + And I set working directory to "{context.osc.temp}/test:factory" Scenario: Run `osc getbinaries ` from a project checkout When I execute osc with args "getbinaries standard" - Then directory tree in "{context.osc.temp}/openSUSE:Factory/binaries/" is + Then directory tree in "{context.osc.temp}/test:factory/binaries/" is """ multibuild-pkg-1-1.i586.rpm multibuild-pkg-1-1.x86_64.rpm @@ -46,7 +46,7 @@ Scenario: Run `osc getbinaries --multibuild-package=` from a proj Scenario: Run `osc getbinaries --sources` from a project checkout When I execute osc with args "getbinaries standard --sources" - Then directory tree in "{context.osc.temp}/openSUSE:Factory/binaries/" is + Then directory tree in "{context.osc.temp}/test:factory/binaries/" is """ multibuild-pkg-1-1.i586.rpm multibuild-pkg-1-1.src.rpm @@ -81,7 +81,7 @@ Scenario: Run `osc getbinaries --sources` from a project checkout Scenario: Run `osc getbinaries --debuginfo` from a project checkout When I execute osc with args "getbinaries standard --debuginfo" - Then directory tree in "{context.osc.temp}/openSUSE:Factory/binaries/" is + Then directory tree in "{context.osc.temp}/test:factory/binaries/" is """ multibuild-pkg-1-1.i586.rpm multibuild-pkg-1-1.x86_64.rpm diff --git a/behave/features/list.feature b/behave/features/list.feature index 5c247240..2fd0ca0e 100644 --- a/behave/features/list.feature +++ b/behave/features/list.feature @@ -5,16 +5,16 @@ Scenario: Run `osc list` with no arguments to display all projects When I execute osc with args "list" Then stdout is """ - devel home:Admin openSUSE.org - openSUSE:Factory - release + test:devel + test:factory + test:release """ Scenario: Run `osc list` on a project to display project packages - When I execute osc with args "list openSUSE:Factory" + When I execute osc with args "list test:factory" Then stdout is """ multibuild-pkg @@ -26,7 +26,7 @@ Scenario: Run `osc list` on a project to display project packages Scenario: Run `osc list` on a project package to display package files - When I execute osc with args "list openSUSE:Factory test-pkgA" + When I execute osc with args "list test:factory test-pkgA" Then stdout is """ test-pkgA.changes diff --git a/behave/fixtures/prj/home_Admin.xml b/behave/fixtures/prj/home_Admin.xml index dc265447..ffd161bb 100644 --- a/behave/fixtures/prj/home_Admin.xml +++ b/behave/fixtures/prj/home_Admin.xml @@ -17,8 +17,7 @@ - - + x86_64 i586 diff --git a/behave/fixtures/prj/devel.xml b/behave/fixtures/prj/test_devel.xml similarity index 84% rename from behave/fixtures/prj/devel.xml rename to behave/fixtures/prj/test_devel.xml index 9b0a93f1..96370d03 100644 --- a/behave/fixtures/prj/devel.xml +++ b/behave/fixtures/prj/test_devel.xml @@ -1,6 +1,6 @@ - + - Devel project + Packages in development diff --git a/behave/fixtures/prj/openSUSE_Factory.xml b/behave/fixtures/prj/test_factory.xml similarity index 82% rename from behave/fixtures/prj/openSUSE_Factory.xml rename to behave/fixtures/prj/test_factory.xml index 2a7daaa9..46bba869 100644 --- a/behave/fixtures/prj/openSUSE_Factory.xml +++ b/behave/fixtures/prj/test_factory.xml @@ -1,6 +1,6 @@ - + - The next openSUSE distribution + The next version of distribution diff --git a/behave/fixtures/prj/release.xml b/behave/fixtures/prj/test_release.xml similarity index 56% rename from behave/fixtures/prj/release.xml rename to behave/fixtures/prj/test_release.xml index 62f06d4a..ed3cfeec 100644 --- a/behave/fixtures/prj/release.xml +++ b/behave/fixtures/prj/test_release.xml @@ -1,6 +1,6 @@ - + - Release project + Released packages @@ -17,10 +17,12 @@ - - + + x86_64 + i586 + + + x86_64 i586 From 3040b1ddac4d359522043c77d8341140c0118316 Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Thu, 8 Dec 2022 10:01:07 +0100 Subject: [PATCH 2/3] GHA: No longer test on push to master We're monitoring only the pull-requests, so don't waste resources on this --- .github/workflows/build-install.yaml | 8 -------- .github/workflows/linters.yaml | 5 ----- .github/workflows/tests.yaml | 6 ------ 3 files changed, 19 deletions(-) diff --git a/.github/workflows/build-install.yaml b/.github/workflows/build-install.yaml index 22fb04f0..411b0b84 100644 --- a/.github/workflows/build-install.yaml +++ b/.github/workflows/build-install.yaml @@ -1,14 +1,6 @@ name: 'build and installation tests' on: - push: - branches: ['master'] - paths-ignore: - - 'AUTHORS' - - 'COPYING' - - 'NEWS' - - 'README.md' - - 'doc/**' pull_request: branches: ['master'] paths-ignore: diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml index 324f3692..84209f55 100644 --- a/.github/workflows/linters.yaml +++ b/.github/workflows/linters.yaml @@ -1,11 +1,6 @@ name: 'linters' on: - push: - branches: ['master'] - paths: - - '.github/**' - - '**.py' pull_request: branches: ['master'] paths: diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 74ff8139..9feeebe9 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -1,12 +1,6 @@ name: 'tests' on: - push: - branches: ['master'] - paths: - - '.github/**' - - '**.py' - - 'tests/**' pull_request: branches: ['master'] paths: From 7e2f4a1fa0f4acea2c5b9ddc1b8326dfe5a85374 Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Thu, 8 Dec 2022 10:08:09 +0100 Subject: [PATCH 3/3] GHA: Trigger tests also when the 'behave' directory changes --- .github/workflows/tests.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 9feeebe9..b96ebd4a 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -6,6 +6,7 @@ on: paths: - '.github/**' - '**.py' + - 'behave/**' - 'tests/**' jobs: