summaryrefslogtreecommitdiff
path: root/tests/functional/conftest.py
Commit message (Collapse)AuthorAgeFilesLines
* feat(api): add application statisticsShreya2022-11-011-1/+12
|
* fix: use POST method and return dict in ↵John Villalovos2022-10-311-1/+16
| | | | | | | | | | | | | | `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 typing to functional testsNejc Habjan2022-10-271-3/+4
|
* test: enable skipping tests per GitLab planNejc Habjan2022-10-181-14/+21
|
* refactor: migrate legacy EE tests to pytestNejc Habjan2022-10-181-0/+7
|
* refactor: pytest-docker fixturesLiora Milbaum2022-10-161-25/+1
|
* refactor(deps): drop compose v1 dependency in favor of v2Nejc Habjan2022-10-151-0/+5
|
* chore: simplify `wait_for_sidekiq` usageJohn L. Villalovos2022-10-051-1/+2
| | | | | Simplify usage of `wait_for_sidekiq` by putting the assert if it timed out inside the function rather than after calling it.
* chore: bump GitLab docker image to 15.4.0-ee.0John L. Villalovos2022-09-221-4/+11
| | | | | | | | | * 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
* Merge pull request #2188 from python-gitlab/jlvillal/fix_functional_ciNejc Habjan2022-07-291-11/+70
|\ | | | | test: attempt to make functional test startup more reliable
| * test: attempt to make functional test startup more reliableJohn L. Villalovos2022-07-291-11/+70
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | chore(topics): 'title' is required when creating a topicJohn L. Villalovos2022-07-281-0/+19
|/ | | | In GitLab >= 15.0 `title` is required when creating a topic.
* chore: revert "test(functional): simplify token creation"Nejc Habjan2022-07-261-2/+25
| | | | This reverts commit 67ab24fe5ae10a9f8cc9122b1a08848e8927635d.
* test(ee): add an EE specific testJohn L. Villalovos2022-07-251-1/+5
|
* chore: enable using GitLab EE in functional testsJohn L. Villalovos2022-07-251-0/+23
| | | | | | 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-251-25/+2
|
* 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.
* chore: fixtures: after delete() wait to verify deletedJohn L. Villalovos2022-07-211-29/+11
| | | | | | | | | | | | 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.
* 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
* chore(ci): increase timeout for docker container to come onlineJohn L. Villalovos2022-06-241-4/+16
| | | | | Have been seeing timeout issues more and more. Increase timeout from 200 seconds to 300 seconds (5 minutes).
* feat(api): re-add topic delete endpointNejc Habjan2022-04-011-0/+2
| | | | This reverts commit e3035a799a484f8d6c460f57e57d4b59217cd6de.
* test(services): add functional tests for servicesNejc Habjan2022-02-031-0/+15
|
* chore: consistently use open() encoding and file descriptorNejc Habjan2022-01-231-2/+2
|
* chore: add EncodedId string class to use to hold URL-encoded pathsJohn L. Villalovos2022-01-131-1/+2
| | | | | | | | | 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.
* 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.
* 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.
* chore(api): temporarily remove topic delete endpointNejc Habjan2021-12-111-2/+0
| | | | It is not yet available upstream.
* feat(api): add support for Topics APINejc Habjan2021-12-111-0/+2
|
* chore(tests): apply review suggestionsNejc Habjan2021-11-281-3/+3
|
* test(cli): improve basic CLI coveragetest/cli-coverageNejc Habjan2021-11-271-10/+10
|
* chore: rename `master` branch to `main`chore/master-to-mainNejc Habjan2021-10-111-1/+1
| | | | | BREAKING CHANGE: As of python-gitlab 3.0.0, the default branch for development has changed from `master` to `main`.
* 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(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(functional): optionally keep containers running post-testsBen Brown2021-06-011-0/+23
| | | | | | 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.
* chore: rename 'tools/functional/' to 'tests/functional/'John L. Villalovos2021-05-261-0/+462
Rename the 'tools/functional/' directory to 'tests/functional/' This makes more sense as these are functional tests and not tools. This was dicussed in: https://github.com/python-gitlab/python-gitlab/discussions/1468