Every time I try a new API with the internal project I find that it
doesn't escape the path properly. Try to get it right everywhere.
For golang/go#63147.
Change-Id: I16b4bd32f2b014208e5f058028d7212e8f436c5c
Reviewed-on: https://go-review.googlesource.com/c/build/+/542656
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Heschi Kreinick <heschi@google.com>
The tagTelemetry workflow is failing to query the `config/v0.1.0` tag of
the x/telemetry project.
Change-Id: I5bb2800f11025403ab5e1aa3a6f6e37e5d806706
Reviewed-on: https://go-review.googlesource.com/c/build/+/524435
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Use the more modern "<project>~<changeNumber>" format for a change
and properly specify the first revision.
While we are here, we add a few comments to the gerrit package
to help avoid confusion in the future.
This is a follow-up to CL 513397, which was failing to post the
new PR rule findings for a test PR with error:
2023/08/15 22:06:38 processPullRequest: importGerritChangeFromPR(golang/build#71, nil): could not add findings comment to CL for golang/build#71: HTTP status 404 Not Found on request to https://go-review.googlesource.com/a/changes/If1a8ae9e4b76a05b13139ddf9fda1cdf67b50b33/revisions/build~master~If1a8ae9e4b76a05b13139ddf9fda1cdf67b50b33/review; Not found: build~master~If1a8ae9e4b76a05b13139ddf9fda1cdf67b50b33
Updates golang/go#61573
Change-Id: Ib0fef88ae05b10e623c2c1af614aa932dbfcc043
Reviewed-on: https://go-review.googlesource.com/c/build/+/519796
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: t hepudds <thepudds1460@gmail.com>
The ListProjects and GetProjects methods were added in CL 38717 and
CL 37252 at around the same time, and they're both exposing the same
GET /projects/ Gerrit API endpoint. The latter is hardcoded to provide
the 'b' query parameter, one of many that GET /projects/ offers.
Rewrite cmd/gitmirror and cmd/updatestd to use ListProjects and N calls
to GetBranch instead, and delete GetProjects since we no longer use it.
I considered deprecating GetProjects instead of deleting, but x/build
and x/build/gerrit specifically are both documented to be for internal
Go project needs and not subject to the Go 1 compatibility promise, so
skip the overhead of doing that. If it happens to cause a problem that
can't be worked around in a better way, we'll consider re-adding it in
deprecated form. Add a pkg.go.dev link to increase visibility to the
general-purpose Gerrit API clients written in Go.
Updates golang/go#18743.
Change-Id: I583356526af04e915bce5464004eb68a650221d5
Reviewed-on: https://go-review.googlesource.com/c/build/+/518676
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
HTTP status codes in the 4xx range are known to be problems with the
request, so sending the exact same request again is doomed to create
more trouble rather than solve any problems. Disable retries instead.
Change-Id: I254d2c2dd48fa1470864545ed59e56ca6985a136
Reviewed-on: https://go-review.googlesource.com/c/build/+/482997
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Make its content available to callers, like already done in TagInfo.
Change-Id: Id3bc06d905378e89362f9e8e05e8211e87b1c084
GitHub-Last-Rev: 36e8a8686e
GitHub-Pull-Request: golang/build#34
Reviewed-on: https://go-review.googlesource.com/c/build/+/314809
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Benny Siegert <bsiegert@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Before we tag an x/ repo, we want to make sure it's green across all
first-class builders and release branches. That's a surprisingly
complicated process.
First, we need to know which release branches are live; we can get that
from the front page of the build dashboard. Then we need the results for
the individual subrepo. Then we need to decide which builders need to
pass for a CL to be considered green. *Then* we need to know which
commits are on which release branch, which the coordinator knows in some
parts of itself but forgets by the time it serves the dashboard.
Finally, we can combine all that data to find the first CL that passed
after the commit we'd like to tag. It doesn't need to be the exact
commit, in case the build happened to be broken on a non-trybot at that
time.
Given how complex all that logic is, the test is unfortunately also kind
of a mess, sorry.
For golang/go#48523.
Change-Id: I789d83c41383df291e64d466a77c86182be15537
Reviewed-on: https://go-review.googlesource.com/c/build/+/435501
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
First step: list all our projects/repositories, and select those that
have a go.mod labeling them as golang.org/x as candidates to release as
the next version, or v0.1.0 for untagged repositories.
For golang/go#48523.
Change-Id: Ice92319a0726daf3bf5f94581582d8802640dffc
Reviewed-on: https://go-review.googlesource.com/c/build/+/425088
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Heschi Kreinick <heschi@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
relui needs to use its service account to access the private security
repository, and while I'm at it it might as well use it for the public
repo too. Add support to the gerrit package and use it in relui.
I adapted this code from the Gerrit team's auth daemon:
https://gerrit.googlesource.com/gcompute-tools/+/refs/heads/master/git-cookie-authdaemon
There may be better ways to do it but this works on my machine.
For golang/go#53799.
Change-Id: Iec302f4e4e336c21258019b0c20898280e249380
Reviewed-on: https://go-review.googlesource.com/c/build/+/417215
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
Auto-Submit: Heschi Kreinick <heschi@google.com>
In the most recent release we retried the DL CL task, and it failed
because Gerrit rejected the no-op changes. Change the Gerrit client to
return no change in this case, and the surrounding tasks to tolerate it.
If this happens for the VERSION CL we will tag whatever the branch head
happens to be at the time, which seems correct to me.
For golang/go#51797.
Change-Id: Ieb69a4c96c7ebe057a53d0fca4d713dca0fc6f47
Reviewed-on: https://go-review.googlesource.com/c/build/+/411897
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Heschi Kreinick <heschi@google.com>
Auto-Submit: Heschi Kreinick <heschi@google.com>
Reviewed-by: Alex Rakoczy <alex@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
...and notice that only the one I just added is being used...
For golang/go#51797.
Change-Id: If62d643c2a0524231e88f1cde2cd4c980e63dd57
Reviewed-on: https://go-review.googlesource.com/c/build/+/411896
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
We want to make sure we're tagging what we release. Check that the
revision that we used to build the source archive (and then do
everything else) is still the branch head once the build is done, and
then that it's the parent commit of the version CL if any.
For golang/go#51797.
Fixesgolang/go#39317.
Change-Id: I718b6d03ad0de542aed9c94a585e6b052a5d986d
Reviewed-on: https://go-review.googlesource.com/c/build/+/411197
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
Auto-Submit: Heschi Kreinick <heschi@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Proceed if we're trying to write a tag that already exists and matches
the desired commit. That way, if we fail just after writing a tag, or
need to entirely restart a workflow for whatever reason, we can keep
going.
For golang/go#51797.
Change-Id: Ib2fdb13eea6f8cd6d3dd83cdc6cf7d97f12ca6f5
Reviewed-on: https://go-review.googlesource.com/c/build/+/411195
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Heschi Kreinick <heschi@google.com>
I refactored out the Gerrit-related code from MailDLCL, and added
support for waiting for submit and creating tags.
No test for creating tags but that logic has virtually nothing to it so
I think I'm okay with it?
For golang/go#51797.
Change-Id: Ia8c24536bbee27e0b7bef04769ac5a81dc3021ab
Reviewed-on: https://go-review.googlesource.com/c/build/+/408674
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Alex Rakoczy <alex@golang.org>
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
When checking whether to autosubmit a change in a stack, ignore whether
the revision of merged/abandoned parents are current (base revision ==
current revision). There are multiple reasons a merged parent may not be
current (the most obvious being that the parent change was submitted,
which increases the revision number, but the child was not rebased onto
the new revision), but as long as the change is still considered
'submittable' by gerrit (i.e. there are no merge conflicts) this should
not materially affect our decision of whether or not to submit the
change (and matches what most users will do when manually submitting a
stack).
For golang/go#48021.
Change-Id: Iceff8a88ac3638671f36175d802254788d2470fd
Reviewed-on: https://go-review.googlesource.com/c/build/+/406237
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
When a change in a stack is labelled with Auto-Submit+1, only submit
the change if all of the changes below have already been merged (or
been abandoned.) Additionally, if any of the parent changes are based on
a revision of their parent which is no longer the current revision (i.e.
in the Gerrit UI it is marked as 'Not current'), we will not submit the
change. This makes sure that changes are submitted in the expected
order.
Updates #48021
Change-Id: I9a178551843f64f8b752468ce0a091cb3cf2577d
Reviewed-on: https://go-review.googlesource.com/c/build/+/399043
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
We're using a distinct Gerrit account to post Kokoro CI results.
Add it to the list of known bots to stop treating it as a human
reviewer.
Also future-proof a little by considering any Gerrit account with the
SERVICE_USER tag to be a bot, since all bot accounts are expected¹ to
be a part of that group.
¹ https://gerrit-review.googlesource.com/Documentation/user-attention-set.html#_important_note_for_all_host_owners_project_owners_and_bot_owners
For golang/go#38906.
Change-Id: If33def5b73fdaadec81b6fdc03a0eaf3042f8095
Reviewed-on: https://go-review.googlesource.com/c/build/+/401514
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
If a CL has been labeled with "Auto-Submit", is submittable according
to Gerrit, has a positive TryBot-Result vote, and has no unresolved
comments then submit the change.
This requires adding a new gerrit.Client method for the CL submission
endpoint.
Updates golang/go#48021
Change-Id: I3d5dafd1ca25a3cac5a40d7e9a744ba12ab44cae
Reviewed-on: https://go-review.googlesource.com/c/build/+/341212
Trust: Roland Shoemaker <roland@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Also, respond to the most recent thread even if there are multiple ones
for the same commit.
This was way harder than it should be.
Change-Id: Id6868b267c019cd70e504310ecf9c79dac29a17b
Reviewed-on: https://go-review.googlesource.com/c/build/+/317971
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Filippo Valsorda <filippo@golang.org>
Trust: Katie Hockman <katie@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
Unresolved false was being omitted because false is the zero value.
Change-Id: I4b164b27e28d10d10fc192ec86c9d41046a00dfc
Reviewed-on: https://go-review.googlesource.com/c/build/+/311469
Trust: Filippo Valsorda <filippo@golang.org>
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
It's nice to have a thread for the results because it starts unresolved,
it gets marked resolved automatically if TryBots are happy, and it can
be used to discuss the failure.
Dropped the duplicate check on the beginning message because it's useful
to know the TryBots have started again when dropping TryBotResult.
Updates golang/go#39828
Change-Id: I66e8edec6dee10e8e1df2d2a6b501774ef373496
Reviewed-on: https://go-review.googlesource.com/c/build/+/310015
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
Trust: Alexander Rakoczy <alex@golang.org>
Trust: Filippo Valsorda <filippo@golang.org>
This will only show the latest one in the web UI unless "Show all
entries" is checked.
Also added the status link to the in progress failure notification, as
the previous one won't be as accessible.
Fixesgolang/go#39828
Change-Id: I9d81006ac3822a9dc0201637bbb0ce1bae860cc7
Reviewed-on: https://go-review.googlesource.com/c/build/+/310011
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
Trust: Alexander Rakoczy <alex@golang.org>
Trust: Filippo Valsorda <filippo@golang.org>
Run-TryBot: Alexander Rakoczy <alex@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Make all our package sources use Go 1.17 gofmt format
(adding //go:build lines).
Not strictly necessary but will avoid spurious changes
as files are edited.
Part of //go:build change (#41184).
See https://golang.org/design/draft-gobuild
Change-Id: I8020e066756b0cfa99ed1cb804b17e127e4151b9
Reviewed-on: https://go-review.googlesource.com/c/build/+/294417
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com>
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
update-readmes.go is updated to add a pkg.go.dev badge instead of a
godoc.org badge.
The GoDoc badge is added or changed in all READMEs by running
update-readmes.go
For golang/go#42251
Change-Id: I0c49df26a6c695f938c98c9a7b26325d991b3cfb
Reviewed-on: https://go-review.googlesource.com/c/build/+/276032
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
The Gerrit UI has changed its default behavior when leaving top-level
comments on a CL. Previously, that text was a part of the CL-scoped
messages, but now it is located in a patchset-level inline comment.
This change updates the logic in maintapi to look for TRY= comments
in the new place. This requires making an additional Gerrit API call
to the new ListChangeComments endpoint, because the inline comment
data is not tracked by the maintner corpus, and it can't be fetched
via the existing QueryChanges API call.
Start using the patch set number as returned by the Gerrit API,
instead of parsing it out of the message prefix with a regexp,
as this is simpler and should be more robust.
Document and simplify tryWorkItem slightly by removing support for
nil *gerrit.ChangeInfo. This was only needed for tests, but it's easy
to adjust tests to not depend on this. That makes the code in the
helper less indented and less complicated.
During these changes, the unintentional pitfall where the TRY= comment
had to be preceded by a blank link has also been removed. It only needs
to be on its own line now, as it was likely originally intended.
Fixesgolang/go#40106.
Fixesgolang/go#38747.
Change-Id: I64e85c18fefc23e1796de61dd8ba7025ea411706
Reviewed-on: https://go-review.googlesource.com/c/build/+/241323
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Using "https://go.googlesource.com" without "-review" as the Gerrit API
URL no longer works. Use "https://go-review.googlesource.com" instead.
This is the canonical Gerrit API URL for the Go project, and it's
already being used in many other places in x/build.
Return and handle errors from gerritMetaMap. Make it so gitmirror treats
an error from gerritMetaMap on startup as fatal, otherwise it would have
started in an incorrect state. While running, skip transient errors from
gerritMetaMap as before, but also log them when they happen.
Remove unneeded trailing slashes from the Gerrit API URLs in packages
maintner/maintnerd and maintner/maintnerd/maintapi for consistency.
This is a no-op as the gerrit client library used to trim them anyway.
Fixesgolang/go#32931
Change-Id: Icc20b798946d6317ee89533691f92b1f4d1564f0
Reviewed-on: https://go-review.googlesource.com/c/build/+/184922
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
For details, see
https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#change-info
Note that the field Mergable has been renamed Mergeable,
and its JSON tag has been corrected from mergable to mergeable.
If this breaks any existing code using the gerrit package,
that code should be examined, since it has never seen a
mergeable change as actually mergeable in the past.
Change-Id: I769abeed173c7afd7da7b1527f810d0a2db18236
Reviewed-on: https://go-review.googlesource.com/c/149239
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Makes it easier for users of the ListFiles() API to evaluate Status in
FileInfo objects.
Change-Id: I974fefc9ce0fc539cd678f77899630e91f68d5b9
GitHub-Last-Rev: 352dc73960
GitHub-Pull-Request: golang/build#14
Reviewed-on: https://go-review.googlesource.com/c/145657
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Look for changes that haven’t had any human aside from the author
on them and assign reviewers/CCs based on entries in golang.org/s/owners.
If no owners can be found, the tag 'no-owners' is added to the
change to prevent gopherbot from making unneeded API calls.
Also updates gopherbot's Dockerfile to use 1.11 and update deps.
Change-Id: I2650a10dd324532d86bc902be419c5f29ae980db
Reviewed-on: https://go-review.googlesource.com/121018
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
When git has no http cookies, the request for http cookies
will fail because git will exit(1). Ignore this failure
because the output is properly tested either way. This allows
authentication to fallthrough to the netrc lookup.
Correct the netrc lookup under windows. git reads the netrc
file as "_netrc" in the users home directory.
Add a warning at the end of the function that no authentication
was set.
Fixesgolang/go#26782
Change-Id: I0ba94ff7fa4b6038d6117156dcc729ddf4616fdc
Reviewed-on: https://go-review.googlesource.com/127855
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
QueryChangesOpt has now a new pagination field Start for the number of first changes to skip, as it was already implemented for QueryAccountsOpt.
Fixesgolang/go#24838
Change-Id: If779a404f256aca1924ce2412c79b821f4f9f639
GitHub-Last-Rev: aa79a753b6
GitHub-Pull-Request: golang/build#8
Reviewed-on: https://go-review.googlesource.com/122584
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
When a Gerrit change moves into a "closed" state (merged or abandoned),
close the linked GitHub Pull Request with the appropriate message.
If the change has been merged, there is no need to mention the commit
in the message on the PR because the commit message will be linked
from the PR by virtue of the GitHub-Pull-Request: git label. See
https://github.com/golang/scratch/pull/2#issuecomment-358105675 for
an example.
Closed changes are also be cleaned up within b.pendingCLs.
Also removes a nil pointer dereference in the case where the
Gerrit CL does not exist yet, surmising its link from the output
of the push command.
Updates golang/go#18517
Change-Id: Ieb28c1b9d31216d48076b256bf6a65a099a38552
Reviewed-on: https://go-review.googlesource.com/87915
Reviewed-by: Ian Lance Taylor <iant@golang.org>
"go vet" now runs when the tests run, and errors on this test.
Change-Id: I239f23f51477530e4bda19793979e519fa371cdf
Reviewed-on: https://go-review.googlesource.com/80302
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Gerrit accepts an optional message that one can use to specify
why they’re abandoning a change. Allow a caller to utilize that.
Change-Id: I16924611275c71c164f796362ea523f05834f4a7
Reviewed-on: https://go-review.googlesource.com/67010
Reviewed-by: Kevin Burke <kev@inburke.com>
Added support for querying accounts in Gerrit. This is a pre-requisite
for golang/go#21216
Change-Id: Ic6776ddf18a23e347d0eb7edf91a934d2feb01c9
Reviewed-on: https://go-review.googlesource.com/61970
Reviewed-by: Kevin Burke <kev@inburke.com>
This mirrors TimeStamp.UnmarshalJSON. Helps in emulating a Gerrit server
in integration tests.
Add tests for TimeStamp.UnmarshalJSON and .MarshalJSON.
Fixesgolang/go#21261
Change-Id: I972164c35308f5c5c46cf68847d52da2475182c3
Reviewed-on: https://go-review.googlesource.com/52471
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
We changed the API for this but I forgot to update the tests to match
the new API.
Change-Id: If31536655d99bcc403c9095198092693a05c4f02
Reviewed-on: https://go-review.googlesource.com/48598
Reviewed-by: Kevin Burke <kev@inburke.com>