Skip to content

Commit

Permalink
Merge #1768
Browse files Browse the repository at this point in the history
1768: test: update python and grpc packages r=tiagolobocastro a=tiagolobocastro



Co-authored-by: Tiago Castro <tiagolobocastro@gmail.com>
  • Loading branch information
mayastor-bors and tiagolobocastro committed Nov 7, 2024
2 parents 8c3bedf + e958ccc commit 288b36b
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 50 deletions.
6 changes: 4 additions & 2 deletions scripts/pytest-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,17 @@ while [ "$#" -gt 0 ]; do
real_1="$(realpath $1 2>/dev/null)"
real_2="$(realpath $SRCDIR/test/python/$1 2>/dev/null)"
set -e
param="$1"
param=""
if is_test "$real_1"; then
param="$real_1"
elif is_test "$real_2"; then
param="$real_2"
else
TEST_ARGS="${TEST_ARGS:-}$1"
fi
TEST_LIST="$TEST_LIST \n$param"
if [ "$param" != "" ]; then
TEST_LIST="${TEST_LIST:-}\n$param"
fi
;;
esac
shift
Expand Down
94 changes: 69 additions & 25 deletions test/grpc/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions test/python/common/mayastor.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ def check_size(prev, current, delta):
def containers(docker_project, function_scoped_container_getter):
"Fixture to get handles to mayastor containers."
containers = {}
for name in docker_project.service_names:
containers[name] = function_scoped_container_getter.get(name)
for container in docker_project.compose.ps():
containers[container.name] = container
yield containers


Expand All @@ -28,7 +28,7 @@ def mayastors(docker_project, containers):
handles = {}
for name, container in containers.items():
handles[name] = MayastorHandle(
container.get("NetworkSettings.Networks.mayastor_net.IPAddress")
container.network_settings.networks.get("mayastor_net").ip_address
)
yield handles

Expand All @@ -46,8 +46,8 @@ def create_temp_files(containers):
def container_mod(docker_project, module_scoped_container_getter):
"Fixture to get handles to mayastor containers."
containers = {}
for name in docker_project.service_names:
containers[name] = module_scoped_container_getter.get(name)
for container in docker_project.compose.ps():
containers[container.name] = container
yield containers


Expand All @@ -57,6 +57,6 @@ def mayastor_mod(docker_project, container_mod):
handles = {}
for name, container in container_mod.items():
handles[name] = MayastorHandle(
container.get("NetworkSettings.Networks.mayastor_net.IPAddress")
container.network_settings.networks.get("mayastor_net").ip_address
)
yield handles
Binary file added test/python/local-job-fs-0-verify.state
Binary file not shown.
22 changes: 11 additions & 11 deletions test/python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
asyncio==3.4.3
asyncssh==2.14.2
black==24.3.0
protobuf==4.21.8
pytest==7.4.4
pytest-asyncio==0.21.1
pytest-bdd==6.1.1
asyncssh==2.18.0
black==24.10.0
protobuf==5.28.3
pytest==7.2.2
pytest-asyncio==0.23.0
pytest-bdd==7.3.0
pytest-black==0.3.12
pytest-docker-compose==3.2.1
pytest-docker-compose-v2==0.1.1
pytest-testconfig==0.2.0
pytest-timeout==2.1.0
pytest-variables==3.0.0
pytest-timeout==2.3.1
pytest-variables==3.1.0
retrying==1.3.4
requests==2.31.0
docker==6.1.3
requests==2.32.3
docker==7.1.0
pyyaml==5.3.1
12 changes: 6 additions & 6 deletions test/python/v1/mayastor.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ def check_size(prev, current, delta):
def containers(docker_project, function_scoped_container_getter):
"Fixture to get handles to mayastor containers."
containers = {}
for name in docker_project.service_names:
containers[name] = function_scoped_container_getter.get(name)
for container in docker_project.compose.ps():
containers[container.name] = container
yield containers


Expand All @@ -28,7 +28,7 @@ def mayastors(docker_project, containers):
handles = {}
for name, container in containers.items():
handles[name] = MayastorHandle(
container.get("NetworkSettings.Networks.mayastor_net.IPAddress")
container.network_settings.networks.get("mayastor_net").ip_address
)
yield handles

Expand All @@ -46,8 +46,8 @@ def create_temp_files(containers):
def container_mod(docker_project, module_scoped_container_getter):
"Fixture to get handles to mayastor containers."
containers = {}
for name in docker_project.service_names:
containers[name] = module_scoped_container_getter.get(name)
for container in docker_project.compose.ps():
containers[container.name] = container
yield containers


Expand All @@ -57,6 +57,6 @@ def mayastor_mod(docker_project, container_mod):
handles = {}
for name, container in container_mod.items():
handles[name] = MayastorHandle(
container.get("NetworkSettings.Networks.mayastor_net.IPAddress")
container.network_settings.networks.get("mayastor_net").ip_address
)
yield handles

0 comments on commit 288b36b

Please sign in to comment.