summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
| * chore(topics): 'title' is required when creating a topicJohn L. Villalovos2022-07-283-3/+32
| | | | | | | | 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-274-12/+77
|/ | | | | | | | | | | | | | | | | | 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
* feat: add support for iterations APINejc Habjan2022-07-271-0/+47
|
* feat(groups): add support for shared projects APINejc Habjan2022-07-261-0/+38
|
* test: always ensure clean config environmentNejc Habjan2022-07-264-19/+29
|
* 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(issues): add support for issue reorder APINejc Habjan2022-07-241-0/+20
|
* feat(namespaces): add support for namespace existence APINejc Habjan2022-07-241-3/+11
|
* test: fix broken test if user had config filesJohn L. Villalovos2022-07-231-1/+6
| | | | | | | Use `monkeypatch` to ensure that no config files are reported for the test. Closes: #2172
* feat: add support for group and project invitations APINejc Habjan2022-07-231-0/+159
|
* feat(projects): add support for project restore APINejc Habjan2022-07-231-0/+17
|
* refactor: migrate services to integrationsNejc Habjan2022-07-231-25/+31
|
* fix(runners): fix listing for /runners/allNejc Habjan2022-07-231-1/+12
|
* fix(config): raise error when gitlab id provided but no config section foundNejc Habjan2022-07-221-1/+6
|
* fix(config): raise error when gitlab id provided but no config file foundNejc Habjan2022-07-221-0/+6
|
* 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
|
* fix: add `get_all` param (and `--get-all`) to allow passing `all` to APINejc Habjan2022-07-219-71/+111
|
* Merge pull request #1872 from python-gitlab/jlvillal/as_dictNejc Habjan2022-07-201-0/+97
|\ | | | | feat: add `asdict()` and `to_json()` methods to Gitlab Objects
| * feat: add `asdict()` and `to_json()` methods to Gitlab ObjectsJohn L. Villalovos2022-07-201-8/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an `asdict()` method that returns a dictionary representation copy of the Gitlab Object. This is a copy and changes made to it will have no impact on the Gitlab Object. The `asdict()` method name was chosen as both the `dataclasses` and `attrs` libraries have an `asdict()` function which has the similar purpose of creating a dictionary represenation of an object. Also add a `to_json()` method that returns a JSON string representation of the object. Closes: #1116
| * fix: results returned by `attributes` property to show updatesJohn L. Villalovos2022-07-201-0/+26
| | | | | | | | | | | | | | | | | | Previously the `attributes` method would show the original values in a Gitlab Object even if they had been updated. Correct this so that the updated value will be returned. Also use copy.deepcopy() to ensure that modifying the dictionary returned can not also modify the object.
* | chore: add a `lazy` boolean attribute to `RESTObject`John L. Villalovos2022-07-201-0/+43
|/ | | | | | | | This can be used to tell if a `RESTObject` was created using `lazy=True`. Add a message to the `AttributeError` if attribute access fails for an instance created with `lazy=True`.
* test: add more tests for container registriesNejc Habjan2022-07-201-4/+50
|
* feat(groups): add support for group-level registry repositoriesNejc Habjan2022-07-201-0/+47
|
* chore: enable mypy check `strict_equality`John L. Villalovos2022-07-191-2/+14
| | | | Enable the `mypy` `strict_equality` check.
* feat: support validating CI lint resultsNejc Habjan2022-07-093-8/+102
|
* feat(cli): add support for global CI lintNejc Habjan2022-07-051-11/+33
|
* refactor(objects): move ci lint to separate fileNejc Habjan2022-07-052-46/+49
|
* feat(objects): add Project CI Lint supportJohn L. Villalovos2022-07-041-0/+46
| | | | | | Add support for validating a project's CI configuration [1] [1] https://docs.gitlab.com/ee/api/lint.html
* feat: add support for group push rulesO'Keefe, Gerard (Gerry)2022-07-041-0/+103
| | | | | | Add the GroupPushRules and GroupPushRulesManager classes. Closes: #1259
* test(functional): replace len() calls with list membership checksNejc Habjan2022-07-0314-172/+163
|
* fix: ensure path elements are escapedJohn L. Villalovos2022-07-031-1/+1
| | | | | | | Ensure the path elements that are passed to the server are escaped. For example a "/" will be changed to "%2F" Closes: #2116
* Merge pull request #2069 from antoineauger/test/unit-tests-projectsNejc Habjan2022-06-293-107/+538
|\ | | | | test(projects): add unit tests for projects
| * refactor(test-projects): apply suggestions and use fixturesAntoine Auger2022-06-291-27/+26
| |
| * refactor(test-projects): remove test_restore_projectAntoine Auger2022-06-161-5/+0
| |
| * test(projects): add unit tests for projectsAntoine Auger2022-06-163-100/+537
| |
* | Merge pull request #2110 from python-gitlab/jlvillal/mr_approval_rulesNejc Habjan2022-06-281-0/+18
|\ \ | | | | | | feat(api): add support for `get` for a MR approval rule
| * | feat(api): add support for `get` for a MR approval ruleJohn L. Villalovos2022-06-271-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | In GitLab 14.10 they added support to get a single merge request approval rule [1] Add support for it to ProjectMergeRequestApprovalRuleManager [1] https://docs.gitlab.com/ee/api/merge_request_approvals.html#get-a-single-merge-request-level-rule
* | | chore: fix misspellingJohn L. Villalovos2022-06-271-1/+1
|/ /
* | test: add tests and clean up usage for new enumsNejc Habjan2022-06-275-24/+63
| |