12199: Derate advertised node sizes by 5%.
[arvados.git] / services / ws / event_test.go
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 package main
6
7 import check "gopkg.in/check.v1"
8
9 var _ = check.Suite(&eventSuite{})
10
11 type eventSuite struct{}
12
13 func (*eventSuite) TestDetail(c *check.C) {
14         e := &event{
15                 LogID: 17,
16                 db:    testDB(),
17         }
18         logRow := e.Detail()
19         c.Assert(logRow, check.NotNil)
20         c.Check(logRow, check.Equals, e.logRow)
21         c.Check(logRow.UUID, check.Equals, "zzzzz-57u5n-containerlog006")
22         c.Check(logRow.ObjectUUID, check.Equals, "zzzzz-dz642-logscontainer03")
23         c.Check(logRow.EventType, check.Equals, "crunchstat")
24         c.Check(logRow.Properties["text"], check.Equals, "2013-11-07_23:33:41 zzzzz-8i9sb-ahd7cie8jah9qui 29610 1 stderr crunchstat: cpu 1935.4300 user 59.4100 sys 8 cpus -- interval 10.0002 seconds 12.9900 user 0.9900 sys")
25 }