Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About 3.0.6 #44

Closed
wants to merge 16 commits into from
Closed

About 3.0.6 #44

wants to merge 16 commits into from

Conversation

qchai
Copy link

@qchai qchai commented Apr 26, 2018

Hi, when I commit a review request, I specify the reviewer people ping.ni, but another people jun.he can ship it. I do not know why, can you give me the answer.
Thank you for your attention.
clipboard

chipx86 and others added 16 commits April 10, 2018 15:26
These new utilities make it easier to test HTTP requests and responses
dealing with multiple paths, and simple responses payloads or errors
with custom headers. It does this through a `make_handler_for_paths()`
function that takes in a dictionary of information and returns a method
to pass to `setup_http_test()`.

It also adds a `dump_json()` method that wraps `json.dumps()` and
returns a bytestring, helping deal with Python 2/3 compatibility.

Testing Done:
Used these new methods in upcoming unit tests, which pass.

Reviewed at https://reviews.reviewboard.org/r/9857/
The code that generates form data payloads for HTTP POST requests for
hosting services resulted in payloads that weren't easy to test against.
The fields were listed in dictionary iteration order, which varied
between Python 2 and 3. We also didn't have a great place to spy on
the boundary generator, since `mimetools.choose_boundary()` is no more
on Python 3.

This change improves testability by wrapping
`mimetools.choose_boundary()`, giving us a stable function to spy on,
and by sorting the data going into the payload so it's more predictable.

Testing Done:
Unit tests pass.

Tested this along with other upcoming changes that test these payloads.

Reviewed at https://reviews.reviewboard.org/r/9869/
This updates the GitHub 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.

Testing Done:
Unit tests pass.

Reviewed at https://reviews.reviewboard.org/r/9871/
This updates the RB-Gateway 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.

Testing Done:
Unit tests pass.

Reviewed at https://reviews.reviewboard.org/r/9870/
This updates the Kiln 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.

Testing Done:
Unit tests pass.

Reviewed at https://reviews.reviewboard.org/r/9770/
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.

Testing Done:
Unit tests pass.

Reviewed at https://reviews.reviewboard.org/r/9772/
This updates the Bitbucket 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.

Testing Done:
Unit tests pass.

Reviewed at https://reviews.reviewboard.org/r/9778/
This updates the CodebaseHQ 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.

Testing Done:
Unit tests pass.

Reviewed at https://reviews.reviewboard.org/r/9777/
This updates the Unfuddle 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.

Testing Done:
Unit tests pass.

Reviewed at https://reviews.reviewboard.org/r/9868/
This updates the Beanstalk 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.

Testing Done:
Unit tests pass.

Reviewed at https://reviews.reviewboard.org/r/9779/
This updates the Assembla test suite to use the new helpers for hosting
service unit tests, which provide better, more consistent checks with
simpler code and less private method usage. It also raises better
messages when skipping tests due to lack of Perforce support.

Testing Done:
Unit tests pass.

Reviewed at https://reviews.reviewboard.org/r/9780/
This updates the Gerrit 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.

Testing Done:
Unit tests pass.

Reviewed at https://reviews.reviewboard.org/r/9775/
The new Gerrit support was originally written and tested with an older
version of Gerrit, which used HTTP Digest Auth. Newer versions now use
Basic Auth exclusively, which prevented any communication with the API.
Adding both a pre-filled Basic Auth header and registering for Digest
Auth enables us to support both.

There was also a problem with the repository form. If any validation
errors were hit with the URL, the page would crash, since `clean()` was
assuming the presence of a cleaned URL. This is now checked for presence
before basing anything off the URL.

Unit tests were added for these scenarios.

Testing Done:
Manually tested with Gerrit 2.13.11 (last to support Digest Auth) and
2.4.13 (which uses Basic Auth) to ensure that accounts could be linked,
repositories saved, and files fetched.

Manually tested the form with invalid URLs to make sure a valid error
was shown, instead of the page crashing.

Unit tests pass.

Reviewed at https://reviews.reviewboard.org/r/9872/
The memcached statistics code is pretty old, and has a lot of warts. One
of those warts is that hostnames without ports would lead to crashes,
and another is that "STAT" lines containing a name but not a value would
as well. A third is that we had to use the Django memcached backend to
get memcached stats.

This change fixes those three issues, and updates some of the syntax and
docs for the file.

The stats code is still very limited (other backends can't provide
stats, and we're assuming a lot about the data), but this will be
addressed separately.

Testing Done:
Tested all the failure conditions I previously hit (lack of port causing
a crash, lack of value in a "STAT" line, and lack of stats for a custom
memcached backend).

Unit tests were _not_ added, due to a planned redesign, which the tests
would not survive.

Reviewed at https://reviews.reviewboard.org/r/9878/
The "enable search" field was missing a space in its help text (which
was missed due to wrapping a multi-line string). This has been
rectified.

Testing Done:
Viewed the admin UI and verified the text.

Reviewed at https://reviews.reviewboard.org/r/9879/
@chipx86
Copy link
Member

chipx86 commented Apr 26, 2018

You probably wanted to post to our community support list, not open a pull request.

The short answer is that the Reviewers list is for specifying people you want to review your code, but does not restrict reviews to those users. We provide an inclusive model where anyone with feedback can contribute to the review process. Companies that want to restrict things can lock down with private repositories, invite-only groups, or extensions that alter the review behavior (this is a more advanced capability).

@chipx86 chipx86 closed this Apr 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants