Skip to content

Commit 6490ff1

Browse files
committed
Remove git protocol from test data
1 parent 1e6da83 commit 6490ff1

File tree

4 files changed

+12
-23
lines changed

4 files changed

+12
-23
lines changed

LibGit2Sharp.Tests/CloneFixture.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ public class CloneFixture : BaseFixture
1313
[Theory]
1414
[InlineData("http://github.com/libgit2/TestGitRepository")]
1515
[InlineData("https://github.com/libgit2/TestGitRepository")]
16-
[InlineData("git://github.com/libgit2/TestGitRepository")]
17-
//[InlineData("git@github.com:libgit2/TestGitRepository")]
1816
public void CanClone(string url)
1917
{
2018
var scd = BuildSelfCleaningDirectory();
@@ -102,8 +100,6 @@ public void CanCloneALocalRepositoryFromANewlyCreatedTemporaryPath()
102100
[Theory]
103101
[InlineData("http://github.com/libgit2/TestGitRepository")]
104102
[InlineData("https://github.com/libgit2/TestGitRepository")]
105-
[InlineData("git://github.com/libgit2/TestGitRepository")]
106-
//[InlineData("git@github.com:libgit2/TestGitRepository")]
107103
public void CanCloneBarely(string url)
108104
{
109105
var scd = BuildSelfCleaningDirectory();
@@ -126,7 +122,7 @@ public void CanCloneBarely(string url)
126122
}
127123

128124
[Theory]
129-
[InlineData("git://github.com/libgit2/TestGitRepository")]
125+
[InlineData("https://github.com/libgit2/TestGitRepository")]
130126
public void WontCheckoutIfAskedNotTo(string url)
131127
{
132128
var scd = BuildSelfCleaningDirectory();
@@ -143,7 +139,7 @@ public void WontCheckoutIfAskedNotTo(string url)
143139
}
144140

145141
[Theory]
146-
[InlineData("git://github.com/libgit2/TestGitRepository")]
142+
[InlineData("https://github.com/libgit2/TestGitRepository")]
147143
public void CallsProgressCallbacks(string url)
148144
{
149145
bool transferWasCalled = false;
@@ -301,7 +297,7 @@ public void CanInspectCertificateOnClone(string url, string hostname, Type certT
301297
}
302298

303299
[Theory]
304-
[InlineData("git://github.com/libgit2/TestGitRepository")]
300+
[InlineData("https://github.com/libgit2/TestGitRepository")]
305301
public void CloningWithoutWorkdirPathThrows(string url)
306302
{
307303
Assert.Throws<ArgumentNullException>(() => Repository.Clone(url, null));

LibGit2Sharp.Tests/FetchFixture.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
using System.Linq;
55
using LibGit2Sharp.Tests.TestHelpers;
66
using Xunit;
7-
using Xunit.Extensions;
87

98
namespace LibGit2Sharp.Tests
109
{
@@ -15,7 +14,6 @@ public class FetchFixture : BaseFixture
1514
[Theory]
1615
[InlineData("http://github.com/libgit2/TestGitRepository")]
1716
[InlineData("https://github.com/libgit2/TestGitRepository")]
18-
[InlineData("git://github.com/libgit2/TestGitRepository.git")]
1917
public void CanFetchIntoAnEmptyRepository(string url)
2018
{
2119
string path = InitNewRepository();
@@ -74,7 +72,6 @@ public void CanFetchIntoAnEmptyRepositoryWithCredentials()
7472
[Theory]
7573
[InlineData("http://github.com/libgit2/TestGitRepository")]
7674
[InlineData("https://github.com/libgit2/TestGitRepository")]
77-
[InlineData("git://github.com/libgit2/TestGitRepository.git")]
7875
public void CanFetchAllTagsIntoAnEmptyRepository(string url)
7976
{
8077
string path = InitNewRepository();
@@ -101,7 +98,8 @@ public void CanFetchAllTagsIntoAnEmptyRepository(string url)
10198
}
10299

103100
// Perform the actual fetch
104-
Commands.Fetch(repo, remoteName, new string[0], new FetchOptions {
101+
Commands.Fetch(repo, remoteName, new string[0], new FetchOptions
102+
{
105103
TagFetchMode = TagFetchMode.All,
106104
OnUpdateTips = expectedFetchState.RemoteUpdateTipsHandler
107105
}, null);
@@ -117,7 +115,6 @@ public void CanFetchAllTagsIntoAnEmptyRepository(string url)
117115
[Theory]
118116
[InlineData("http://github.com/libgit2/TestGitRepository", "test-branch", "master")]
119117
[InlineData("https://github.com/libgit2/TestGitRepository", "master", "master")]
120-
[InlineData("git://github.com/libgit2/TestGitRepository.git", "master", "first-merge")]
121118
public void CanFetchCustomRefSpecsIntoAnEmptyRepository(string url, string localBranchName, string remoteBranchName)
122119
{
123120
string path = InitNewRepository();
@@ -147,7 +144,8 @@ public void CanFetchCustomRefSpecsIntoAnEmptyRepository(string url, string local
147144
}
148145

149146
// Perform the actual fetch
150-
Commands.Fetch(repo, remoteName, new string[] { refSpec }, new FetchOptions {
147+
Commands.Fetch(repo, remoteName, new string[] { refSpec }, new FetchOptions
148+
{
151149
TagFetchMode = TagFetchMode.None,
152150
OnUpdateTips = expectedFetchState.RemoteUpdateTipsHandler
153151
}, null);

LibGit2Sharp.Tests/NetworkFixture.cs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using System.Linq;
44
using LibGit2Sharp.Tests.TestHelpers;
55
using Xunit;
6-
using Xunit.Extensions;
76

87
namespace LibGit2Sharp.Tests
98
{
@@ -12,7 +11,6 @@ public class NetworkFixture : BaseFixture
1211
[Theory]
1312
[InlineData("http://github.com/libgit2/TestGitRepository")]
1413
[InlineData("https://github.com/libgit2/TestGitRepository")]
15-
[InlineData("git://github.com/libgit2/TestGitRepository.git")]
1614
public void CanListRemoteReferences(string url)
1715
{
1816
string remoteName = "testRemote";
@@ -49,7 +47,6 @@ public void CanListRemoteReferences(string url)
4947
[Theory]
5048
[InlineData("http://github.com/libgit2/TestGitRepository")]
5149
[InlineData("https://github.com/libgit2/TestGitRepository")]
52-
[InlineData("git://github.com/libgit2/TestGitRepository.git")]
5350
public void CanListRemoteReferencesFromUrl(string url)
5451
{
5552
string repoPath = InitNewRepository();
@@ -94,9 +91,9 @@ public void CanListRemoteReferenceObjects()
9491
Remote remote = repo.Network.Remotes[remoteName];
9592
IEnumerable<Reference> references = repo.Network.ListReferences(remote).ToList();
9693

97-
var actualRefs = new List<Tuple<string,string>>();
94+
var actualRefs = new List<Tuple<string, string>>();
9895

99-
foreach(Reference reference in references)
96+
foreach (Reference reference in references)
10097
{
10198
Assert.NotNull(reference.CanonicalName);
10299

@@ -166,7 +163,7 @@ public void CanPull(FastForwardStrategy fastForwardStrategy)
166163

167164
MergeResult mergeResult = Commands.Pull(repo, Constants.Signature, pullOptions);
168165

169-
if(fastForwardStrategy == FastForwardStrategy.Default || fastForwardStrategy == FastForwardStrategy.FastForwardOnly)
166+
if (fastForwardStrategy == FastForwardStrategy.Default || fastForwardStrategy == FastForwardStrategy.FastForwardOnly)
170167
{
171168
Assert.Equal(MergeStatus.FastForward, mergeResult.Status);
172169
Assert.Equal(mergeResult.Commit, repo.Branches["refs/remotes/origin/master"].Tip);
@@ -226,7 +223,7 @@ public void PullWithoutMergeBranchThrows()
226223
{
227224
Commands.Pull(repo, Constants.Signature, new PullOptions());
228225
}
229-
catch(MergeFetchHeadNotFoundException ex)
226+
catch (MergeFetchHeadNotFoundException ex)
230227
{
231228
didPullThrow = true;
232229
thrownException = ex;
@@ -293,7 +290,7 @@ public void CanPruneRefs()
293290
Assert.NotNull(repo.Refs["refs/remotes/pruner/master"]);
294291

295292
// but we do when asked by the user
296-
Commands.Fetch(repo, "pruner", new string[0], new FetchOptions { Prune = true}, null);
293+
Commands.Fetch(repo, "pruner", new string[0], new FetchOptions { Prune = true }, null);
297294
Assert.Null(repo.Refs["refs/remotes/pruner/master"]);
298295
}
299296
}

LibGit2Sharp.Tests/RepositoryFixture.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
using System.Linq;
55
using LibGit2Sharp.Tests.TestHelpers;
66
using Xunit;
7-
using Xunit.Extensions;
87

98
namespace LibGit2Sharp.Tests
109
{
@@ -709,7 +708,6 @@ public void CanListRemoteReferencesWithCredentials()
709708
[Theory]
710709
[InlineData("http://github.com/libgit2/TestGitRepository")]
711710
[InlineData("https://github.com/libgit2/TestGitRepository")]
712-
[InlineData("git://github.com/libgit2/TestGitRepository.git")]
713711
public void CanListRemoteReferences(string url)
714712
{
715713
IEnumerable<Reference> references = Repository.ListRemoteReferences(url).ToList();

0 commit comments

Comments
 (0)