summaryrefslogtreecommitdiff
path: root/tests/functional/api
Commit message (Collapse)AuthorAgeFilesLines
* feat: allow passing kwargs to Gitlab class when instantiating with ↵Liora Milbaum2022-12-041-0/+19
| | | | `from_config` (#2392)
* feat: add support for SAML group links (#2367)Abhishek Singh2022-11-221-0/+8
|
* test(api): fix flaky test `test_cancel_merge_when_pipeline_succeeds`John L. Villalovos2022-11-211-0/+1
| | | | | | | | | This is an attempt to fix the flaky test `test_cancel_merge_when_pipeline_succeeds`. Were seeing a: 405 Method Not Allowed error when setting the MR to merge_when_pipeline_succeeds. Closes: #2383
* feat(groups): add LDAP link manager and deprecate old API endpointsNejc Habjan2022-11-171-6/+28
|
* feat(api): add support for remote project import from AWS S3 (#2357)Abhishek Singh2022-11-021-1/+21
|
* feat(api): add support for remote project import (#2348)Abhishek Singh2022-11-011-0/+14
|
* feat(api): add application statisticsShreya2022-11-011-0/+12
|
* fix: use POST method and return dict in ↵John Villalovos2022-10-311-0/+16
| | | | | | | | | | | | | | `cancel_merge_when_pipeline_succeeds()` (#2350) * Call was incorrectly using a `PUT` method when should have used a `POST` method. * Changed return type to a `dict` as GitLab only returns {'status': 'success'} on success. Since the function didn't work previously, this should not impact anyone. * Updated the test fixture `merge_request` to add ability to create a pipeline. * Added functional test for `mr.cancel_merge_when_pipeline_succeeds()` Fixes: #2349
* chore: add basic type checks to functional/api testsNejc Habjan2022-10-274-4/+4
|
* test: fix `test_project_push_rules` testJohn L. Villalovos2022-10-181-4/+9
| | | | Make the `test_project_push_rules` test work.
* test: enable skipping tests per GitLab planNejc Habjan2022-10-185-9/+14
|
* refactor: migrate legacy EE tests to pytestNejc Habjan2022-10-187-0/+166
|
* chore: topic functional testsLiora Milbaum2022-10-151-5/+11
|
* chore: fix flaky testJohn L. Villalovos2022-10-091-4/+3
|
* fix: intermittent failure in test_merge_request_reset_approvalsJohn L. Villalovos2022-10-051-1/+2
| | | | | | | | | | Have been seeing intermittent failures in the test: tests/functional/api/test_merge_requests.py::test_merge_request_reset_approvals Also saw a failure in: tests/functional/cli/test_cli_v4.py::test_accept_request_merge[subprocess] Add a call to `wait_for_sidekiq()` to hopefully resolve the issues.
* chore: simplify `wait_for_sidekiq` usageJohn L. Villalovos2022-10-053-12/+6
| | | | | Simplify usage of `wait_for_sidekiq` by putting the assert if it timed out inside the function rather than after calling it.
* feat: Add reset_approvals apiLucas Zampieri2022-09-261-0/+9
| | | | | | Added the newly added reset_approvals merge request api. Signed-off-by: Lucas Zampieri <lzampier@redhat.com>
* chore: bump GitLab docker image to 15.4.0-ee.0John L. Villalovos2022-09-221-1/+1
| | | | | | | | | * Use `settings.delayed_group_deletion=False` as that is the recommended method to turn off the delayed group deletion now. * Change test to look for `default` as `pages` is not mentioned in the docs[1] [1] https://docs.gitlab.com/ee/api/sidekiq_metrics.html#get-the-current-queue-metrics
* chore: Only check for our UserWarningJohn L. Villalovos2022-08-241-1/+5
| | | | | | | | | | | | | | | | | The GitHub CI is showing a ResourceWarning, causing our test to fail. Update test to only look for our UserWarning which should not appear. What was seen when debugging the GitHub CI: {message: ResourceWarning( "unclosed <socket.socket fd=12, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('127.0.0.1', 50862), raddr=('127.0.0.1', 8080)>" ), category: 'ResourceWarning', filename: '/home/runner/work/python-gitlab/python-gitlab/.tox/api_func_v4/lib/python3.10/site-packages/urllib3/poolmanager.py', lineno: 271, line: None }
* chore: fix issue if only run test_gitlab.py func testJohn L. Villalovos2022-08-241-0/+1
| | | | | | | Make it so can run just the test_gitlab.py functional test. For example: $ tox -e api_func_v4 -- -k test_gitlab.py
* feat: add support for merge_base APINejc Habjan2022-08-191-0/+10
|
* Merge pull request #2194 from python-gitlab/jlvillal/update-gitlabNejc Habjan2022-07-292-46/+9
|\ | | | | test(functional): bump GitLab docker image to 15.2.0-ee.0
| * chore(clusters): deprecate clusters supportJohn L. Villalovos2022-07-281-44/+0
| | | | | | | | | | | | | | | | | | | | | | Cluster support was deprecated in GitLab 14.5 [1]. And disabled by default in GitLab 15.0 [2] * Update docs to mark clusters as deprecated * Remove testing of clusters [1] https://docs.gitlab.com/ee/api/project_clusters.html [2] https://gitlab.com/groups/gitlab-org/configure/-/epics/8
| * chore(topics): 'title' is required when creating a topicJohn L. Villalovos2022-07-281-2/+9
| | | | | | | | In GitLab >= 15.0 `title` is required when creating a topic.
* | test: add test to show issue fixedJohn L. Villalovos2022-07-271-0/+13
| | | | | | | | | | https://github.com/python-gitlab/python-gitlab/issues/1698 has been fixed. Add test to show that.
* | fix: use the [] after key names for array variables in `params`John L. Villalovos2022-07-271-0/+5
|/ | | | | | | | | | | | | | | | | | 1. If a value is of type ArrayAttribute then append '[]' to the name of the value for query parameters (`params`). This is step 3 in a series of steps of our goal to add full support for the GitLab API data types[1]: * array * hash * array of hashes Step one was: commit 5127b1594c00c7364e9af15e42d2e2f2d909449b Step two was: commit a57334f1930752c70ea15847a39324fa94042460 Fixes: #1698 [1] https://docs.gitlab.com/ee/api/#encoding-api-parameters-of-array-and-hash-types
* test(ee): add an EE specific testJohn L. Villalovos2022-07-251-4/+6
|
* feat(namespaces): add support for namespace existence APINejc Habjan2022-07-241-3/+11
|
* 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-213-9/+29
|
* chore: enable mypy check `strict_equality`John L. Villalovos2022-07-191-2/+14
| | | | Enable the `mypy` `strict_equality` check.
* test(functional): replace len() calls with list membership checksNejc Habjan2022-07-0314-172/+163
|
* 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
|
* feat(users): add ban and unban methodsAntoine Auger2022-06-131-0/+10
|
* test: increase client coverageNejc Habjan2022-06-021-0/+15
|
* 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`.
* feat(api): re-add topic delete endpointNejc Habjan2022-04-011-0/+3
| | | | This reverts commit e3035a799a484f8d6c460f57e57d4b59217cd6de.
* test(functional): fix GitLab configuration to support paginationJohn L. Villalovos2022-02-052-3/+3
| | | | | | | | | | | | 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-031-1/+28
|
* 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
|