Skip to content

Commit bb86327

Browse files
committed
Change to allow pulp_file functional tests to work again.
1 parent 15eb126 commit bb86327

8 files changed

+31
-35
lines changed

base/container_scripts/install_functional_requirements.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ set -e
44

55
declare PROJECT="$1"
66

7-
if [ $PROJECT == "pulp_file" ]
7+
if [[ ${PROJECT} == "pulp_file" || ${PROJECT} == "pulp_certguard" ]]
88
then
99
declare PROJECT="pulpcore"
1010
fi
1111

12-
if [ ! -d "/src/$PROJECT/" ]
12+
if [ ! -d "/src/${PROJECT}/" ]
1313
then
14-
echo "Please clone $PROJECT into ../$PROJECT/"
14+
echo "Please clone ${PROJECT} into ../${PROJECT}/"
1515
exit 1
1616
fi
1717

18-
cd "/src/$PROJECT/"
18+
cd "/src/${PROJECT}/"
1919

2020
if [[ -f functest_requirements.txt ]]; then
2121
pip3 install -r functest_requirements.txt

base/container_scripts/install_lint_requirements.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ set -e
44

55
declare PROJECT="$1"
66

7-
if [ $PROJECT == "pulp_file" ]
7+
if [[ ${PROJECT} == "pulp_file" || ${PROJECT} == "pulp_certguard" ]]
88
then
99
declare PROJECT="pulpcore"
1010
fi
1111

12-
if [ ! -d "/src/$PROJECT/" ]
12+
if [ ! -d "/src/${PROJECT}/" ]
1313
then
14-
echo "Please clone $PROJECT into ../$PROJECT/"
14+
echo "Please clone ${PROJECT} into ../${PROJECT}/"
1515
exit 1
1616
fi
1717

18-
cd "/src/$PROJECT/"
18+
cd "/src/${PROJECT}/"
1919

2020
if [[ -f lint_requirements.txt ]]; then
2121
pip install -r lint_requirements.txt

base/container_scripts/install_performance_requirements.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ set -e
44

55
declare PROJECT="$1"
66

7-
if [ $PROJECT == "pulp_file" ]
7+
if [[ ${PROJECT} == "pulp_file" || ${PROJECT} == "pulp_certguard" ]]
88
then
99
declare PROJECT="pulpcore"
1010
fi
1111

12-
if [ ! -d "/src/$PROJECT/" ]
12+
if [ ! -d "/src/${PROJECT}/" ]
1313
then
14-
echo "Please clone $PROJECT into ../$PROJECT/"
14+
echo "Please clone ${PROJECT} into ../${PROJECT}/"
1515
exit 1
1616
fi
1717

18-
cd "/src/$PROJECT/"
18+
cd "/src/${PROJECT}/"
1919

2020
if [[ -f perftest_requirements.txt ]]; then
2121
pip install -r perftest_requirements.txt

base/container_scripts/install_unit_requirements.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ set -e
44

55
declare PROJECT=$1
66

7-
if [ $PROJECT == "pulp_file" ]
7+
if [[ ${PROJECT} == "pulp_file" || ${PROJECT} == "pulp_certguard" ]]
88
then
99
declare PROJECT="pulpcore"
1010
fi
1111

12-
if [ ! -d "/src/$PROJECT/" ]
12+
if [ ! -d "/src/${PROJECT}/" ]
1313
then
14-
echo "Please clone $PROJECT into ../$PROJECT/"
14+
echo "Please clone ${PROJECT} into ../${PROJECT}/"
1515
exit 1
1616
fi
1717

18-
cd "/src/$PROJECT/"
18+
cd "/src/${PROJECT}/"
1919

2020
if [[ -f unittest_requirements.txt ]]; then
2121
pip install -r unittest_requirements.txt

base/container_scripts/run_functional_tests.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
#!/bin/bash
22

33
declare PACKAGE="$1"
4+
declare PROJECT="${PACKAGE//-/_}"
45

56
set -e
67

7-
if [ $PACKAGE == "pulp_file" ]
8+
if [[ ${PACKAGE} == "pulp_file" || ${PACKAGE} == "pulp_certguard" ]]
89
then
910
declare PACKAGE="pulpcore"
1011
fi
1112

12-
declare PROJECT="${PACKAGE//-/_}"
13+
cd "/src/${PACKAGE}/"
1314

1415
function check_pytest () {
1516
sudo -u pulp -E type pytest || {
@@ -41,9 +42,7 @@ EOF
4142
}
4243
}
4344

44-
cd "/src/$PACKAGE/"
45-
4645
check_pytest
4746
check_client
4847

49-
sudo -u pulp -E pytest -r sx --rootdir=/var/lib/pulp --color=yes --pyargs "$PROJECT.tests.functional" "${@:2}"
48+
sudo -u pulp -E pytest -r sx --rootdir=/var/lib/pulp --color=yes --pyargs "${PROJECT}.tests.functional" "${@:2}"

base/container_scripts/run_lint_tests.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22

33
declare PACKAGE="$1"
44

5-
if [ $PACKAGE == "pulp_file" ]
5+
if [[ $PACKAGE == "pulp_file" || ${PACKAGE} == "pulp_certguard" ]]
66
then
77
declare PACKAGE="pulpcore"
88
fi
99

10-
declare PROJECT="${PACKAGE//-/_}"
11-
1210
set -e
1311

1412
export XDG_CONFIG_HOME=/opt/scripts/
@@ -19,7 +17,7 @@ black --check --diff .
1917

2018
if [[ -f flake8.cfg ]];
2119
then
22-
flake8 --config flake8.cfg "$PROJECT"
20+
flake8 --config flake8.cfg "${PACKAGE}"
2321
else
2422
flake8
2523
fi

base/container_scripts/run_performance_tests.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
declare PACKAGE="$1"
44

5-
if [ $PACKAGE == "pulp_file" ]
5+
declare PROJECT="${PACKAGE//-/_}"
6+
7+
if [[ ${PACKAGE} == "pulp_file" || ${PACKAGE} == "pulp_certguard" ]]
68
then
79
declare PACKAGE="pulpcore"
810
fi
911

10-
declare PROJECT="${PACKAGE//-/_}"
11-
1212
set -e
1313

1414
function check_pytest () {
@@ -41,9 +41,9 @@ EOF
4141
}
4242
}
4343

44-
cd "/src/$PACKAGE/"
44+
cd "/src/${PACKAGE}/"
4545

4646
check_pytest
4747
check_client
4848

49-
sudo -u pulp -E pytest -r sx --rootdir=/var/lib/pulp --color=yes --pyargs "$PROJECT.tests.performance" "${@:2}"
49+
sudo -u pulp -E pytest -r sx --rootdir=/var/lib/pulp --color=yes --pyargs "${PROJECT}.tests.performance" "${@:2}"
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
#!/bin/bash
22

33
declare PACKAGE="$1"
4+
declare PROJECT="${PACKAGE//-/_}"
45

5-
if [ $PACKAGE == "pulp_file" ]
6+
if [[ ${PACKAGE} == "pulp_file" || ${PACKAGE} == "pulp_certguard" ]]
67
then
78
declare PACKAGE="pulpcore"
89
fi
910

10-
declare PROJECT="${PACKAGE//-/_}"
11-
1211
set -e
1312

14-
cd "/src/$PACKAGE/"
13+
cd "/src/${PACKAGE}/"
1514

16-
sudo -u pulp -E PULP_DATABASES__default__USER=postgres pytest -r sx --color=yes --pyargs "$PROJECT.tests.unit" "${@:2}"
15+
sudo -u pulp -E PULP_DATABASES__default__USER=postgres pytest -r sx --color=yes --pyargs "${PROJECT}.tests.unit" "${@:2}"

0 commit comments

Comments
 (0)