-
Notifications
You must be signed in to change notification settings - Fork 232
Refactor the test package-server #3230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
builder.serve('foo', '3.2.1'); | ||
builder.serve('bar', '1.0.0', deps: {'foo': '^3.2.1'}); | ||
}); | ||
final builder = await servePackages(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calling it builder
is that a good name...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No - just got tired of renaming - but let's shave the yak, I'll rename them all...
test/test_pub.dart
Outdated
/// makes it the current [globalServer]. | ||
/// | ||
/// Calls [callback] with a [PackageServerBuilder] that's used to specify | ||
/// which packages to serve. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this comment still up to date?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope!
Thanks - fixed.
}); | ||
await servePackages() | ||
..serve('not_upgraded', '1.0.0') | ||
..serve('not_upgraded', '1.0.0') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete?
}); | ||
await servePackages() | ||
..serve('added', '1.0.0') | ||
..serve('added', '1.0.0') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete?
}); | ||
await servePackages() | ||
..serve('multiple_newer', '1.0.0') | ||
..serve('multiple_newer', '1.0.0') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete?
..serve('multiple_newer_unstable', '1.0.1-unstable.2') | ||
..serve('multiple_newer_unstable2', '1.0.1-unstable.1') | ||
..serve('multiple_newer_unstable2', '1.0.1-unstable.2') | ||
..serve('multiple_newer_unstable2', '1.0.1-unstable.2') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool!
Most of the action is in test/package_server.dart (and a bit in test/test_pub.dart).