summaryrefslogtreecommitdiff
path: root/test/unit/test_service.py
Commit message (Collapse)AuthorAgeFilesLines
* Use SLO by default for segmented uploads if the cluster supports itTim Burke2023-03-211-1/+79
| | | | | | | | | | | | | | | | | | | | | We've had SLO for nearly ten years, and it is preferable for most use-cases. It's time to default to SLO rather than DLO. Add a new --use-dlo option to give users a way to return to old behavior; ensure there is still a --use-slo option so we don't break existing scripts that may use it. UpgradeImpact: ============== The default segmented-upload behavior has changed; Static Large Objects are now used by default rather than Dynamic Large Objects. To revert to the old behavior: * CLI users may use the new `--use-dlo` option * Service API users may explicitly set `use_slo` to False in their options dicts Change-Id: Iebcd64ced8eab6efebb9f02a0c4be6bf6338cb3b
* Include transaction ID on content-check failuresTim Burke2023-03-151-2/+14
| | | | Change-Id: I6b667db26ffc5dccdcadfc8c73f7accb81f03dac
* service: Check content-length before etagTim Burke2023-03-141-2/+18
| | | | | | | | If the received content-length does not match expectations, of course the etag won't match! Co-Authored-By: Alistair Coles <alistairncoles@gmail.com> Change-Id: I1a0c066c11b94718fffbb11e13b82d0b16e01626
* Remove use of mockSteve Kowalik2022-05-241-34/+33
| | | | | | | Since Python 3.4, the unittest module has provided mock, negating the need for the external dependancy. Switch to using unittest.mock. Change-Id: Idec3aaed2fddd1ece3ed86ee0bcc48f7616d56fa
* Remove unnecessary unicode prefixesStephen Finucane2022-03-211-2/+2
| | | | | | | | All strings are unicode by default in Python 3. No need to mark them as such. Signed-off-by: Stephen Finucane <stephenfin@redhat.com> Change-Id: I68fb60ef271abfddebcc9d2137424f5db2a17e92
* Remove sixStephen Finucane2022-03-211-14/+9
| | | | | | | This mostly affects tests. Nothing too complicated Signed-off-by: Stephen Finucane <stephenfin@redhat.com> Change-Id: Iabc78f651e1d48db35638280722f8019798eccd6
* Remove coding commentsStephen Finucane2022-03-211-1/+0
| | | | | | | Everything is unicode in Python 3. Signed-off-by: Stephen Finucane <stephenfin@redhat.com> Change-Id: I6a076dc67c461f265ed99878e3959e1992a88189
* Remove __future__ importsStephen Finucane2022-03-211-1/+1
| | | | | | | These aren't needed in modern Python 3 versions. Signed-off-by: Stephen Finucane <stephenfin@redhat.com> Change-Id: I5e81d6fb2e2cb8e4bfae4ed746da002f44e871c4
* object versioning featuresClay Gerrard2020-04-081-17/+242
| | | | | | | | | | * add --versions to list * add --versions to delete * add --version-id to stat * add --version-id to delete * add --version-id to download Change-Id: I89802064921778fee7efe57c7d60c976cdde3a27
* Rename "tests" directory to be "test" like in the swift repoTim Burke2019-11-061-0/+2909
In addition to being less confusing for devs, this lets us actually run tempauth tests in swiftclient dsvm jobs. The job definition (over in the swift repo) specifies test/sample.conf, which does not exist in this repo. As a result, those tests would skip with SKIPPING FUNCTIONAL TESTS DUE TO NO CONFIG Change-Id: I558dbf9a657d442e6e19468e543bbec855129eeb