8000 Drop tests that rely on the global configuration · GiTechLab/libgit2sharp@96d270f · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 96d270f

Browse files
committed
Drop tests that rely on the global configuration
We cannot make correct assumptions regarding the fact that the environment that host the test runner: - Contains a global git config file - Grants the test runner process with enough rights to write to this file - That this file already contains an expected entry Given those constraints, those tests are removed.
1 parent 520b1aa commit 96d270f

File tree

1 file changed

+0
-72
lines changed

1 file changed

+0
-72
lines changed

LibGit2Sharp.Tests/ConfigurationFixture.cs

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -80,30 +80,6 @@ public void CanUnsetAnEntryFromTheGlobalConfiguration()
8080
}
8181
}
8282

83-
[SkippableFact]
84-
public void CanGetGlobalStringValue()
85-
{
86-
using (var repo = new Repository(StandardTestRepoPath))
87-
{
88-
InconclusiveIf(() => !repo.Config.HasConfig(ConfigurationLevel.Global),
89-
"No Git global configuration available");
90-
91-
Assert.NotNull(repo.Config.Get<string>("user.name"));
92-
}
93-
}
94-
95-
[SkippableFact]
96-
public void CanGetGlobalStringValueWithoutRepo()
97-
{
98-
using (var config = new Configuration())
99-
{
100-
< 10000 span class=pl-s1>InconclusiveIf(() => !config.HasConfig(ConfigurationLevel.Global),
101-
"No Git global configuration available");
102-
103-
Assert.NotNull(config.Get<string>("user.name"));
104-
}
105-
}
106-
10783
[Fact]
10884
public void CanReadBooleanValue()
10985
{
@@ -264,54 +240,6 @@ public void CanSetBooleanValue()
264240
}
265241
}
266242

267-
[SkippableFact]
268-
public void CanSetGlobalStringValue()
269-
{
270-
using (var repo = new Repository(StandardTestRepoPath))
271-
{
272-
InconclusiveIf(() => !repo.Config.HasConfig(ConfigurationLevel.Global),
273-
"No Git global configuration available");
274-
275-
var existing = repo.Config.Get<string>("user.name");
276-
Assert.NotNull(existing);
277-
278-
try
279-
{
280-
repo.Config.Set("user.name", "Unit Test", ConfigurationLevel.Global);
281-
282-
AssertValueInGlobalConfigFile("name = Unit Test$");
283-
}
284-
finally
285-
{
286-
repo.Config.Set("user.name", existing.Value, ConfigurationLevel.Global);
287-
}
288-
}
289-
}
290-
291-
[SkippableFact]
292-
public void CanSetGlobalStringValueWithoutRepo()
293-
{
294-
using(var config = new Configuration())
295-
{
296-
InconclusiveIf(() => !config.HasConfig(ConfigurationLevel.Global),
297-
"No Git global configuration available");
298-
299-
var existing = config.Get<string>("user.name");
300-
Assert.NotNull(existing);
301-
302-
try
303-
{
304-
config.Set("user.name", "Unit Test", ConfigurationLevel.Global);
305-
306-
AssertValueInGlobalConfigFile("name = Unit Test$");
307-
}
308-
finally
309-
{
310-
config.Set("user.name", existing.Value, ConfigurationLevel.Global);
311-
}
312-
}
313-
}
314-
315243
[Fact]
316244
public void SettingLocalConfigurationOutsideAReposThrows()
317245
{

0 commit comments

Comments
 (0)
0