@@ -20,11 +20,9 @@ public GitPreparerTests()
20
20
const string SpecificBranchName = "feature/foo" ;
21
21
22
22
[ Test ]
23
- [ TestCase ( null , DefaultBranchName , false ) ]
24
- [ TestCase ( SpecificBranchName , SpecificBranchName , false ) ]
25
- [ TestCase ( null , DefaultBranchName , true ) ]
26
- [ TestCase ( SpecificBranchName , SpecificBranchName , true ) ]
27
- public void WorksCorrectlyWithRemoteRepository ( string branchName , string expectedBranchName , bool checkConfig )
23
+ [ TestCase ( null , DefaultBranchName ) ]
24
+ [ TestCase ( SpecificBranchName , SpecificBranchName ) ]
25
+ public void WorksCorrectlyWithRemoteRepository ( string branchName , string expectedBranchName )
28
26
{
29
27
var repoName = Guid . NewGuid ( ) . ToString ( ) ;
30
28
var tempPath = Path . GetTempPath ( ) ;
@@ -41,22 +39,8 @@ public void WorksCorrectlyWithRemoteRepository(string branchName, string expecte
41
39
fixture . Repository . MakeCommits ( 5 ) ;
42
40
fixture . Repository . CreateFileAndCommit ( "TestFile.txt" ) ;
43
41
44
- if ( checkConfig )
45
- {
46
- fixture . Repository . CreateFileAndCommit ( "GitVersionConfig.yaml" ) ;
47
- }
48
-
49
42
fixture . Repository . CreateBranch ( SpecificBranchName ) ;
50
43
51
- if ( checkConfig )
52
- {
53
- fixture . Repository . Refs . UpdateTarget ( fixture . Repository . Refs . Head , fixture . Repository . Refs [ "refs/heads/" + SpecificBranchName ] ) ;
54
-
55
- fixture . Repository . CreateFileAndCommit ( "GitVersionConfig.yaml" ) ;
56
-
57
- fixture . Repository . Refs . UpdateTarget ( fixture . Repository . Refs . Head , fixture . Repository . Refs [ "refs/heads/" + DefaultBranchName ] ) ;
58
- }
59
-
60
44
var arguments = new Arguments
61
45
{
62
46
TargetPath = tempDir ,
@@ -83,12 +67,6 @@ public void WorksCorrectlyWithRemoteRepository(string branchName, string expecte
83
67
var currentBranch = repository . Head . CanonicalName ;
84
68
85
69
currentBranch . EndsWith ( expectedBranchName ) . ShouldBe ( true ) ;
86
-
87
- if ( checkConfig )
88
- {
89
- var expectedConfigPath = Path . Combine ( dynamicRepositoryPath , "..\\ GitVersionConfig.yaml" ) ;
90
- File . Exists ( expectedConfigPath ) . ShouldBe ( true ) ;
91
- }
92
70
}
93
71
}
94
72
}
0 commit comments