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

Unified Diff: appengine/cmd/milo/settings/funcs_test.go

Issue 2141013003: milo: fix build/step timing (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: retrain Created 4 years, 5 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
« no previous file with comments | « appengine/cmd/milo/resp/build.go ('k') | appengine/cmd/milo/swarming/build.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/cmd/milo/settings/funcs_test.go
diff --git a/appengine/cmd/milo/settings/funcs_test.go b/appengine/cmd/milo/settings/funcs_test.go
new file mode 100644
index 0000000000000000000000000000000000000000..f4c6192a40e89d2d1c77c88545b18cc91305b346
--- /dev/null
+++ b/appengine/cmd/milo/settings/funcs_test.go
@@ -0,0 +1,28 @@
+// Copyright 2016 The LUCI Authors. All rights reserved.
+// Use of this source code is governed under the Apache License, Version 2.0
+// that can be found in the LICENSE file.
+
+package settings
+
+import (
+ "testing"
+ "time"
+
+ . "github.com/smartystreets/goconvey/convey"
+)
+
+func TestFuncs(t *testing.T) {
+ t.Parallel()
+
+ Convey("humanDuration", t, func() {
+ Convey("3 hrs", func() {
+ h := humanDuration(3 * time.Hour)
+ So(h, ShouldEqual, "3 hrs")
+ })
+
+ Convey("2 hrs 59 mins", func() {
+ h := humanDuration(2*time.Hour + 59*time.Minute)
+ So(h, ShouldEqual, "2 hrs 59 mins")
+ })
+ })
+}
« no previous file with comments | « appengine/cmd/milo/resp/build.go ('k') | appengine/cmd/milo/swarming/build.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698