summaryrefslogtreecommitdiff
path: root/tests/functional
Commit message (Collapse)AuthorAgeFilesLines
* feat: add basic GraphQL support (wip)feat/graphqlNejc Habjan2022-12-112-0/+23
|
* 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-012-1/+24
|
* fix: use POST method and return dict in ↵John Villalovos2022-10-312-1/+32
| | | | | | | | | | | | | | `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
|
* chore: add basic typing to functional testsNejc Habjan2022-10-272-6/+9
|
* test: fix `test_project_push_rules` testJohn L. Villalovos2022-10-181-4/+9
| | | | Make the `test_project_push_rules` test work.
* chore: revert compose upgradeNejc Habjan2022-10-181-5/+0
| | | | This reverts commit f825d70e25feae8cd9da84e768ec6075edbc2200.
* test: enable skipping tests per GitLab planNejc Habjan2022-10-187-23/+49
|
* refactor: migrate legacy EE tests to pytestNejc Habjan2022-10-189-165/+173
|
* refactor: pytest-docker fixturesLiora Milbaum2022-10-163-25/+31
|
* fix: use epic id instead of iid for epic notesShreya2022-10-161-0/+7
|
* refactor(deps): drop compose v1 dependency in favor of v2Nejc Habjan2022-10-151-0/+5
|
* chore: topic functional testsLiora Milbaum2022-10-151-5/+11
|
* chore: fix flaky testJohn L. Villalovos2022-10-091-4/+3
|
* fix(cli): handle list response for json/yaml outputJohn L. Villalovos2022-10-061-0/+44
| | | | | | | | | Handle the case with the CLI where a list response is returned from GitLab and json/yaml output is requested. Add a functional CLI test to validate it works. Closes: #2287
* fix: intermittent failure in test_merge_request_reset_approvalsJohn L. Villalovos2022-10-052-2/+4
| | | | | | | | | | 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-054-13/+8
| | | | | 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-223-6/+13
| | | | | | | | | * 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
|
* feat(client): warn user on misconfigured URL in `auth()`Nejc Habjan2022-08-041-0/+1
|
* Merge pull request #2188 from python-gitlab/jlvillal/fix_functional_ciNejc Habjan2022-07-292-11/+71
|\ | | | | test: attempt to make functional test startup more reliable
| * test: attempt to make functional test startup more reliableJohn L. Villalovos2022-07-292-11/+71
| | | | | | | | | | | | | | | | | | | | | | | | The functional tests have been erratic. Current theory is that we are starting the tests before the GitLab container is fully up and running. * Add checking of the Health Check[1] endpoints. * Add a 20 second delay after we believe it is up and running. * Increase timeout from 300 to 400 seconds [1] https://docs.gitlab.com/ee/user/admin_area/monitoring/health_check.html
* | Merge pull request #2194 from python-gitlab/jlvillal/update-gitlabNejc Habjan2022-07-294-47/+29
|\ \ | |/ |/| 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-282-2/+28
| | | | | | | | In GitLab >= 15.0 `title` is required when creating a topic.
| * test(functional): bump GitLab docker image to 15.2.0-ee.0John L. Villalovos2022-07-271-1/+1
| | | | | | | | Use the GitLab docker image 15.2.0-ee.0 in the functional testing.
* | test(cli): add tests for token scopesNejc Habjan2022-07-282-0/+46
| |
* | feat(cli): add a custom help formatterWaldek Maleska2022-07-281-0/+12
| | | | | | | | | | | | | | | | | | | | Add a custom argparse help formatter that overrides the output format to list items vertically. The formatter is derived from argparse.HelpFormatter with minimal changes. Co-authored-by: John Villalovos <john@sodarock.com> Co-authored-by: Nejc Habjan <nejc.habjan@siemens.com>
* | 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: always ensure clean config environmentNejc Habjan2022-07-261-5/+1
|
* chore: revert "test(functional): simplify token creation"Nejc Habjan2022-07-262-4/+26
| | | | This reverts commit 67ab24fe5ae10a9f8cc9122b1a08848e8927635d.
* test(ee): add an EE specific testJohn L. Villalovos2022-07-252-5/+11
|
* chore: enable using GitLab EE in functional testsJohn L. Villalovos2022-07-254-3/+79
| | | | | | Enable using GitLab Enterprise Edition (EE) in the functional tests. This will allow us to add functional tests for EE only features in the functional tests.
* 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
|