Skip to content

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

Merged
merged 5 commits into from
Nov 16, 2021

Conversation

sigurdm
Copy link
Contributor

@sigurdm sigurdm commented Nov 12, 2021

Most of the action is in test/package_server.dart (and a bit in test/test_pub.dart).

@sigurdm sigurdm requested review from jonasfj and szakarias November 12, 2021 13:34
@google-cla google-cla bot added the cla: yes label Nov 12, 2021
builder.serve('foo', '3.2.1');
builder.serve('bar', '1.0.0', deps: {'foo': '^3.2.1'});
});
final builder = await servePackages();
Copy link
Member

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...

Copy link
Contributor Author

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...

@sigurdm sigurdm requested a review from jonasfj November 15, 2021 12:31
/// makes it the current [globalServer].
///
/// Calls [callback] with a [PackageServerBuilder] that's used to specify
/// which packages to serve.
Copy link
Contributor

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?

Copy link
Contributor Author

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')
Copy link
Contributor

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')
Copy link
Contributor

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')
Copy link
Contributor

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')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This too?

Copy link
Contributor

@szakarias szakarias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool!

@sigurdm sigurdm merged commit acc8ab0 into dart-lang:master Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants