Skip to content

Commit 288b36b

Browse files
mayastor-borstiagolobocastro
andcommitted
Merge #1768
1768: test: update python and grpc packages r=tiagolobocastro a=tiagolobocastro Co-authored-by: Tiago Castro <[email protected]>
2 parents 8c3bedf + e958ccc commit 288b36b

File tree

6 files changed

+96
-50
lines changed

6 files changed

+96
-50
lines changed

scripts/pytest-tests.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,17 @@ while [ "$#" -gt 0 ]; do
106106
real_1="$(realpath $1 2>/dev/null)"
107107
real_2="$(realpath $SRCDIR/test/python/$1 2>/dev/null)"
108108
set -e
109-
param="$1"
109+
param=""
110110
if is_test "$real_1"; then
111111
param="$real_1"
112112
elif is_test "$real_2"; then
113113
param="$real_2"
114114
else
115115
TEST_ARGS="${TEST_ARGS:-}$1"
116116
fi
117-
TEST_LIST="$TEST_LIST \n$param"
117+
if [ "$param" != "" ]; then
118+
TEST_LIST="${TEST_LIST:-}\n$param"
119+
fi
118120
;;
119121
esac
120122
shift

test/grpc/package-lock.json

Lines changed: 69 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/python/common/mayastor.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ def check_size(prev, current, delta):
1717
def containers(docker_project, function_scoped_container_getter):
1818
"Fixture to get handles to mayastor containers."
1919
containers = {}
20-
for name in docker_project.service_names:
21-
containers[name] = function_scoped_container_getter.get(name)
20+
for container in docker_project.compose.ps():
21+
containers[container.name] = container
2222
yield containers
2323

2424

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

@@ -46,8 +46,8 @@ def create_temp_files(containers):
4646
def container_mod(docker_project, module_scoped_container_getter):
4747
"Fixture to get handles to mayastor containers."
4848
containers = {}
49-
for name in docker_project.service_names:
50-
containers[name] = module_scoped_container_getter.get(name)
49+
for container in docker_project.compose.ps():
50+
containers[container.name] = container
5151
yield containers
5252

5353

@@ -57,6 +57,6 @@ def mayastor_mod(docker_project, container_mod):
5757
handles = {}
5858
for name, container in container_mod.items():
5959
handles[name] = MayastorHandle(
60-
container.get("NetworkSettings.Networks.mayastor_net.IPAddress")
60+
container.network_settings.networks.get("mayastor_net").ip_address
6161
)
6262
yield handles
15.2 KB
Binary file not shown.

test/python/requirements.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
asyncio==3.4.3
2-
asyncssh==2.14.2
3-
black==24.3.0
4-
protobuf==4.21.8
5-
pytest==7.4.4
6-
pytest-asyncio==0.21.1
7-
pytest-bdd==6.1.1
2+
asyncssh==2.18.0
3+
black==24.10.0
4+
protobuf==5.28.3
5+
pytest==7.2.2
6+
pytest-asyncio==0.23.0
7+
pytest-bdd==7.3.0
88
pytest-black==0.3.12
9-
pytest-docker-compose==3.2.1
9+
pytest-docker-compose-v2==0.1.1
1010
pytest-testconfig==0.2.0
11-
pytest-timeout==2.1.0
12-
pytest-variables==3.0.0
11+
pytest-timeout==2.3.1
12+
pytest-variables==3.1.0
1313
retrying==1.3.4
14-
requests==2.31.0
15-
docker==6.1.3
14+
requests==2.32.3
15+
docker==7.1.0
1616
pyyaml==5.3.1

test/python/v1/mayastor.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ def check_size(prev, current, delta):
1717
def containers(docker_project, function_scoped_container_getter):
1818
"Fixture to get handles to mayastor containers."
1919
containers = {}
20-
for name in docker_project.service_names:
21-
containers[name] = function_scoped_container_getter.get(name)
20+
for container in docker_project.compose.ps():
21+
containers[container.name] = container
2222
yield containers
2323

2424

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

@@ -46,8 +46,8 @@ def create_temp_files(containers):
4646
def container_mod(docker_project, module_scoped_container_getter):
4747
"Fixture to get handles to mayastor containers."
4848
containers = {}
49-
for name in docker_project.service_names:
50-
containers[name] = module_scoped_container_getter.get(name)
49+
for container in docker_project.compose.ps():
50+
containers[container.name] = container
5151
yield containers
5252

5353

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

0 commit comments

Comments
 (0)