[conductor] Fix branch version to use framework branch#103381
[conductor] Fix branch version to use framework branch#103381fluttergithubbot merged 2 commits intoflutter:masterfrom
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
| ); | ||
| stdio.printStatus('Writing candidate branch...'); | ||
| bool needsCommit = await framework.updateCandidateBranchVersion(state.releaseVersion); | ||
| bool needsCommit = await framework.updateCandidateBranchVersion(state.framework.candidateBranch); |
There was a problem hiding this comment.
I'm not really sure how to test this. Any feedback would be helpful, but i'm not sure why the version was coming out as the branch in the test.
There was a problem hiding this comment.
You can insert the following snippet to the end of this test: https://github.com/flutter/flutter/blob/master/dev/conductor/core/test/next_test.dart#L737
final File rcbVersionFile = fileSystem
.directory(checkoutsParentDirectory)
.childDirectory('framework')
.childDirectory('bin')
.childDirectory('internal')
.childFile('release-candidate-branch.version');
expect(rcbVersionFile.existsSync(), isTrue);
expect(rcbVersionFile.readAsStringSync(), contains(candidateBranch));There was a problem hiding this comment.
Thanks! I did expect(stdio.stdout, contains('release-candidate-branch.version containing $candidateBranch')); to follow the format of the existing tests so if we refactor it's a bit easier.
Fixes #101773