Skip to content

Commit cd1382f

Browse files
committed
extra work due to py2 py3 differences
1 parent 721f745 commit cd1382f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Images/test_plugin.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ echo "plugin to be tested is: '$PLUGIN'"
55
# install dependencies
66
apt-get update
77
apt-get -y --fix-missing install git
8-
pip install pytest
8+
if [ "qp-target-gene" == "$PLUGIN" ]; then
9+
REQUESTS_CA_BUNDLE="" pip2 install "pytest<5";
10+
else
11+
REQUESTS_CA_BUNDLE="" pip install pytest;
12+
fi;
913

1014
# clone plugin repository
1115
git clone https://github.com/qiita-spots/${PLUGIN}
@@ -15,13 +19,15 @@ git clone https://github.com/qiita-spots/${PLUGIN}
1519
# go through nginx!
1620

1721
# fix qiita base url in client
18-
for f in `find /usr/local/lib/python*/site-packages/qiita_client/ -name "testing.py"`; do
22+
for f in `find /usr/local/lib/python*/site-packages/qiita_client/ /usr/local/lib/python*/dist-packages/qiita_client/ -name "testing.py"`; do
1923
sed -i 's|URL = "https://localhost:8383"|URL = "https://tinqiita-qiita-1:21174"|' $f;
2024
done
2125

2226
# fix qiita base url in qtp-sequencing plugin tests
2327
for f in `find /${PLUGIN}/*/tests/ -name 'test_*.py'`; do
2428
sed -i 's|https://localhost:21174|https://tinqiita-qiita-1:21174|' $f;
29+
# below seen in qp-target-gene
30+
sed -i 's|plugin("https://localhost:21174", .register., .ignored.)|plugin("https://tinqiita-qiita-1:21174", "register", "ignored")|' $f;
2531
done
2632

2733
# fix qiita base url in qtp-diversity plugin tests. Use . instead of " or ' to be more general

0 commit comments

Comments
 (0)