Closed
Bug 1078659
Opened 10 years ago
Closed 10 years ago
Rewrite bzpost tests to use Dockerized BMO
Categories
(Developer Services :: Mercurial: bzpost, defect)
Developer Services
Mercurial: bzpost
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: gps, Assigned: gps)
References
Details
Attachments
(2 files)
10.62 KB,
patch
|
glandium
:
review+
|
Details | Diff | Splinter Review |
7.90 KB,
patch
|
glandium
:
review+
|
Details | Diff | Splinter Review |
We can now run a BMO instance from Docker during tests. Tests can thus send actual HTTP requests. Let's rewrite bzpost's tests to hit an actual BMO server instead of mocking things.
Assignee | ||
Comment 1•10 years ago
|
||
Now that we can run a local BMO instance via Docker, we convert the bzpost tests to use it. This initial patch does the conversion by setting up a BMO instance, creating empty bugs, and changing the bugs referenced in the existing tests. This results in hashes changing, which results in more test churn than would be desirable. Since we no longer use mocks.py as part of the test, we remove it and the hack in local-mozilla-repos.py to have all requests-driven HTTP requests be mocked, which mocks.py was the only consumer of.
Attachment #8500621 -
Flags: review?(mh+mozilla)
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → gps
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•10 years ago
|
||
As part of 1e900584cb2d, we added logging code to the bzpost extension to facilitate testing. This was to work around testing deficiency around use of mocks. Now that we run a local BMO instance as part of the tests, we can dump the state of BMO as part of tests. This is a better method of testing than mocking because we are actually testing that Bugzilla is updated, not just that we think we're updating Bugzilla. So, we remove the code for dumping what comments Bugsy is writing and replace it with dumping of actual Bugzilla state.
Attachment #8500622 -
Flags: review?(mh+mozilla)
Comment 3•10 years ago
|
||
Comment on attachment 8500621 [details] [diff] [review] bzpost: convert tests to docker () Review of attachment 8500621 [details] [diff] [review]: ----------------------------------------------------------------- LGTM, but I'm not convinced this is something we need done. To me, this only adds a lot of overhead to test bugsy, which should be tested on its own, not through things using it. I'll also note this: what's the point of getting review on this when there's been no review whatsoever on the related docker stuff that landed. ::: hgext/bzpost/tests/test-post.t @@ +1,2 @@ > #require docker > $ $TESTDIR/testing/docker-control.py build-bmo This is not in version-control-tools.
Attachment #8500621 -
Flags: review?(mh+mozilla) → review+
Comment 4•10 years ago
|
||
Comment on attachment 8500622 [details] [diff] [review] bzpost: remove old logging of bug activity () Review of attachment 8500622 [details] [diff] [review]: ----------------------------------------------------------------- Same remark as for the other patch. ::: hgext/bzpost/tests/test-post.t @@ +78,5 @@ > + > + $ $TESTDIR/testing/bugzilla.py dump-bug 1 > + Bug 1: > + comments: > + - {id: 1, text: ''} Why are there empty comments all around the place?
Attachment #8500622 -
Flags: review?(mh+mozilla) → review+
Assignee | ||
Comment 5•10 years ago
|
||
The empty initial comments are because the create bug helper doesn't create an initial bug comment by default.
Assignee | ||
Comment 6•10 years ago
|
||
https://hg.mozilla.org/hgcustom/version-control-tools/rev/41a4ffcd64e0 https://hg.mozilla.org/hgcustom/version-control-tools/rev/28336e80513f
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•