Skip to content

Commit

Permalink
Add & update deps, adjust integration test to handle python 3.7 to 3.…
Browse files Browse the repository at this point in the history
…6 downgrade

Signed-off-by: bartekus <[email protected]>
  • Loading branch information
bartekus committed Jun 29, 2022
1 parent b1079dc commit e7419a4
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 18 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile.tails-server
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM bcgovimages/von-image:next-1
FROM bcgovimages/von-image:py36-1.16-1

ADD requirements.txt .
ADD requirements.dev.txt .
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM bcgovimages/von-image:next-1
FROM bcgovimages/von-image:py36-1.16-1

ADD requirements.txt .
ADD requirements.dev.txt .
Expand Down
6 changes: 5 additions & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
version: "3"
version: "3.8"

services:
ngrok-tails-server:
image: wernight/ngrok
Expand All @@ -7,6 +8,7 @@ services:
ports:
- 4044:4040
command: ngrok http tails-server:6543 --log stdout

tails-server:
build:
context: ..
Expand All @@ -21,9 +23,11 @@ services:
--port 6543
--storage-path $STORAGE_PATH
--log-level $LOG_LEVEL
tester:
build:
context: ..
dockerfile: docker/Dockerfile.test

networks:
tails-server:
18 changes: 9 additions & 9 deletions docker/manage
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
export MSYS_NO_PATHCONV=1
# getDockerHost; for details refer to https://github.com/bcgov/DITP-DevOps/tree/main/code/snippets#getdockerhost
. /dev/stdin <<<"$(cat <(curl -s --raw https://raw.githubusercontent.com/bcgov/DITP-DevOps/main/code/snippets/getDockerHost))"
. /dev/stdin <<<"$(cat <(curl -s --raw https://raw.githubusercontent.com/bcgov/DITP-DevOps/main/code/snippets/getDockerHost))"
export DOCKERHOST=$(getDockerHost)
set -e

Expand Down Expand Up @@ -37,7 +37,7 @@ exportEnvironment() {
TAIL_LOGS=1
;;
*)
# If not recognized, save it for later procesing ...
# If not recognized, save it for later processing ...
set -- "$@" "$arg"
;;
esac
Expand All @@ -57,7 +57,7 @@ function logs() {
while getopts ":f-:" FLAG; do
case $FLAG in
f ) local _force=1 ;;
- )
- )
case ${OPTARG} in
"no-tail"*) no_tail=1
;;
Expand Down Expand Up @@ -88,15 +88,15 @@ build)
;;
start|up)
exportEnvironment "$@"
docker-compose up -d ngrok-tails-server tails-server
docker-compose up --build --force-recreate -d ngrok-tails-server tails-server
logs
echo "Run './manage logs' for logs"
echo "Run './manage logs' for logs"
;;
test)
exportEnvironment "$@"
docker-compose up -d ngrok-tails-server tails-server
docker-compose up --build --force-recreate -d ngrok-tails-server tails-server
docker-compose run tester --genesis-url $GENESIS_URL --tails-server-url $TAILS_SERVER_URL
# docker-compose down
docker-compose down --volumes --remove-orphans
;;
logs)
docker-compose logs -f
Expand All @@ -105,11 +105,11 @@ stop)
docker-compose stop
;;
down|rm)
docker-compose down
docker-compose down --volumes --remove-orphans
;;
*)
usage
;;
esac

popd >/dev/null
popd >/dev/null
5 changes: 3 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
aiohttp==3.7.4
aiohttp==3.8.1
base58

# temporary to fix transitive dependency issues
multidict<5.0.0
yarl==1.6.0
yarl==1.7.2
indy-vdr==0.3.4
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ def parse_requirements(filename):
package_data={"tails_server": ["requirements.txt"]},
install_requires=parse_requirements("requirements.txt"),
tests_require=parse_requirements("requirements.dev.txt"),
python_requires=">=3.7.0",
python_requires=">=3.6.3",
classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.6.3",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
],
scripts=["bin/tails-server"],
)
)
3 changes: 2 additions & 1 deletion test/integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,4 +421,5 @@ async def download():
args = PARSER.parse_args()
genesis_url = args.genesis_url
tails_server_url = args.tails_server_url
asyncio.run(run_tests(genesis_url, tails_server_url))
loop = asyncio.get_event_loop()
loop.run_until_complete(run_tests(genesis_url, tails_server_url))

0 comments on commit e7419a4

Please sign in to comment.