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