Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(425)

Unified Diff: go/src/infra/appengine/test-results/model/aggregate_result_test.go

Issue 2252623002: test-results: package model: Add type TestList (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@cl-ing_upload
Patch Set: Fix renamed function call Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: go/src/infra/appengine/test-results/model/aggregate_result_test.go
diff --git a/go/src/infra/appengine/test-results/model/aggregate_result_test.go b/go/src/infra/appengine/test-results/model/aggregate_result_test.go
index 3f24db398728a514b8eeb2c4b7bd83b01bb283e2..acd54893a9a166f46d274e4c976c36ad985882d4 100644
--- a/go/src/infra/appengine/test-results/model/aggregate_result_test.go
+++ b/go/src/infra/appengine/test-results/model/aggregate_result_test.go
@@ -382,33 +382,25 @@ func TestAggregateResult(t *testing.T) {
Convey("Testing with testdata/*.json", func() {
good, err := ioutil.ReadFile(filepath.Join("testdata", "results.json"))
So(err, ShouldBeNil)
+ t := AggregateResult{}
+ So(json.Unmarshal(good, &t), ShouldBeNil)
- Convey("Absent builder", func() {
- t := AggregateResult{Builder: "non_existent_builder"}
- So(json.Unmarshal(good, &t), ShouldNotBeNil)
+ Convey("Has correct version", func() {
+ So(t.Version, ShouldEqual, 4)
})
- Convey("Existing builder", func() {
- t := AggregateResult{Builder: "win_chromium_rel_ng"}
- So(json.Unmarshal(good, &t), ShouldBeNil)
+ Convey("Marshal and Unmarshal should be inverse ops", func() {
+ var (
+ repeater = AggregateResult{Builder: "win_chromium_rel_ng"}
+ actual = AggregateResult{Builder: "win_chromium_rel_ng"}
+ )
- Convey("Has correct version", func() {
- So(t.Version, ShouldEqual, 4)
- })
-
- Convey("Marshal and Unmarshal should be inverse ops", func() {
- var (
- repeater = AggregateResult{Builder: "win_chromium_rel_ng"}
- actual = AggregateResult{Builder: "win_chromium_rel_ng"}
- )
-
- So(json.Unmarshal(good, &repeater), ShouldBeNil)
- b, err := json.Marshal(&repeater)
- So(err, ShouldBeNil)
+ So(json.Unmarshal(good, &repeater), ShouldBeNil)
+ b, err := json.Marshal(&repeater)
+ So(err, ShouldBeNil)
- So(json.Unmarshal(b, &actual), ShouldBeNil)
- So(actual, ShouldResemble, t)
- })
+ So(json.Unmarshal(b, &actual), ShouldBeNil)
+ So(actual, ShouldResemble, t)
})
})
})

Powered by Google App Engine
This is Rietveld 408576698