Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 package swarming | |
| 2 | |
| 3 import ( | |
| 4 "context" | |
| 5 "strings" | |
| 6 "testing" | |
| 7 "time" | |
| 8 | |
| 9 "github.com/luci/gae/impl/memory" | |
| 10 "github.com/luci/luci-go/common/clock/testclock" | |
| 11 | |
| 12 . "github.com/smartystreets/goconvey/convey" | |
| 13 ) | |
| 14 | |
| 15 var testSvc = &debugSwarmingService{ | |
| 16 tc: &testCase{ | |
| 17 name: "build-patch-failure", | |
| 18 swarmResult: "build-patch-failure.swarm", | |
| 19 swarmOutput: "build-patch-failure", | |
| 20 }, | |
| 21 } | |
| 22 | |
| 23 func TestBuildLogs(t *testing.T) { | |
| 24 c := context.Background() | |
| 25 c, _ = testclock.UseTime(c, time.Date(2016, time.March, 14, 11, 0, 0, 0, time.UTC)) | |
|
nodir
2017/06/08 14:39:12
any reason we are not using testclock.TestRecentTi
| |
| 26 c = memory.UseWithAppID(c, "dev~luci-milo") | |
| 27 Convey(`Build log tests`, t, func() { | |
| 28 _, _, err := swarmingBuildLogImpl(c, testSvc, "12340", "/update_ scripts/0/stdout") | |
| 29 So(err, ShouldBeNil) | |
| 30 }) | |
| 31 Convey(`List available streams`, t, func() { | |
| 32 _, _, err := swarmingBuildLogImpl(c, testSvc, "12340", "/notexis t") | |
| 33 So(strings.HasPrefix(err.Error(), "stream \"steps/notexist\" not found"), ShouldEqual, true) | |
| 34 }) | |
| 35 } | |
| OLD | NEW |