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
Running all the tests on a local machine takes about 20 minutes. With the current setting, all tests should pass, but there are cases where the endpoint restarts and causes a test to fail. You can also run a single test to be sure that it passes.
95
+
94
96
#### Skipped tests
95
97
96
98
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).
@@ -101,17 +103,6 @@ Some tests are marked to be skipped in the code of ceph/s3-tests repository. Usu
101
103
In the test code the function:
102
104
`pytest.skip("")` will mark them to be skipped.
103
105
104
-
#### Boto3 tests
105
-
As mentioned in the [readme of ceph/s3-tests](https://github.com/ceph/s3-tests#readme):
106
-
107
-
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.
108
-
109
-
In order to only run the boto3 version, tests in the boto directory run with `-- -m 'not fails_on_rgw`:
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.
173
-
174
-
for example to add --disable-pytest-warnings to the command:
@@ -193,6 +168,23 @@ You can find a list of tests in the doc inside the file `ceph_s3_tests_list_sing
193
168
194
169
In case the test name is incorrect, for example if you add `:` instead of `::` to the test name, the command will fail.
195
170
The error will be `file or directory not found` and pytest will exit with error code 4 (which means "pytest command line usage error")
171
+
172
+
#### Disable pytest warnings
173
+
If you want to disable summary warnings add the following flag to the test command:
174
+
`-- --disable-pytest-warnings`
175
+
176
+
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.
177
+
178
+
for example to add --disable-pytest-warnings to the command:
@@ -205,15 +197,18 @@ The best place to start investigating is noobaa endpoint pod logs. if you are ru
205
197
### 3) Change a Test
206
198
Sometimes you would like to change a test: add printing of variables, skip an assertion as needed, or you suspect that it has a faulty and you would like to change the code.
207
199
208
-
#### A. Permanent change - this change will be saved in a repo, it is for continues investigating.
200
+
#### A. Temporary change - this change will be saved in the file inside the container, useful when you need a small change.
201
+
You can edit a test by going to the test file and editing the test function. See [View The Test Content](#2-view-the-test-content) for how to find the test function.
202
+
203
+
204
+
#### B. Permanent change - this change will be saved in a repo, it is for continues investigating.
209
205
1) Fork and clone the repository [ceph/s3-test](https://github.com/ceph/s3-tests).
210
206
2) Create a new branch from the hash number that was set in the file `./src/test/system_tests/ceph_s3_tests/test_ceph_s3_deploy.sh`.
211
207
3) Change the code, commit, and push to the remote branch.
212
208
4) Inside the file `test_ceph_s3_deploy.sh` (mentioned above) Change the values of `CEPH_LINK` to your remote repository and the `CEPH_TESTS_VERSION` to the newest commit in your repository.
213
209
5) Build the tester image again, deploy noobaa, and run the test (repeat the steps starting from 'Build Core And Tester Images (Noobaa-Core)' above).
214
210
215
-
#### B. Temporary change - this change will be saved in the file inside the container, useful when you need a small change.
216
-
You can edit a 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 `vim ./src/test/system_tests/ceph_s3_tests/s3-tests/s3tests_boto3/functional/test_s3.py` and search for the function`test_set_bucket_tagging`.
211
+
217
212
## Compare to AWS Response (Inside Tester Pod)
218
213
Prerequisites:
219
214
Following the 'Run a Single Ceph S3 Test' steps until 'Deploy The Tester Deployment (Noobaa-Core Tab)'.
@@ -228,7 +223,11 @@ In this section we will do some manual changes that will allow you to check AWS
228
223
vim src/test/system_tests/ceph_s3_tests/test_ceph_s3_config_aws.conf
229
224
```
230
225
* host = s3.amazonaws.com
231
-
* bucket prefix = choose_name (for example: `bucket prefix = foo-bucket` In case the test will fail to delete the bucket, you will need to manually delete it from AWS, and its name will be `foo-bucket1`, it adds suffix of 1).
226
+
* bucket prefix = choose_name
227
+
228
+
For example:
229
+
`bucket prefix = foo-bucket` In case the test will fail to delete the bucket, you will need to manually delete it from AWS, and its name will be `foo-bucket1`, it adds suffix of 1.
230
+
232
231
* access_key, secret_key appears 3 times each in the file.
233
232
3) Running tests with the new configuration files will run against AWS:
`WARNING: could not copy distfile to //.tox/distshare`
273
-
this warning is fortox to use the same dependancies between projects. this feature is deprecated 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 linein the `[tox]` section: `distshare = /root/node_modules/noobaa-core/.tox/distshare`
272
+
this warning is for tox to use the same dependancies between projects. this feature is deprecated 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`
0 commit comments