diff --git a/scripts/pytest-tests.sh b/scripts/pytest-tests.sh index efd5081f9..03ccb772b 100755 --- a/scripts/pytest-tests.sh +++ b/scripts/pytest-tests.sh @@ -106,7 +106,7 @@ 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 @@ -114,7 +114,9 @@ while [ "$#" -gt 0 ]; do 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 diff --git a/test/grpc/package-lock.json b/test/grpc/package-lock.json index 8d5cfb70d..598409aa8 100644 --- a/test/grpc/package-lock.json +++ b/test/grpc/package-lock.json @@ -112,15 +112,32 @@ } }, "node_modules/@grpc/grpc-js": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.9.3.tgz", - "integrity": "sha512-b8iWtdrYIeT5fdZdS4Br/6h/kuk0PW5EVBUGk1amSbrpL8DlktJD43CdcCWwRdd6+jgwHhADSbL9CsNnm6EUPA==", + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.12.2.tgz", + "integrity": "sha512-bgxdZmgTrJZX50OjyVwz3+mNEnCTNkh3cIqGPWVNeW9jX6bn1ZkU80uPd+67/ZpIJIjRQ9qaHCjhavyoWYxumg==", "dependencies": { - "@grpc/proto-loader": "^0.7.8", - "@types/node": ">=12.12.47" + "@grpc/proto-loader": "^0.7.13", + "@js-sdsl/ordered-map": "^4.4.2" }, "engines": { - "node": "^8.13.0 || >=10.10.0" + "node": ">=12.10.0" + } + }, + "node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader": { + "version": "0.7.13", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.13.tgz", + "integrity": "sha512-AiXO/bfe9bmxBjxxtYxFAXGZvMaN5s8kO+jBHAJCON8rJoB5YS/D6X7ZNc6XQkuHNmyl4CYaMI1fJ/Gn27RGGw==", + "dependencies": { + "lodash.camelcase": "^4.3.0", + "long": "^5.0.0", + "protobufjs": "^7.2.5", + "yargs": "^17.7.2" + }, + "bin": { + "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" + }, + "engines": { + "node": ">=6" } }, "node_modules/@grpc/proto-loader": { @@ -206,6 +223,15 @@ "node": ">=12" } }, + "node_modules/@js-sdsl/ordered-map": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz", + "integrity": "sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/js-sdsl" + } + }, "node_modules/@mapbox/node-pre-gyp": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz", @@ -643,11 +669,11 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -1782,9 +1808,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -5182,12 +5208,25 @@ "integrity": "sha512-1S8uAY/MTJqVx0SC4epBq+N2yhuwtNwLbJYNZyhL2pO1ZVKn5HFXav5T41Ryzy9K9V7ZId2JB2oy/W4aCd9/2w==" }, "@grpc/grpc-js": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.9.3.tgz", - "integrity": "sha512-b8iWtdrYIeT5fdZdS4Br/6h/kuk0PW5EVBUGk1amSbrpL8DlktJD43CdcCWwRdd6+jgwHhADSbL9CsNnm6EUPA==", + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.12.2.tgz", + "integrity": "sha512-bgxdZmgTrJZX50OjyVwz3+mNEnCTNkh3cIqGPWVNeW9jX6bn1ZkU80uPd+67/ZpIJIjRQ9qaHCjhavyoWYxumg==", "requires": { - "@grpc/proto-loader": "^0.7.8", - "@types/node": ">=12.12.47" + "@grpc/proto-loader": "^0.7.13", + "@js-sdsl/ordered-map": "^4.4.2" + }, + "dependencies": { + "@grpc/proto-loader": { + "version": "0.7.13", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.13.tgz", + "integrity": "sha512-AiXO/bfe9bmxBjxxtYxFAXGZvMaN5s8kO+jBHAJCON8rJoB5YS/D6X7ZNc6XQkuHNmyl4CYaMI1fJ/Gn27RGGw==", + "requires": { + "lodash.camelcase": "^4.3.0", + "long": "^5.0.0", + "protobufjs": "^7.2.5", + "yargs": "^17.7.2" + } + } } }, "@grpc/proto-loader": { @@ -5253,6 +5292,11 @@ "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" } }, + "@js-sdsl/ordered-map": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz", + "integrity": "sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==" + }, "@mapbox/node-pre-gyp": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz", @@ -5593,11 +5637,11 @@ } }, "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "requires": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" } }, "browser-stdout": { @@ -6419,9 +6463,9 @@ } }, "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "requires": { "to-regex-range": "^5.0.1" } diff --git a/test/python/common/mayastor.py b/test/python/common/mayastor.py index 343260875..31f28e683 100644 --- a/test/python/common/mayastor.py +++ b/test/python/common/mayastor.py @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/test/python/local-job-fs-0-verify.state b/test/python/local-job-fs-0-verify.state new file mode 100644 index 000000000..3baa3f83c Binary files /dev/null and b/test/python/local-job-fs-0-verify.state differ diff --git a/test/python/requirements.txt b/test/python/requirements.txt index 1af1e69c4..f1964e0f4 100644 --- a/test/python/requirements.txt +++ b/test/python/requirements.txt @@ -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 diff --git a/test/python/v1/mayastor.py b/test/python/v1/mayastor.py index 51406edeb..cdc43ff65 100644 --- a/test/python/v1/mayastor.py +++ b/test/python/v1/mayastor.py @@ -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 @@ -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 @@ -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 @@ -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