Update the GitLab tests to use the new hosting service test helpers.
Review Request #9772 — Created March 13, 2018 and submitted
This updates the GitLab test suite to use the new helpers for hosting
service unit tests, which provide better, more consistent checks with
simpler code. The results of all HTTP requests are checked, ensuring
we're calling what we expect and that behavior doesn't change in the
future.It also fleshes out the test suite, ensuring we have matching tests for
both GitLab API v3 and v4.
Unit tests pass.
- Change Summary:
-
Updated some function names.
- Commit:
-
912678a27d383a6ec962927270922d94136486b94334e9f95c7125d0a6f3ae4d75e5242c9d244d0e
- Diff:
-
Revision 2 (+567 -249)
Checks run (2 succeeded)
- Change Summary:
-
Changed the
self
argument of_http_request
functions toclient
. - Commit:
-
4334e9f95c7125d0a6f3ae4d75e5242c9d244d0e85e4659dd180ebfc745aaa219724c9ef7e93d882
- Diff:
-
Revision 3 (+567 -249)
Checks run (2 succeeded)
- Change Summary:
-
- Made URL request checks more strict.
- Hard-coded the API version for a couple of checks to reduce the number of requests.
- Commit:
-
85e4659dd180ebfc745aaa219724c9ef7e93d882dcb1f970ff1162b288a818d01b15c12fc646d7d4
- Diff:
-
Revision 4 (+573 -249)
Checks run (2 succeeded)
- Change Summary:
-
Rebuilt this change to use the new hosting service test architecture.
- Summary:
-
Update the GitLab tests to better check HTTP requests and fix missing checks.Update the GitLab tests to use the new hosting service test helpers.
- Description:
-
~ This updates the GitLab test suite to check all the HTTP requests
~ performed, ensuring that we're calling each API we expect with the ~ correct data in the correct order, and to ensure that payloads are sent ~ as bytes and not Unicode strings. ~ This updates the GitLab test suite to use the new helpers for hosting
~ service unit tests, which provide better, more consistent checks with ~ simpler code. The results of all HTTP requests are checked, ensuring ~ we're calling what we expect and that behavior doesn't change in the + future. ~ It also fixes some missing checks for repositories on GitLab API v4. It
~ looks like the recent fixes just left out a chunk of code. While fixing ~ It also fleshes out the test suite, ensuring we have matching tests for
~ both GitLab API v3 and v4. - this, I took some more of the common bits of logic between API v3 and v4 - tests and put them in common functions. - - Docstrings for tests and utility functions have also been added/updated
- to better fit modern docstring formats. - Commit:
-
dcb1f970ff1162b288a818d01b15c12fc646d7d406799a9074eb4d5630ee906c93f0c7925fda6482
- Diff:
-
Revision 5 (+690 -700)