From d6653877b980556a0a53fff6d74f9a92c24296f7 Mon Sep 17 00:00:00 2001 From: nadav mizrahi Date: Thu, 29 Jun 2023 16:36:22 +0300 Subject: [PATCH] even more code review changes --- .../ceph_s3_tests/ceph_s3_tests_guide.md | 19 ------------------- .../ceph_s3_tests/test_ceph_s3.js | 5 +---- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/docs/dev_guide/ceph_s3_tests/ceph_s3_tests_guide.md b/docs/dev_guide/ceph_s3_tests/ceph_s3_tests_guide.md index cef8c97148..36bc9fe4bf 100644 --- a/docs/dev_guide/ceph_s3_tests/ceph_s3_tests_guide.md +++ b/docs/dev_guide/ceph_s3_tests/ceph_s3_tests_guide.md @@ -101,13 +101,6 @@ Some tests are marked to be skipped in the code of ceph/s3-tests repository. Usu In the test code the function: `pytest.skip("")` will mark them to be skipped. -#### Boto3 tests -As mentioned in the [readme of ceph/s3-tests](https://github.com/ceph/s3-tests#readme): - -Most of the tests have both Boto3 and Boto2 versions. Tests written in Boto2 are in the s3tests directory. Tests written in Boto3 are located in the s3test_boto3 directory. - -In order to only run the boto3 version, tests in the boto directory run with `-- -m 'not fails_on_rgw`: - ```bash S3TEST_CONF=your.conf tox -- -m 'not fails_on_rgw' s3tests_boto3/functional::test_name ``` @@ -169,18 +162,6 @@ For example: S3TEST_CONF=${PWD}/src/test/system_tests/ceph_s3_tests/test_ceph_s3_config.conf tox -c src/test/system_tests/ceph_s3_tests/s3-tests/tox.ini -- --disable-pytest-warnings ${PWD}/src/test/system_tests/ceph_s3_tests/s3-tests/s3tests/functional/test_headers.py::test_bucket_create_contentlength_none ``` -Note that every flag that comes after `--` is passed to pytest from tox. so if there is already `--` in the command just put `--disable-pytest-warnings` as part of the flags after it, no need to add another `--` notation. - -for example to add --disable-pytest-warnings to the command: -```bash -S3TEST_CONF=${PWD}/src/test/system_tests/ceph_s3_tests/test_ceph_s3_config.conf tox -c src/test/system_tests/ceph_s3_tests/s3-tests/tox.ini -- -m 'not fails_on_rgw' ${PWD}/src/test/system_tests/ceph_s3_tests/s3-tests/s3tests_boto3/functional/test_s3.py::test_account_usage -``` - -it should be: -```bash -S3TEST_CONF=${PWD}/src/test/system_tests/ceph_s3_tests/test_ceph_s3_config.conf tox -c src/test/system_tests/ceph_s3_tests/s3-tests/tox.ini -- -m 'not fails_on_rgw --disable-pytest-warnings ${PWD}/src/test/system_tests/ceph_s3_tests/s3-tests/s3tests_boto3/functional/test_s3.py::test_account_usage -``` - ### 5) Run a Test (Inside The Tester Pod) To run a test, from noobaa working directory: ```bash diff --git a/src/test/system_tests/ceph_s3_tests/test_ceph_s3.js b/src/test/system_tests/ceph_s3_tests/test_ceph_s3.js index 592c25c704..54f5fa2b87 100644 --- a/src/test/system_tests/ceph_s3_tests/test_ceph_s3.js +++ b/src/test/system_tests/ceph_s3_tests/test_ceph_s3.js @@ -104,12 +104,9 @@ async function run_single_test(test) { if (test.endsWith(AWS4_TEST_ENDING)) { ceph_args += ` S3_USE_SIGV4=true`; } - let base_cmd = `${ceph_args} tox ${TOX_ARGS}`; + const base_cmd = `${ceph_args} tox ${TOX_ARGS}`; if (!S3_CEPH_TEST_OUT_OF_SCOPE_REGEXP.test(test)) { try { - if (test.includes('boto')) { - base_cmd = `${ceph_args} tox ${TOX_ARGS} -- -m 'not fails_on_rgw'`; - } const full_test_command = `${base_cmd} ${process.cwd()}/${CEPH_TEST.test_dir}${CEPH_TEST.s3_test_dir}${test}`; const res = await os_utils.exec(full_test_command, { ignore_rc: false, return_stdout: true }); if (res.includes('skipped')) {