#544 [beaker-tests-sanity] move duplicated settings to config file (see #512)
Merged 5 years ago by praiskup. Opened 5 years ago by frostyx.
copr/ frostyx/copr beaker-tests-config  into  master

@@ -29,23 +29,10 @@ 

  . /usr/bin/rhts-environment.sh || exit 1

  . /usr/share/beakerlib/beakerlib.sh || exit 1

  

- PACKAGE="copr"

- OWNER="@copr"

- NAME_VAR="TEST$(date +%s)" # names should be unique

- NAME_PREFIX="$OWNER/$NAME_VAR"

+ # Load config settings

+ HERE=$(dirname "$(realpath "$0")")

+ source "$HERE/config"

  

- if [[ ! $FRONTEND_URL ]]; then

-     FRONTEND_URL="http://copr-fe-dev.cloud.fedoraproject.org"

- fi

- if [[ ! $BACKEND_URL ]]; then

-     BACKEND_URL="http://copr-be-dev.cloud.fedoraproject.org"

- fi

- 

- echo "FRONTEND_URL = $FRONTEND_URL"

- echo "BACKEND_URL = $BACKEND_URL"

- 

- SCRIPT=`realpath $0`

- HERE=`dirname $SCRIPT`

  

  rlJournalStart

      rlPhaseStartSetup

@@ -29,23 +29,10 @@ 

  . /usr/bin/rhts-environment.sh || exit 1

  . /usr/share/beakerlib/beakerlib.sh || exit 1

  

- PACKAGE="copr"

- OWNER="@copr"

- NAME_VAR="TEST$(date +%s)" # names should be unique

- NAME_PREFIX="$OWNER/$NAME_VAR"

+ # Load config settings

+ HERE=$(dirname "$(realpath "$0")")

+ source "$HERE/config"

  

- if [[ ! $FRONTEND_URL ]]; then

-     FRONTEND_URL="https://copr-fe-dev.cloud.fedoraproject.org"

- fi

- if [[ ! $BACKEND_URL ]]; then

-     BACKEND_URL="https://copr-be-dev.cloud.fedoraproject.org"

- fi

- 

- echo "FRONTEND_URL = $FRONTEND_URL"

- echo "BACKEND_URL = $BACKEND_URL"

- 

- SCRIPT=`realpath $0`

- HERE=`dirname $SCRIPT`

  

  rlJournalStart

      rlPhaseStartSetup

@@ -0,0 +1,40 @@ 

+ #!/bin/sh

+ 

+ # Copr instance

+ # In some cases it might be useful to use different instance than

+ # copr-*-dev (e.g. having post-release test for prodution or running

+ # tests against a local dev stack). For this reason, the following

+ # settings are override-able from command line.

+ if [[ ! $FRONTEND_URL ]]; then

+     FRONTEND_URL="https://copr-fe-dev.cloud.fedoraproject.org"

+ fi

+ if [[ ! $BACKEND_URL ]]; then

+     BACKEND_URL="https://copr-be-dev.cloud.fedoraproject.org"

+ fi

+ 

+ 

+ # Owner and project

+ PACKAGE="copr"

+ OWNER="@copr"

+ NAME_VAR="TEST$(date +%s)" # names should be unique

+ NAME_PREFIX="$OWNER/$NAME_VAR"

+ USER=`copr-cli whoami`

+ 

+ 

+ # Some tests might want to install built packages

+ # Therefore, these packages need to be built for the same fedora version

+ # as this script is going to be run from

+ FEDORA_VERSION=28

+ CHROOT="fedora-$FEDORA_VERSION-x86_64"

+ 

+ 

+ # Useful paths

+ SCRIPTPATH="$( builtin cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

+ HERE=$SCRIPTPATH

+ FILES=$HERE/files

+ 

+ 

+ # Debug

+ echo "USER = $USER"

+ echo "FRONTEND_URL = $FRONTEND_URL"

+ echo "BACKEND_URL = $BACKEND_URL"

@@ -29,23 +29,10 @@ 

  . /usr/bin/rhts-environment.sh || exit 1

  . /usr/share/beakerlib/beakerlib.sh || exit 1

  

- PACKAGE="copr"

- OWNER="@copr"

- NAME_VAR="TEST$(date +%s)" # names should be unique

- NAME_PREFIX="$OWNER/$NAME_VAR"

+ # Load config settings

+ HERE=$(dirname "$(realpath "$0")")

+ source "$HERE/config"

  

- if [[ ! $FRONTEND_URL ]]; then

-     FRONTEND_URL="https://copr-fe-dev.cloud.fedoraproject.org"

- fi

- if [[ ! $BACKEND_URL ]]; then

-     BACKEND_URL="https://copr-be-dev.cloud.fedoraproject.org"

- fi

- 

- echo "FRONTEND_URL = $FRONTEND_URL"

- echo "BACKEND_URL = $BACKEND_URL"

- 

- SCRIPT=`realpath $0`

- HERE=`dirname $SCRIPT`

  

  rlJournalStart

      rlPhaseStartSetup

@@ -3,20 +3,11 @@ 

  . /usr/bin/rhts-environment.sh || exit 1

  . /usr/share/beakerlib/beakerlib.sh || exit 1

  

- export RESULTDIR=`mktemp -d`

- 

- export TESTPATH="$( builtin cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

- 

- export IN=$TESTPATH/action-tasks.json

- export OUT=$TESTPATH/action-results.out.json

- 

- if [[ ! $FRONTEND_URL ]]; then

-     FRONTEND_URL="https://copr-fe-dev.cloud.fedoraproject.org"

- fi

- 

- 

- NAME_VAR="TEST$(date +%s)"

+ # Load config settings

+ HERE=$(dirname "$(realpath "$0")")

+ source "$HERE/config"

  

+ export RESULTDIR=`mktemp -d`

  

  parse_build_id()

  {
@@ -62,7 +53,7 @@ 

  

  quick_package_script ()

  {

-     cp "$TESTPATH/files/quick-package.sh" script

+     cp "$HERE/files/quick-package.sh" script

      echo "$1" >> script

  }

  

@@ -29,26 +29,10 @@ 

  . /usr/bin/rhts-environment.sh || exit 1

  . /usr/share/beakerlib/beakerlib.sh || exit 1

  

- PACKAGE="copr"

- OWNER="@copr"

- NAME_VAR="TEST$(date +%s)" # names should be unique

- NAME_PREFIX="$OWNER/$NAME_VAR"

- if [[ ! $FRONTEND_URL ]]; then

-     FRONTEND_URL="https://copr-fe-dev.cloud.fedoraproject.org"

- fi

- if [[ ! $BACKEND_URL ]]; then

-     BACKEND_URL="https://copr-be-dev.cloud.fedoraproject.org"

- fi

+ # Load config settings

+ HERE=$(dirname "$(realpath "$0")")

+ source "$HERE/config"

  

- echo "FRONTEND_URL = $FRONTEND_URL"

- echo "BACKEND_URL = $BACKEND_URL"

- 

- # Some tests might want to install built packages

- # Therefore, these packages need to be built for the same fedora version

- # as this script is going to be run from

- CHROOT="fedora-28-x86_64"

- 

- SCRIPTPATH="$( builtin cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

  

  rlJournalStart

      rlPhaseStartSetup

@@ -29,20 +29,10 @@ 

  . /usr/bin/rhts-environment.sh || exit 1

  . /usr/share/beakerlib/beakerlib.sh || exit 1

  

- if [[ ! $FRONTEND_URL ]]; then

-     FRONTEND_URL="https://copr-fe-dev.cloud.fedoraproject.org"

- fi

- if [[ ! $BACKEND_URL ]]; then

-     BACKEND_URL="https://copr-be-dev.cloud.fedoraproject.org"

- fi

- USER=`copr-cli whoami`

- 

- echo "FRONTEND_URL = $FRONTEND_URL"

- echo "BACKEND_URL = $BACKEND_URL"

- echo "USER = $USER"

- 

- SCRIPT=`realpath $0`

- HERE=`dirname $SCRIPT`

+ # Load config settings

+ HERE=$(dirname "$(realpath "$0")")

+ source "$HERE/config"

+ 

  

  function wait_for_finished_module()

  {

@@ -29,27 +29,10 @@ 

  . /usr/bin/rhts-environment.sh || exit 1

  . /usr/share/beakerlib/beakerlib.sh || exit 1

  

- PACKAGE="copr"

- OWNER="@copr"

- NAME_VAR="TEST$(date +%s)" # names should be unique

- NAME_PREFIX="$OWNER/$NAME_VAR"

- if [[ ! $FRONTEND_URL ]]; then

-     FRONTEND_URL="https://copr-fe-dev.cloud.fedoraproject.org"

- fi

- if [[ ! $BACKEND_URL ]]; then

-     BACKEND_URL="https://copr-be-dev.cloud.fedoraproject.org"

- fi

- 

- echo "FRONTEND_URL = $FRONTEND_URL"

- echo "BACKEND_URL = $BACKEND_URL"

- 

- # Some tests might want to install built packages

- # Therefore, these packages need to be built for the same fedora version

- # as this script is going to be run from

- FEDORA_VERSION=28

- CHROOT="fedora-$FEDORA_VERSION-x86_64"

- 

- SCRIPTPATH="$( builtin cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

+ # Load config settings

+ HERE=$(dirname "$(realpath "$0")")

+ source "$HERE/config"

+ 

  

  rlJournalStart

      rlPhaseStartSetup

@@ -29,23 +29,10 @@ 

  . /usr/bin/rhts-environment.sh || exit 1

  . /usr/share/beakerlib/beakerlib.sh || exit 1

  

- PACKAGE="copr"

- OWNER="@copr"

- NAME_VAR="TEST$(date +%s)" # names should be unique

- NAME_PREFIX="$OWNER/$NAME_VAR"

+ # Load config settings

+ HERE=$(dirname "$(realpath "$0")")

+ source "$HERE/config"

  

- if [[ ! $FRONTEND_URL ]]; then

-     FRONTEND_URL="https://copr-fe-dev.cloud.fedoraproject.org"

- fi

- if [[ ! $BACKEND_URL ]]; then

-     BACKEND_URL="https://copr-be-dev.cloud.fedoraproject.org"

- fi

- 

- echo "FRONTEND_URL = $FRONTEND_URL"

- echo "BACKEND_URL = $BACKEND_URL"

- 

- SCRIPT=`realpath $0`

- HERE=`dirname $SCRIPT`

  

  rlJournalStart

      rlPhaseStartSetup

@@ -29,23 +29,10 @@ 

  . /usr/bin/rhts-environment.sh || exit 1

  . /usr/share/beakerlib/beakerlib.sh || exit 1

  

- PACKAGE="copr"

- OWNER="@copr"

- NAME_VAR="TEST$(date +%s)" # names should be unique

- NAME_PREFIX="$OWNER/$NAME_VAR"

+ # Load config settings

+ HERE=$(dirname "$(realpath "$0")")

+ source "$HERE/config"

  

- if [[ ! $FRONTEND_URL ]]; then

-     FRONTEND_URL="https://copr-fe-dev.cloud.fedoraproject.org"

- fi

- if [[ ! $BACKEND_URL ]]; then

-     BACKEND_URL="https://copr-be-dev.cloud.fedoraproject.org"

- fi

- 

- echo "FRONTEND_URL = $FRONTEND_URL"

- echo "BACKEND_URL = $BACKEND_URL"

- 

- SCRIPT=`realpath $0`

- HERE=`dirname $SCRIPT`

  

  rlJournalStart

      rlPhaseStartSetup