| Index: milo/appengine/swarming/buildLog_test.go
|
| diff --git a/milo/appengine/swarming/buildLog_test.go b/milo/appengine/swarming/buildLog_test.go
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..37c92f5f429e08da744dd823947bc946481c8594
|
| --- /dev/null
|
| +++ b/milo/appengine/swarming/buildLog_test.go
|
| @@ -0,0 +1,34 @@
|
| +package swarming
|
| +
|
| +import (
|
| + "context"
|
| + "strings"
|
| + "testing"
|
| +
|
| + "github.com/luci/gae/impl/memory"
|
| + "github.com/luci/luci-go/common/clock/testclock"
|
| +
|
| + . "github.com/smartystreets/goconvey/convey"
|
| +)
|
| +
|
| +var testSvc = &debugSwarmingService{
|
| + tc: &testCase{
|
| + name: "build-patch-failure",
|
| + swarmResult: "build-patch-failure.swarm",
|
| + swarmOutput: "build-patch-failure",
|
| + },
|
| +}
|
| +
|
| +func TestBuildLogs(t *testing.T) {
|
| + c := context.Background()
|
| + c, _ = testclock.UseTime(c, testclock.TestRecentTimeUTC)
|
| + c = memory.UseWithAppID(c, "dev~luci-milo")
|
| + Convey(`Build log tests`, t, func() {
|
| + _, _, err := swarmingBuildLogImpl(c, testSvc, "12340", "/update_scripts/0/stdout")
|
| + So(err, ShouldBeNil)
|
| + })
|
| + Convey(`List available streams`, t, func() {
|
| + _, _, err := swarmingBuildLogImpl(c, testSvc, "12340", "/notexist")
|
| + So(strings.HasPrefix(err.Error(), "stream \"steps/notexist\" not found"), ShouldEqual, true)
|
| + })
|
| +}
|
|
|