| OLD | NEW |
| 1 // Copyright 2016 The LUCI Authors. All rights reserved. | 1 // Copyright 2016 The LUCI Authors. All rights reserved. |
| 2 // Use of this source code is governed under the Apache License, Version 2.0 | 2 // Use of this source code is governed under the Apache License, Version 2.0 |
| 3 // that can be found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
| 4 | 4 |
| 5 package archivist | 5 package archivist |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "fmt" | 8 "fmt" |
| 9 "strings" | 9 "strings" |
| 10 "sync" | 10 "sync" |
| 11 "testing" | 11 "testing" |
| 12 "time" | 12 "time" |
| 13 | 13 |
| 14 "github.com/golang/protobuf/proto" | |
| 15 "github.com/luci/luci-go/common/clock/testclock" | 14 "github.com/luci/luci-go/common/clock/testclock" |
| 16 "github.com/luci/luci-go/common/errors" | 15 "github.com/luci/luci-go/common/errors" |
| 17 "github.com/luci/luci-go/common/gcloud/gs" | 16 "github.com/luci/luci-go/common/gcloud/gs" |
| 18 "github.com/luci/luci-go/common/proto/google" | 17 "github.com/luci/luci-go/common/proto/google" |
| 19 "github.com/luci/luci-go/logdog/api/endpoints/coordinator/services/v1" | 18 "github.com/luci/luci-go/logdog/api/endpoints/coordinator/services/v1" |
| 20 "github.com/luci/luci-go/logdog/api/logpb" | 19 "github.com/luci/luci-go/logdog/api/logpb" |
| 21 "github.com/luci/luci-go/logdog/common/storage" | 20 "github.com/luci/luci-go/logdog/common/storage" |
| 22 "github.com/luci/luci-go/logdog/common/storage/memory" | 21 "github.com/luci/luci-go/logdog/common/storage/memory" |
| 23 "github.com/luci/luci-go/logdog/common/types" | 22 "github.com/luci/luci-go/logdog/common/types" |
| 24 "github.com/luci/luci-go/luci_config/common/cfgtypes" | 23 "github.com/luci/luci-go/luci_config/common/cfgtypes" |
| 24 |
| 25 "github.com/golang/protobuf/proto" |
| 25 "golang.org/x/net/context" | 26 "golang.org/x/net/context" |
| 26 "google.golang.org/grpc" | 27 "google.golang.org/grpc" |
| 27 | 28 |
| 28 . "github.com/luci/luci-go/common/testing/assertions" | 29 . "github.com/luci/luci-go/common/testing/assertions" |
| 29 . "github.com/smartystreets/goconvey/convey" | 30 . "github.com/smartystreets/goconvey/convey" |
| 30 ) | 31 ) |
| 31 | 32 |
| 32 // testTask is an instrumentable Task implementation. | 33 // testTask is an instrumentable Task implementation. |
| 33 type testTask struct { | 34 type testTask struct { |
| 34 task *logdog.ArchiveTask | 35 task *logdog.ArchiveTask |
| (...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 | 727 |
| 727 So(ar.archiveTaskImpl(c, task),
ShouldErrLike, "test error") | 728 So(ar.archiveTaskImpl(c, task),
ShouldErrLike, "test error") |
| 728 So(task.consumed, ShouldBeFalse) | 729 So(task.consumed, ShouldBeFalse) |
| 729 So(archiveRequest, ShouldBeNil) | 730 So(archiveRequest, ShouldBeNil) |
| 730 }) | 731 }) |
| 731 } | 732 } |
| 732 } | 733 } |
| 733 }) | 734 }) |
| 734 }) | 735 }) |
| 735 } | 736 } |
| OLD | NEW |