You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We run all the tests except the tests that appear in the lists `src/test/system_tests/ceph_s3_tests/s3-tests-lists` if you would like to add or remove a test you can edit those files (and then repeat the steps starting from 'Build Core And Tester Images (Noobaa-Core)' above).
92
93
94
+
Some tests are marked to be skipped in the tests code. usually because the enviorment doesn't support certain criteria. those tests will appear with a `[WARN]` tag and will be marked as "Test Skipped", for example:
95
+
`[WARN] CONSOLE:: Test skipped: s3tests_boto3/functional/test_s3.py::test_lifecycle_transition`
96
+
97
+
In the test code the function:
98
+
`pytest.skip("")` will mark them to be skipped.
99
+
93
100
## Run a Single Ceph S3 Test
94
101
95
102
### 1) Prerequisites:
@@ -137,20 +144,26 @@ Run the script that will create the necessary accounts in noobaa and update the
Note: If you want to ignore PythonDeprecationWarnings use (which will then ignore all Python warnings, so keep that in mind):
141
-
```bash
142
-
export PYTHONWARNINGS="ignore"
143
-
```
147
+
Note: If you want to ignore PythonDeprecationWarnings add the following flag to the test command (which will then ignore all Python warnings, so keep that in mind):
148
+
`-- --disable-pytest-warnings`
149
+
150
+
note that every flag that comes after `--` is past 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.
151
+
152
+
for example to add --disable-pytest-warnings to the command:
This should run the test on the noobaa deployment we've set up.
151
164
152
165
#### Test Name
153
-
You can find a list of tests in the doc inside the file `ceph_s3_tests_list_single_test.txt`. Please notice that the test name has a certain structure <directory_name> are separated with `.` and the function to run (usually with a prefix `test_`) appears after the `:` sign.
166
+
You can find a list of tests in the doc inside the file `ceph_s3_tests_list_single_test.txt`. Please notice that the test name has a certain structure <directory_name> are separated with `/`, the files end with the extention `.py` and the function to run (usually with a prefix `test_`) appears after the `::` sign.
154
167
## Debug a Single Test (Inside The Tester Pod)
155
168
156
169
### 1) Prerequisites:
@@ -174,22 +187,22 @@ Since the file `./src/test/system_tests/ceph_s3_tests/s3-tests/s3tests_boto3/fun
174
187
175
188
#### B. Temporary change - this change will be saved in the file inside the container, useful when you need a small change.
176
189
You can edit the test by going to the test file and editing the test function. e.g. if you are working on test `s3tests_boto3.functional.test_s3:test_set_bucket_tagging` then you should `vi ./src/test/system_tests/ceph_s3_tests/s3-tests/s3tests_boto3/functional/test_s3.py` and search for the function `test_set_bucket_tagging`.
177
-
## Compare to AWS Response (Inside Tester Pod)
190
+
###Compare to AWS Response (Inside Tester Pod)
178
191
Prerequisites:
179
192
Following the 'Run a Single Ceph S3 Test' steps until 'Deploy The Tester Deployment (Noobaa-Core Tab)'.
180
193
181
194
In this section we will do some manual changes that will allow you to check AWS response for a specific test (tests that do not use neither ACL nor tenant group).
2) Change the new configuration file to match AWS details, `vi .src/test/system_tests/ceph_s3_tests/test_ceph_s3_config.conf.aws`:
199
+
2) Change the new configuration file to match AWS details, `vi src/test/system_tests/ceph_s3_tests/test_ceph_s3_config_aws.conf`:
187
200
* host = s3.amazonaws.com
188
201
* bucket prefix = choose_name (for example: `bucket prefix = foo-bucket` you will need to manually delete it from AWS, and its name will be `foo-bucket1`, it adds suffix of 1).
189
202
* access_key, secret_key appears 3 times each in the file.
190
203
3) Running tests with the new configuration files will run against AWS:
`WARNING: could not copy distfile to //.tox/distshare`
236
+
this warning is for tox to use the same dependancies between projects. this feature is depricated and not used on this project. in order to remove the warning you can modify src/test/system_tests/ceph_s3_tests/s3-tests/tox.ini to include the following line in the `[tox]` section: `distshare = /root/node_modules/noobaa-core/.tox/distshare`
229
237
230
-
```
231
238
### 2) Test Fail
232
239
For example: `s3tests_boto3/functional/test_s3::test_account_usage.py`
========================================================================================= short test summary info ==========================================================================================
If you will use a test name that not written in the defined structure (as mentioned in 'Test Name' section) you will get a falsy OK.
265
-
266
-
For example: `s3tests_boto3.functional.test_s3.test_account_usage` instead of `s3tests_boto3.functional.test_s3:test_account_usage` (notice the use of the sign `:` before test).
console.info(`CEPH TEST SUMMARY: Suite contains ${testing_status.total}, ran ${testing_status.pass.length+testing_status.fail.length+testing_status.skip.length} tests, Passed: ${testing_status.pass.length}, Skipped: ${testing_status.skip.length}, Failed: ${testing_status.fail.length}`);
67
67
if(testing_status.skip.length){
68
-
console.warn(`CEPH TEST SUMMARY: ${testing_status.skip.length} skipped tests ${testing_status.skip.join('\n')}`);
68
+
console.warn(`CEPH TEST SUMMARY: ${testing_status.skip.length} skipped tests \n${testing_status.skip.join('\n')}`);
69
69
}
70
70
if(testing_status.fail.length){
71
71
console.error(`CEPH TEST FAILED TESTS SUMMARY: ${testing_status.fail.length} failed tests \n${testing_status.fail.join('\n')}`);
0 commit comments