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

Side by Side Diff: milo/appengine/swarming/buildLog_test.go

Issue 2902323002: Milo: Swarming module test coverage (Closed)
Patch Set: Remove vestage Created 3 years, 6 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 unified diff | Download patch
OLDNEW
(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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698