-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat(backend): e2e tests for creating a pull request (#61) #62
Conversation
The error message changed but the tests didn't...
Without these two lines the tests hang and eventually fail.
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.
A few questions...
) { | ||
throw new Error('Non-linear history. Force-push is not allowed.'); | ||
if (keyboardsHead !== keyboardsNoteInfo.commitSha && keyboardsNoteInfo.commitSha !== '') { | ||
throw new HttpException('Keyboards repo has new changes. This is not allowed.', 409); |
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.
Can you explain the circumstances of this? The keyboards repo will continually get new changes so we need to handle that
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.
What I meant here is that the single-keyboard directory (that corresponds to the single-keyboard repo) has new changes.
if (keyboardsHead !== keyboardsNoteInfo.commitSha && keyboardsNoteInfo.commitSha !== '') { | ||
throw new Error('Keyboards repo has new changes. This is not allowed.'); | ||
if (this.hasNonLinearHistory(singleKbNoteInfo, keyboardsNoteInfo)) { | ||
throw new HttpException('Non-linear history in single-keyboard repo. Force-push is not allowed.', 400); |
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 just for a single PR? We don't allow force push for PRs generated through KDO?
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.
yes, that's for a single PR and is relevant while a PR is open.
I wrote up #63 with some additional scenarios that the current implementation might not properly handle yet.
I note a failing test in the log... |
This change makes calling git cross-platform compatible. Suppressing stderr output can be done directly in node. This allows to run the command on all platforms.
Now that I found the real reason for the "command not found" error (there's no /dev/null on Windows), we can remove the workaround for TC.
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)