summaryrefslogtreecommitdiff
path: root/tests/functional/api/test_gitlab.py
Commit message (Collapse)AuthorAgeFilesLines
* feat: allow passing kwargs to Gitlab class when instantiating with ↵Liora Milbaum2022-12-041-0/+19
| | | | `from_config` (#2392)
* test: enable skipping tests per GitLab planNejc Habjan2022-10-181-0/+2
|
* refactor: migrate legacy EE tests to pytestNejc Habjan2022-10-181-0/+17
|
* 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(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-211-7/+7
|
* test(functional): replace len() calls with list membership checksNejc Habjan2022-07-031-33/+23
|
* test: add tests and clean up usage for new enumsNejc Habjan2022-06-271-3/+3
|
* test: increase client coverageNejc Habjan2022-06-021-0/+15
|
* feat(client): introduce `iterator=True` and deprecate `as_list=False` in ↵John L. Villalovos2022-05-291-3/+14
| | | | | | | | | | | `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: 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`.
* test(functional): fix GitLab configuration to support paginationJohn L. Villalovos2022-02-051-2/+2
| | | | | | | | | | | | 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
* style: use literals to declare data structuresNejc Habjan2022-01-231-1/+1
|
* chore: use constants from gitlab.const moduleJohn L. Villalovos2021-11-301-2/+2
| | | | | Have code use constants from the gitlab.const module instead of from the top-level gitlab module.
* refactor: use f-strings for string formattingNejc Habjan2021-11-051-2/+2
|
* chore: rename 'tools/functional/' to 'tests/functional/'John L. Villalovos2021-05-261-0/+183
Rename the 'tools/functional/' directory to 'tests/functional/' This makes more sense as these are functional tests and not tools. This was dicussed in: https://github.com/python-gitlab/python-gitlab/discussions/1468