summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* refactor: use f-strings for string formattingrefactor/f-stringsNejc Habjan2021-11-029-33/+22
|
* fix(build): do not include docs in wheel packageNejc Habjan2021-10-311-4/+5
|
* 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>
* Merge pull request #1641 from JacobHenner/add-merge-request-approval-stateNejc Habjan2021-10-201-0/+31
|\ | | | | feat(api): add merge request approval state
| * feat(api): add merge request approval stateJacob Henner2021-10-191-0/+31
| | | | | | | | Add support for merge request approval state
* | 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>
* | fix(api): delete invalid 'project-runner get' command (#1628)Léo GATELLIER2021-10-171-13/+2
| | | | | | | | | | * fix(api): delete 'group-runner get' and 'group-runner delete' commands Co-authored-by: Léo GATELLIER <git@leogatellier.fr>
* | feat(objects): support delete package files APINejc Habjan2021-10-141-0/+18
| |
* | feat(objects): list starred projects of a userNejc Habjan2021-10-141-2/+25
| |
* | chore: rename `master` branch to `main`chore/master-to-mainNejc Habjan2021-10-1118-46/+46
|/ | | | | 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
|
* feat(objects): support Create and Revoke personal access token APINejc Habjan2021-09-131-21/+69
|
* 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 project.issuesstatisticsNejc Habjan2021-09-081-4/+0
| | | | | BREAKING CHANGE: remove deprecated project.issuesstatistics in favor of project.issues_statistics
* 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()
* refactor(objects): remove deprecated pipelines() methodNejc Habjan2021-09-081-11/+0
| | | | BREAKING CHANGE: remove deprecated pipelines() methods in favor of pipelines.list()
* feat: default to gitlab.com if no URL givenNejc Habjan2021-09-081-1/+44
| | | | | BREAKING CHANGE: python-gitlab will now default to gitlab.com if no URL is given
* Merge pull request #1486 from JohnVillalovos/jlvillal/prohibit_redirectionNejc Habjan2021-09-081-2/+89
|\ | | | | fix!: raise error if there is a 301/302 redirection
| * fix!: raise error if there is a 301/302 redirectionJohn L. Villalovos2021-09-081-2/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before we raised an error if there was a 301, 302 redirect but only from an http URL to an https URL. But we didn't raise an error for any other redirects. This caused two problems: 1. PUT requests that are redirected get changed to GET requests which don't perform the desired action but raise no error. This is because the GET response succeeds but since it wasn't a PUT it doesn't update. See issue: https://github.com/python-gitlab/python-gitlab/issues/1432 2. POST requests that are redirected also got changed to GET requests. They also caused hard to debug tracebacks for the user. See issue: https://github.com/python-gitlab/python-gitlab/issues/1477 Correct this by always raising a RedirectError exception and improve the exception message to let them know what was redirected. Closes: #1485 Closes: #1432 Closes: #1477
* | 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: convert to using type-annotations for managersJohn L. Villalovos2021-09-082-75/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Convert our manager usage to be done via type annotations. Now to define a manager to be used in a RESTObject subclass can simply do: class ExampleClass(CRUDMixin, RESTObject): my_manager: MyManager Any type-annotation that annotates it to be of type *Manager (with the exception of RESTManager) will cause the manager to be created on the object.
* | chore: improve type-hinting for managersJohn L. Villalovos2021-09-071-0/+74
|/ | | | | | | | | | | | | | | The 'managers' are dynamically created. This unfortunately means that we don't have any type-hints for them and so editors which understand type-hints won't know that they are valid attributes. * Add the type-hints for the managers we define. * Add a unit test that makes sure that the type-hints and the '_managers' attribute are kept in sync with each other. * Add unit test that makes sure specified managers in '_managers' have a name ending in 'Managers' to keep with current convention. * Make RESTObject._managers always present with a default value of None. * Fix a type-issue revealed now that mypy knows what the type is
* test(build): add smoke tests for sdist & wheel packageNejc Habjan2021-09-022-0/+33
|
* feat: allow global retry_transient_errors setupKarun Japhet2021-08-293-7/+173
| | | | | | `retry_transient_errors` can now be set through the Gitlab instance and global configuration Documentation for API usage has been updated and missing tests have been added.
* chore: fix mypy pre-commit hookNejc Habjan2021-08-225-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-273-31/+199
|\ | | | | 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-263-31/+198
| |
* | test(releases): integration for release PUTPierre Paques2021-06-261-0/+9
| |
* | test(releases): add unit-tests for release updatePierre Paques2021-06-261-0/+39
|/
* feat(api): add MR pipeline manager in favor of pipelines() methodNejc Habjan2021-06-131-0/+64
|
* fix: catch invalid type used to initialize RESTObjectJohn L. Villalovos2021-06-101-0/+5
| | | | | | | | Sometimes we have errors where we don't get a dictionary passed to RESTObject.__init__() method. This breaks things but in confusing ways. Check in the __init__() method and raise an exception if it occurs.
* fix: functional project service test (#1500)John Villalovos2021-06-093-3/+8
| | | chore: fix functional project service test
* feat: add keys endpointBen Brown2021-06-032-0/+96
|
* feat(objects): add support for Group wikis (#1484)Simon Pamies2021-06-031-0/+15
| | | feat(objects): add support for Group wikis
* test(functional): force delete users on resetBen Brown2021-06-011-1/+1
| | | | | | | Timing issues between requesting group deletion and GitLab enacting that deletion resulted in errors while attempting to delete a user which was the sole owner of said group (see: test_groups). Pass the 'hard_delete' parameter to ensure user deletion.
* test(api): fix issues testBen Brown2021-06-011-3/+3
| | | | Was incorrectly using the issue 'id' vs 'iid'.
* test(functional): explicitly remove deploy tokens on resetBen Brown2021-06-011-0/+4
| | | | | Deploy tokens would remain in the instance if the respective project or group was deleted without explicitly revoking the deploy tokens first.
* test(cli): replace assignment expressionBen Brown2021-06-011-5/+3
| | | | | This is a feature added in 3.8, removing it allows for the test to run with lower python versions.
* test(functional): optionally keep containers running post-testsBen Brown2021-06-012-1/+24
| | | | | | Additionally updates token creation to make use of `first_or_create()`, to avoid errors from the script caused by GitLab constraints preventing duplicate tokens with the same value.
* feat(objects): add support for generic packages APINejc Habjan2021-05-313-2/+165
|
* feat(api): add deployment mergerequests interfaceLudwig Weiss2021-05-301-0/+56
|
* chore: apply suggestionsNejc Habjan2021-05-301-3/+7
|
* feat(objects): support all issues statistics endpointsNejc Habjan2021-05-301-3/+22
|
* feat(objects): add support for descendant groups APINejc Habjan2021-05-292-0/+59
|
* feat(objects): add pipeline test report supportRaphaël Monat2021-05-291-1/+53
|
* chore: move 'gitlab/tests/' dir to 'tests/unit/'John L. Villalovos2021-05-2655-0/+5852
| | | | | Move the 'gitlab/tests/' directory to 'tests/unit/' so we have all the tests located under the 'tests/' directory.