| 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)
|
| })
|
| })
|
| })
|
|
|