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

Unified Diff: tools/gardening/lib/src/buildbot_structures.dart

Issue 3002743002: Fix buildbot_data_test (Closed)
Patch Set: Created 3 years, 4 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 | « tools/gardening/lib/src/buildbot_data.dart ('k') | tools/gardening/lib/src/client.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gardening/lib/src/buildbot_structures.dart
diff --git a/tools/gardening/lib/src/buildbot_structures.dart b/tools/gardening/lib/src/buildbot_structures.dart
index c4fda31070a437dc2d34ba7c0824fe66ea2f9ff9..36ac35c99eb8d36e755236f2597572d5768bc4f8 100644
--- a/tools/gardening/lib/src/buildbot_structures.dart
+++ b/tools/gardening/lib/src/buildbot_structures.dart
@@ -6,13 +6,9 @@ import 'util.dart';
/// The [Uri] of a build step stdio log split into its subparts.
class BuildUri {
- final String scheme;
- final String host;
- final String prefix;
final String botName;
final int buildNumber;
final String stepName;
- final String suffix;
factory BuildUri(Uri uri) {
List<String> parts = split(Uri.decodeFull(uri.path),
@@ -31,13 +27,7 @@ class BuildUri {
return new BuildUri(Uri.parse(url));
}
- factory BuildUri.fromData(String botName, int buildNumber, String stepName) {
- return new BuildUri.internal('https', 'build.chromium.org',
- '/p/client.dart', botName, buildNumber, stepName, 'stdio/text');
- }
-
- BuildUri.internal(this.scheme, this.host, this.prefix, this.botName,
- this.buildNumber, this.stepName, this.suffix);
+ BuildUri.fromData(this.botName, this.buildNumber, this.stepName);
BuildUri withBuildNumber(int buildNumber) {
return new BuildUri.fromData(botName, buildNumber, stepName);
@@ -50,7 +40,7 @@ class BuildUri {
String get buildName =>
'/builders/$botName/builds/$buildNumber/steps/$stepName';
- String get path => '$prefix$buildName/logs/$suffix';
+ String get path => '/p/client.dart$buildName/logs/stdio/text';
/// Returns the path used in logdog for this build uri.
///
@@ -66,13 +56,12 @@ class BuildUri {
/// Creates the [Uri] for this build step stdio log.
Uri toUri() {
- return new Uri(scheme: scheme, host: host, path: path);
+ return new Uri(scheme: 'https', host: 'build.chromium.org', path: path);
}
/// Returns the [BuildUri] the previous build of this build step.
BuildUri prev() {
- return new BuildUri.internal(
- scheme, host, prefix, botName, buildNumber - 1, stepName, suffix);
+ return new BuildUri.fromData(botName, buildNumber - 1, stepName);
}
String toString() {
« no previous file with comments | « tools/gardening/lib/src/buildbot_data.dart ('k') | tools/gardening/lib/src/client.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698