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

Unified Diff: appengine/cmd/milo/swarming/build_test.go

Issue 2078603002: milo: fix running steps (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@milo-pending
Patch Set: address comments Created 4 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 side-by-side diff with in-line comments
Download patch
Index: appengine/cmd/milo/swarming/build_test.go
diff --git a/appengine/cmd/milo/swarming/build_test.go b/appengine/cmd/milo/swarming/build_test.go
index a0ebaa2bcb188305be236c1765cfc7eba9eeccd3..619296285718da483f13602fb00fb36ab92c4e24 100644
--- a/appengine/cmd/milo/swarming/build_test.go
+++ b/appengine/cmd/milo/swarming/build_test.go
@@ -12,6 +12,7 @@ import (
"path"
"strings"
"testing"
+ "time"
"github.com/luci/luci-go/common/clock/testclock"
. "github.com/smartystreets/goconvey/convey"
@@ -43,13 +44,15 @@ func TestBuild(t *testing.T) {
{"debug:build-exception", "build-exception.json"},
{"debug:build-patch-failure", "build-patch-failure.json"},
{"debug:build-pending", "build-pending.json"},
+ {"debug:build-running", "build-running.json"},
{"debug:build-timeout", "build-timeout.json"},
}
+ c := context.Background()
+ c, _ = testclock.UseTime(c, time.Date(2016, time.March, 14, 11, 0, 0, 0, time.UTC))
+
if *generate {
for _, tc := range testCases {
- c := context.Background()
- c, _ = testclock.UseTime(c, testclock.TestTimeUTC)
fmt.Printf("Generating expectations for %s\n", tc.input)
build, err := swarmingBuildImpl(c, "foo", "default", tc.input)
if err != nil {
@@ -69,9 +72,6 @@ func TestBuild(t *testing.T) {
}
Convey(`A test Environment`, t, func() {
- c := context.Background()
- c, _ = testclock.UseTime(c, testclock.TestTimeUTC)
-
for _, tc := range testCases {
Convey(fmt.Sprintf("Test Case: %s", tc.input), func() {
build, err := swarmingBuildImpl(c, "foo", "default", tc.input)

Powered by Google App Engine
This is Rietveld 408576698