summaryrefslogtreecommitdiff
path: root/tests/functional
Commit message (Collapse)AuthorAgeFilesLines
...
* test(functional): simplify token creationNejc Habjan2022-07-252-25/+8
|
* feat(namespaces): add support for namespace existence APINejc Habjan2022-07-241-3/+11
|
* chore: make reset_gitlab() betterJohn L. Villalovos2022-07-221-48/+17
| | | | | | | | | | | | | Saw issues in the CI where reset_gitlab() would fail. It would fail to delete the group that is created when GitLab starts up. Extending the timeout didn't fix the issue. Changed the code to use the new `helpers.safe_delete()` function. Which will delete the resource and then make sure it is deleted before returning. Also added some logging functionality that can be seen if logging is turned on in pytest.
* Merge pull request #1784 from python-gitlab/jlvillal/sidekiqNejc Habjan2022-07-222-29/+50
|\ | | | | chore: fixtures: after delete() wait to verify deleted
| * chore: fixtures: after delete() wait to verify deletedJohn L. Villalovos2022-07-212-29/+50
| | | | | | | | | | | | | | | | | | | | | | | | In our fixtures that create: - groups - project merge requests - projects - users They delete the created objects after use. Now wait to ensure the objects are deleted before continuing as having unexpected objects existing can impact some of our tests.
* | test(api_func_v4): catch deprecation warning for `gl.lint()`John L. Villalovos2022-07-211-1/+2
|/ | | | | Catch the deprecation warning for the call to `gl.lint()`, so it won't show up in the log.
* test(functional): use both get_all and all in list() testsNejc Habjan2022-07-211-11/+22
|
* fix: add `get_all` param (and `--get-all`) to allow passing `all` to APINejc Habjan2022-07-216-66/+106
|
* chore: enable mypy check `strict_equality`John L. Villalovos2022-07-191-2/+14
| | | | Enable the `mypy` `strict_equality` check.
* feat: support validating CI lint resultsNejc Habjan2022-07-091-0/+53
|
* test(functional): replace len() calls with list membership checksNejc Habjan2022-07-0314-172/+163
|
* fix: ensure path elements are escapedJohn L. Villalovos2022-07-031-1/+1
| | | | | | | Ensure the path elements that are passed to the server are escaped. For example a "/" will be changed to "%2F" Closes: #2116
* test: add tests and clean up usage for new enumsNejc Habjan2022-06-273-11/+23
|
* feat(downloads): allow streaming downloads access to response iterator (#1956)Tom Catshoek2022-06-261-0/+38
| | | | | | | | | | | | | | | * feat(downloads): allow streaming downloads access to response iterator Allow access to the underlying response iterator when downloading in streaming mode by specifying `iterator=True`. Update type annotations to support this change. * docs(api-docs): add iterator example to artifact download Document the usage of the `iterator=True` option when downloading artifacts * test(packages): add tests for streaming downloads
* feat(api): support head() method for get and list endpointsNejc Habjan2022-06-252-0/+13
|
* chore(ci): increase timeout for docker container to come onlineJohn L. Villalovos2022-06-241-4/+16
| | | | | Have been seeing timeout issues more and more. Increase timeout from 200 seconds to 300 seconds (5 minutes).
* feat(users): add ban and unban methodsAntoine Auger2022-06-131-0/+10
|
* test: increase client coverageNejc Habjan2022-06-021-0/+15
|
* test(cli): improve coverage for custom actionsNejc Habjan2022-06-012-4/+38
|
* fix(cli): fix project export download for CLINejc Habjan2022-06-011-0/+34
| | | | | Since ac1c619cae6481833f5df91862624bf0380fef67 we delete parent arg keys from the args dict so this has been trying to access the wrong attribute.
* test(gitlab): increase unit test coverageNejc Habjan2022-05-291-0/+6
|
* feat(client): introduce `iterator=True` and deprecate `as_list=False` in ↵John L. Villalovos2022-05-292-4/+15
| | | | | | | | | | | `list()` `as_list=False` is confusing as it doesn't explain what is being returned. Replace it with `iterator=True` which more clearly explains to the user that an iterator/generator will be returned. This maintains backward compatibility with `as_list` but does issue a DeprecationWarning if `as_list` is set.
* feat(objects): support get project storage endpointNejc Habjan2022-05-271-0/+7
|
* Merge pull request #1963 from python-gitlab/feat/deploy-token-getMax Wittig2022-04-131-4/+9
|\ | | | | feat(objects): support getting project/group deploy tokens by id
| * feat(objects): support getting project/group deploy tokens by idNejc Habjan2022-04-041-4/+9
| |
* | Merge pull request #1962 from python-gitlab/feat/user-ssh-keyMax Wittig2022-04-131-0/+3
|\ \ | | | | | | feat(user): support getting user SSH key by id
| * | feat(user): support getting user SSH key by idNejc Habjan2022-04-011-0/+3
| |/
* | feat: emit a warning when using a `list()` method returns maxJohn L. Villalovos2022-04-121-0/+45
|/ | | | | | | | | | | A common cause of issues filed and questions raised is that a user will call a `list()` method and only get 20 items. As this is the default maximum of items that will be returned from a `list()` method. To help with this we now emit a warning when the result from a `list()` method is greater-than or equal to 20 (or the specified `per_page` value) and the user is not using either `all=True`, `all=False`, `as_list=False`, or `page=X`.
* chore(deps): upgrade gitlab-ce to 14.9.2-ce.0Nejc Habjan2022-04-011-1/+1
|
* feat(api): re-add topic delete endpointNejc Habjan2022-04-012-0/+5
| | | | This reverts commit e3035a799a484f8d6c460f57e57d4b59217cd6de.
* test(functional): fix GitLab configuration to support paginationJohn L. Villalovos2022-02-053-4/+4
| | | | | | | | | | | | When pagination occurs python-gitlab uses the URL provided by the GitLab server to use for the next request. We had previously set the GitLab server configuraiton to say its URL was `http://gitlab.test` which is not in DNS. Set the hostname in the URL to `http://127.0.0.1:8080` which is the correct URL for the GitLab server to be accessed while doing functional tests. Closes: #1877
* test(services): add functional tests for servicesNejc Habjan2022-02-032-1/+43
|
* test(objects): add tests for project artifactsNejc Habjan2022-02-011-5/+101
|
* fix: remove custom `delete` method for labelsJohn L. Villalovos2022-02-012-3/+10
| | | | | | | | | | | | | | The usage of deleting was incorrect according to the current API. Remove custom `delete()` method as not needed. Add tests to show it works with labels needing to be encoded. Also enable the test_group_labels() test function. Previously it was disabled. Add ability to do a `get()` for group labels. Closes: #1867
* style: use f-strings where applicableNejc Habjan2022-01-231-6/+5
|
* chore: consistently use open() encoding and file descriptorNejc Habjan2022-01-231-2/+2
|
* chore: always use context manager for file IONejc Habjan2022-01-231-1/+2
|
* style: use literals to declare data structuresNejc Habjan2022-01-232-2/+2
|
* fix(cli): allow custom methods in managersNejc Habjan2022-01-222-0/+36
|
* fix(objects): make resource access tokens and repos available in CLINejc Habjan2022-01-221-0/+16
|
* chore(tests): use method `projects.transfer()`jlvillal/catch_warningsJohn L. Villalovos2022-01-131-2/+2
| | | | | | When doing the functional tests use the new function `projects.transfer` instead of the deprecated function `projects.transfer_project()`
* test(groups): enable group transfer testsNejc Habjan2022-01-132-7/+9
|
* feat(api): add `project.transfer()` and deprecate `transfer_project()`Nejc Habjan2022-01-132-0/+30
|
* Merge pull request #1819 from python-gitlab/jlvillal/encoded_idNejc Habjan2022-01-134-1/+61
|\ | | | | fix: use url-encoded ID in all paths
| * chore: replace usage of utils._url_encode() with utils.EncodedId()jlvillal/encoded_idJohn L. Villalovos2022-01-131-1/+1
| | | | | | | | | | | | utils.EncodedId() has basically the same functionalityy of using utils._url_encode(). So remove utils._url_encode() as we don't need it.
| * chore: add EncodedId string class to use to hold URL-encoded pathsJohn L. Villalovos2022-01-134-2/+47
| | | | | | | | | | | | | | | | | | Add EncodedId string class. This class returns a URL-encoded string but ensures it will only URL-encode it once even if recursively called. Also added some functional tests of 'lazy' objects to make sure they work.
| * fix: use url-encoded ID in all pathsJohn L. Villalovos2022-01-131-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | Make sure all usage of the ID in the URL path is encoded. Normally it isn't an issue as most IDs are integers or strings which don't contain a slash ('/'). But when the ID is a string with a slash character it will break things. Add a test case that shows this fixes wikis issue with subpages which use the slash character. Closes: #1079
* | Merge pull request #1827 from python-gitlab/jlvillal/all_objectsNejc Habjan2022-01-131-0/+28
|\ \ | |/ |/| fix: members: use new *All objects for *AllManager managers
| * fix(members): use new *All objects for *AllManager managersJohn L. Villalovos2022-01-131-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change it so that: GroupMemberAllManager uses GroupMemberAll object ProjectMemberAllManager uses ProjectMemberAll object Create GroupMemberAll and ProjectMemberAll objects that do not support any Mixin type methods. Previously we were using GroupMember and ProjectMember which support the `save()` and `delete()` methods but those methods will not work with objects retrieved using the `/members/all/` API calls. `list()` API calls: [1] GET /groups/:id/members/all GET /projects/:id/members/all `get()` API calls: [2] GET /groups/:id/members/all/:user_id GET /projects/:id/members/all/:user_id Closes: #1825 Closes: #848 [1] https://docs.gitlab.com/ee/api/members.html#list-all-members-of-a-group-or-project-including-inherited-and-invited-members [2] https://docs.gitlab.com/ee/api/members.html#get-a-member-of-a-group-or-project-including-inherited-and-invited-members
* | fix(api): services: add missing `lazy` parameterjlvillal/lazy_serviceJohn L. Villalovos2022-01-131-0/+11
|/ | | | | | | | Commit 8da0b758c589f608a6ae4eeb74b3f306609ba36d added the `lazy` parameter to the services `get()` method but missed then using the `lazy` parameter when it called `super(...).get(...)` Closes: #1828