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

Unified Diff: ct/go/util/util_test.go

Issue 1990873002: Use swarming in create_pagesets CT task (Closed) Base URL: https://skia.googlesource.com/buildbot@ct-3-swarming-timeouts
Patch Set: Address comment Created 4 years, 7 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 | « ct/go/util/util.go ('k') | ct/go/worker_scripts/create_pagesets/main.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ct/go/util/util_test.go
diff --git a/ct/go/util/util_test.go b/ct/go/util/util_test.go
index 01490ff2b4b55047d3275a977223f8a17119136f..60d42e4222dfedc39e4576d47848b0d14755ba1e 100644
--- a/ct/go/util/util_test.go
+++ b/ct/go/util/util_test.go
@@ -6,6 +6,7 @@ import (
"os"
"path/filepath"
"strconv"
+ "strings"
"testing"
"go.skia.org/infra/go/util"
@@ -85,3 +86,16 @@ func TestCreateTimestampFile(t *testing.T) {
t.Error("Unexpected lack of error")
}
}
+
+func TestGetStartRange(t *testing.T) {
+ assert.Equal(t, 1, GetStartRange(1, 1000))
+ assert.Equal(t, 2001, GetStartRange(3, 1000))
+ assert.Equal(t, 41, GetStartRange(3, 20))
+}
+
+func TestGetPathToPyFiles(t *testing.T) {
+ swarmingPath := GetPathToPyFiles(true)
+ assert.True(t, strings.HasSuffix(swarmingPath, filepath.Join("src", "go.skia.org", "infra", "ct", "py")))
+ nonSwarmingPath := GetPathToPyFiles(false)
+ assert.True(t, strings.HasSuffix(nonSwarmingPath, filepath.Join("src", "go.skia.org", "infra", "ct", "py")))
+}
« no previous file with comments | « ct/go/util/util.go ('k') | ct/go/worker_scripts/create_pagesets/main.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698