Skip to content

Commit

Permalink
even more code review changes
Browse files Browse the repository at this point in the history
Signed-off-by: nadav mizrahi <[email protected]>
  • Loading branch information
nadavMiz committed Jul 2, 2023
1 parent 88cef94 commit 7e9fcd1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ceph-s3-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
# Freeze the version of operator
# to avoid a failed run due to code changes in the operator repo.
# Need to update the commit once in a while
ref: f7358501716816250702d9a4c96f2526f98534e7
ref: ca12ff9e360220bb50bb9a2b645846e4b241fa39

- name: Change settings for k8s and minikube
run: |
Expand Down
19 changes: 0 additions & 19 deletions docs/dev_guide/ceph_s3_tests/ceph_s3_tests_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions src/test/system_tests/ceph_s3_tests/test_ceph_s3.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')) {
Expand Down

0 comments on commit 7e9fcd1

Please sign in to comment.