summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* chore(build): use pypa build and consolidate meta testsNejc Habjan2022-08-052-10/+8
|
* chore: consolidate license and authorsNejc Habjan2022-08-047-122/+0
|
* feat(client): warn user on misconfigured URL in `auth()`Nejc Habjan2022-08-042-1/+24
|
* test(unit): reproduce duplicate encoded query paramsNejc Habjan2022-08-041-0/+18
|
* fix: optionally keep user-provided base URL for pagination (#2149)Omar Mochtar2022-08-031-0/+55
|
* 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 #2157 from python-gitlab/jlvillal/mypy_step_by_stepNejc Habjan2022-07-292-2/+3
|\ \ | | | | | | chore: enable mypy check `warn_return_any`
| * | chore: enable mypy check `warn_return_any`John L. Villalovos2022-07-282-2/+3
| |/ | | | | | | Update code so that the `warn_return_any` check passes.
* | Merge pull request #2201 from python-gitlab/jlvillal/encoding_warningNejc Habjan2022-07-293-3/+4
|\ \ | | | | | | chore: make code PEP597 compliant
| * | chore: make code PEP597 compliantJohn L. Villalovos2022-07-283-3/+4
| |/ | | | | | | | | | | Use `encoding="utf-8"` in `open()` and open-like functions. https://peps.python.org/pep-0597/
* | Merge pull request #2194 from python-gitlab/jlvillal/update-gitlabNejc Habjan2022-07-295-48/+33
|\ \ | |/ |/| 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-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
|