Repair Functional Tests: test for confirm on and off#335
Merged
jeschu1 merged 1 commit intomicrosoft:masterfrom Oct 8, 2018
Merged
Repair Functional Tests: test for confirm on and off#335jeschu1 merged 1 commit intomicrosoft:masterfrom
jeschu1 merged 1 commit intomicrosoft:masterfrom
Conversation
kewillford
suggested changes
Oct 4, 2018
|
|
||
| this.Enlistment.TryMountGVFS().ShouldEqual(false, "Repair without confirm should not fix the enlistment"); | ||
|
|
||
| this.Enlistment.Repair(true); |
Member
There was a problem hiding this comment.
Helper method for these three lines?
| this.Enlistment.TryMountGVFS().ShouldEqual(false, "GVFS shouldn't mount when HEAD is corrupt"); | ||
|
|
||
| this.Enlistment.Repair(); | ||
| this.Enlistment.Repair(false); |
Member
There was a problem hiding this comment.
We usually use named parameters for constant values like
this.Enlistment.Repair(confirm: false);
| "repair --confirm \"" + this.enlistmentRoot + "\"", | ||
| failOnError: true); | ||
| string confirmArg = confirm == true ? "--confirm " : string.Empty; | ||
| if (confirm) |
Member
There was a problem hiding this comment.
I don't think you should be checking this bool otherwise the repair will not be ran when false. We still want to run it just without the --confirm
| this.CallGVFS( | ||
| "repair --confirm \"" + this.enlistmentRoot + "\"", | ||
| failOnError: true); | ||
| string confirmArg = confirm == true ? "--confirm " : string.Empty; |
sanoursa
reviewed
Oct 4, 2018
GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerTestCase/RepairTests.cs
Outdated
Show resolved
Hide resolved
| public void NoFixesNeeded() | ||
| { | ||
| this.Enlistment.UnmountGVFS(); | ||
|
|
Contributor
There was a problem hiding this comment.
Another style nit: I think there are an excessive number of blank lines in these tests. It's hard to read code when each line of code is followed by a blank line :-)
45c106f to
f00be38
Compare
wilbaker
approved these changes
Oct 4, 2018
kewillford
approved these changes
Oct 4, 2018
f00be38 to
b627ceb
Compare
Enrich existing tests to include confirm off
b627ceb to
46f9bc5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enrich existing tests to include confirm off
Per @kewillford 's request. This change should run quickly and give us added security.