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

Side by Side Diff: build_scheduler/go/task_scheduler/task_candidate_test.go

Issue 2296763008: [task scheduler] Move files from build_scheduler/ to task_scheduler/ (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Created 4 years, 3 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 unified diff | Download patch
OLDNEW
(Empty)
1 package task_scheduler
2
3 import (
4 "testing"
5
6 "github.com/stretchr/testify/assert"
7 )
8
9 func TestTaskCandidateId(t *testing.T) {
10 t1 := makeTaskCandidate("task1", []string{"k:v"})
11 t1.Repo = "Myrepo"
12 t1.Revision = "abc123"
13 id1 := t1.MakeId()
14 repo1, name1, rev1, err := parseId(id1)
15 assert.NoError(t, err)
16 assert.Equal(t, t1.Repo, repo1)
17 assert.Equal(t, t1.Name, name1)
18 assert.Equal(t, t1.Revision, rev1)
19
20 badIds := []string{
21 "",
22 "taskCandidate|a|b|",
23 "20160831T000018.497703717Z_000000000000015b",
24 }
25 for _, id := range badIds {
26 _, _, _, err := parseId(id)
27 assert.Error(t, err)
28 }
29 }
OLDNEW
« no previous file with comments | « build_scheduler/go/task_scheduler/task_candidate.go ('k') | build_scheduler/go/task_scheduler/task_scheduler.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698