summaryrefslogtreecommitdiff
path: root/tests/functional
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Merge pull request #1786 from python-gitlab/jlvillal/loggingNejc Habjan2022-01-091-16/+46
|\ | | | | test: add logging to `tests/functional/conftest.py`
| * chore: add logging to `tests/functional/conftest.py`John L. Villalovos2022-01-081-16/+46
| | | | | | | | | | | | | | | | | | | | I have found trying to debug issues in the functional tests can be difficult. Especially when trying to figure out failures in the CI running on Github. Add logging to `tests/functional/conftest.py` to have a better understanding of what is happening during a test run which is useful when trying to troubleshoot issues in the CI.
* | fix: remove custom URL encodingJohn L. Villalovos2022-01-081-2/+6
|/ | | | | | | | | | We were using `str.replace()` calls to take care of URL encoding issues. Switch them to use our `utils._url_encode()` function which itself uses `urllib.parse.quote()` Closes: #1356
* fix: remove default arguments for mergerequests.merge()John L. Villalovos2022-01-081-1/+3
| | | | | | | | | | The arguments `should_remove_source_branch` and `merge_when_pipeline_succeeds` are optional arguments. We should not be setting any default value for them. https://docs.gitlab.com/ee/api/merge_requests.html#accept-mr Closes: #1750
* fix(cli): url-encode path components of the URLJohn L. Villalovos2022-01-083-11/+49
| | | | | | | | | | | | | In the CLI we need to make sure the components put into the path portion of the URL are url-encoded. Otherwise they will be interpreted as part of the path. For example can specify the project ID as a path, but in the URL it must be url-encoded or it doesn't work. Also stop adding the components of the path as query parameters in the URL. Closes: #783 Closes: #1498
* chore: fix functional test failure if config presentJohn L. Villalovos2022-01-081-5/+4
| | | | | Previously c8256a5933d745f70c7eea0a7d6230b51bac0fbc was done to fix this but it missed two other failures.
* chore: add functional test of mergerequest.get()jlvillal/test_1425John L. Villalovos2022-01-031-0/+16
| | | | | | | Add a functional test of test mergerequest.get() and mergerequest.get(..., lazy=True) Closes: #1425
* chore: add test case to show branch name with period worksjlvillal/dot_branchJohn L. Villalovos2022-01-031-0/+17
| | | | | | | Add a test case to show that a branch name with a period can be fetched with a `get()` Closes: #1715
* feat(cli): allow options from args and environment variablesNejc Habjan2022-01-021-10/+69
| | | | | | | | BREAKING-CHANGE: The gitlab CLI will now accept CLI arguments and environment variables for its global options in addition to configuration file options. This may change behavior for some workflows such as running inside GitLab CI and with certain environment variables configured.
* chore: fix functional test failure if config presentjlvillal/cli_testJohn L. Villalovos2022-01-011-4/+8
| | | | | | | Fix functional test failure if config present and configured with token. Closes: #1791
* chore: ensure reset_gitlab() succeedsJohn L. Villalovos2021-12-281-0/+30
| | | | | | | | | Ensure reset_gitlab() succeeds by waiting to make sure everything has been deleted as expected. If the timeout is exceeded fail the test. Not using `wait_for_sidekiq` as it didn't work. During testing I didn't see any sidekiq processes as being busy even though not everything was deleted.
* Merge pull request #1782 from python-gitlab/jlvillal/repository_func_testsNejc Habjan2021-12-281-0/+4
|\ | | | | chore: skip a functional test if not using >= py3.9
| * chore: skip a functional test if not using >= py3.9jlvillal/repository_func_testsJohn L. Villalovos2021-12-261-0/+4
| | | | | | | | | | One of the tests requires Python 3.9 or higher to run. Mark the test to be skipped if running Python less than 3.9.
* | chore: update version in docker-compose.ymljlvillal/docker_composeJohn L. Villalovos2021-12-261-1/+1
|/ | | | | | | | | | | When running with docker-compose on Ubuntu 20.04 I got the error: $ docker-compose up ERROR: The Compose file './docker-compose.yml' is invalid because: networks.gitlab-network value Additional properties are not allowed ('name' was unexpected) Changing the version in the docker-compose.yml file fro '3' to '3.5' resolved the issue.
* feat(api): support file format for repository archiveMax Ludwig2021-12-211-2/+25
|
* feat(cli): do not require config file to run CLIfeat/cli-without-config-fileNejc Habjan2021-12-131-0/+39
| | | | | | | | | | | BREAKING CHANGE: A config file is no longer needed to run the CLI. python-gitlab will default to https://gitlab.com with no authentication if there is no config file provided. python-gitlab will now also only look for configuration in the provided PYTHON_GITLAB_CFG path, instead of merging it with user- and system-wide config files. If the environment variable is defined and the file cannot be opened, python-gitlab will now explicitly fail.
* test(api): fix current user mail count in newer gitlabNejc Habjan2021-12-111-2/+2
|
* chore(api): temporarily remove topic delete endpointNejc Habjan2021-12-112-5/+0
| | | | It is not yet available upstream.
* feat(api): add support for Topics APINejc Habjan2021-12-113-1/+24
|
* chore: use constants from gitlab.const moduleJohn L. Villalovos2021-11-302-3/+3
| | | | | Have code use constants from the gitlab.const module instead of from the top-level gitlab module.
* chore(tests): apply review suggestionsNejc Habjan2021-11-281-3/+3
|
* test(cli): improve basic CLI coveragetest/cli-coverageNejc Habjan2021-11-275-19/+68
|
* feat: add support for `projects.groups.list()`jlvillal/project_groupsJohn L. Villalovos2021-11-261-0/+18
| | | | | | Add support for `projects.groups.list()` endpoint. Closes #1717
* chore: correct test_groups.py testjlvillal/func_testJohn L. Villalovos2021-11-191-0/+4
| | | | | | | | | The test was checking twice if the same group3 was not in the returned list. Should have been checking for group3 and group4. Also added a test that only skipped one group and checked that the group was not in the returned list and a non-skipped group was in the list.
* refactor: use f-strings for string formattingNejc Habjan2021-11-055-8/+6
|
* feat(api): add project milestone promotionRaimund Hook2021-10-271-0/+21
| | | | | | Adds promotion to Project Milestones Signed-off-by: Raimund Hook <raimund.hook@exfo.com>
* feat(api): add project label promotionRaimund Hook2021-10-181-0/+24
| | | | | | Adds a mixin that allows the /promote endpoint to be called. Signed-off-by: Raimund Hook <raimund.hook@exfo.com>
* chore: rename `master` branch to `main`chore/master-to-mainNejc Habjan2021-10-116-21/+21
| | | | | BREAKING CHANGE: As of python-gitlab 3.0.0, the default branch for development has changed from `master` to `main`.
* chore(deps): upgrade gitlab-ce to 14.3.2-ce.0Nejc Habjan2021-10-081-1/+1
|
* refactor(objects): remove deprecated constants defined in objectsNejc Habjan2021-09-111-1/+1
| | | | | BREAKING CHANGE: remove deprecated constants defined in gitlab.v4.objects, and use only gitlab.const module
* refactor(objects): remove deprecated tag release APINejc Habjan2021-09-081-4/+0
| | | | | BREAKING CHANGE: remove deprecated tag release API. This was removed in GitLab 14.0
* refactor(objects): remove deprecated members.all() methodNejc Habjan2021-09-081-1/+0
| | | | | BREAKING CHANGE: remove deprecated members.all() method in favor of members_all.list()
* chore: attempt to fix flaky functional testJohn L. Villalovos2021-09-081-1/+9
| | | | | Add an additional check to attempt to solve the flakiness of the test_merge_request_should_remove_source_branch() test.
* chore: fix mypy pre-commit hookNejc Habjan2021-08-223-0/+0
|
* fix(api): do not require Release name for creationEric Davies2021-07-271-0/+18
| | | | | Stop requiring a `name` attribute for creating a Release, since a release name has not been required since GitLab 12.5.
* test(functional): add mr.merge_ref testsMatej Focko2021-07-211-0/+32
| | | | | | | - Add test for using merge_ref on non-merged MR - Add test for using merge_ref on MR with conflicts Signed-off-by: Matej Focko <mfocko@redhat.com>
* Merge pull request #1533 from sugonyak/add-group-hooksNejc Habjan2021-06-271-0/+13
|\ | | | | feat(api): add group hooks
| * chore: skip EE test case in functional testsNejc Habjan2021-06-271-0/+1
| |
| * feat(api): add group hooksIvan Sugonyak2021-06-261-0/+12
| |
* | test(releases): integration for release PUTPierre Paques2021-06-261-0/+9
|/