| OLD | NEW |
| 1 // Copyright 2017 The LUCI Authors. All rights reserved. | 1 // Copyright 2017 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 swarming | 5 package swarming |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "fmt" | 8 "fmt" |
| 9 "testing" | 9 "testing" |
| 10 | 10 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 State: TaskRunning, | 73 State: TaskRunning, |
| 74 Tags: []string{ | 74 Tags: []string{ |
| 75 "allow_milo:1", | 75 "allow_milo:1", |
| 76 "foo:1", | 76 "foo:1", |
| 77 "bar:2", | 77 "bar:2", |
| 78 }, | 78 }, |
| 79 TryNumber: 1, | 79 TryNumber: 1, |
| 80 }, | 80 }, |
| 81 } | 81 } |
| 82 bip := BuildInfoProvider{ | 82 bip := BuildInfoProvider{ |
| 83 » » » bl: buildLoader{ | 83 » » » bl: BuildLoader{ |
| 84 logDogClientFunc: func(c context.Context, host s
tring) (*coordinator.Client, error) { | 84 logDogClientFunc: func(c context.Context, host s
tring) (*coordinator.Client, error) { |
| 85 if host == "" { | 85 if host == "" { |
| 86 host = "example.com" | 86 host = "example.com" |
| 87 } | 87 } |
| 88 return &coordinator.Client{ | 88 return &coordinator.Client{ |
| 89 C: &testClient, | 89 C: &testClient, |
| 90 Host: host, | 90 Host: host, |
| 91 }, nil | 91 }, nil |
| 92 }, | 92 }, |
| 93 }, | 93 }, |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 } | 240 } |
| 241 | 241 |
| 242 for _, tc := range failures { | 242 for _, tc := range failures { |
| 243 Convey(fmt.Sprintf("Failes to parse %q / %q (%s)", tc.ta
skID, tc.tryNumber, tc.err), func() { | 243 Convey(fmt.Sprintf("Failes to parse %q / %q (%s)", tc.ta
skID, tc.tryNumber, tc.err), func() { |
| 244 _, err := getRunID(tc.taskID, tc.tryNumber) | 244 _, err := getRunID(tc.taskID, tc.tryNumber) |
| 245 So(err, ShouldErrLike, tc.err) | 245 So(err, ShouldErrLike, tc.err) |
| 246 }) | 246 }) |
| 247 } | 247 } |
| 248 }) | 248 }) |
| 249 } | 249 } |
| OLD | NEW |