-
Notifications
You must be signed in to change notification settings - Fork 525
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3868 from JohnyWS/correct-flaky-tests
Correct flaky tests in bootstrapper
- Loading branch information
Showing
13 changed files
with
125 additions
and
68 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
[*.cs] | ||
indent_style = space | ||
indent_size = 4 |
This file contains 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
This file contains 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
18 changes: 18 additions & 0 deletions
18
src/Paket.Bootstrapper/HelperProxies/DefaultProxyProvider.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
namespace Paket.Bootstrapper.HelperProxies | ||
{ | ||
public class DefaultProxyProvider : IProxyProvider | ||
{ | ||
public IFileSystemProxy FileSystemProxy { get; } | ||
|
||
public IWebRequestProxy WebRequestProxy { get; } | ||
|
||
public IEnvProxy EnvProxy { get; } | ||
|
||
public DefaultProxyProvider() | ||
{ | ||
FileSystemProxy = new FileSystemProxy(); | ||
EnvProxy = new EnvProxy(); | ||
WebRequestProxy = new WebRequestProxy(EnvProxy); | ||
} | ||
} | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using System; | ||
using System.Net; | ||
|
||
namespace Paket.Bootstrapper.HelperProxies | ||
{ | ||
public interface IEnvProxy | ||
{ | ||
bool TryGetProxyFor(Uri uri, out IWebProxy proxy); | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace Paket.Bootstrapper.HelperProxies | ||
{ | ||
public interface IProxyProvider | ||
{ | ||
IFileSystemProxy FileSystemProxy { get; } | ||
IWebRequestProxy WebRequestProxy { get; } | ||
IEnvProxy EnvProxy { get; } | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
13 changes: 13 additions & 0 deletions
13
tests/Paket.Bootstrapper.Tests/NoSingletonProxyProvider.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using Paket.Bootstrapper.HelperProxies; | ||
|
||
namespace Paket.Bootstrapper.Tests | ||
{ | ||
internal class NoSingletonProxyProvider : IProxyProvider | ||
{ | ||
public IFileSystemProxy FileSystemProxy => new FileSystemProxy(); | ||
|
||
public IWebRequestProxy WebRequestProxy => new WebRequestProxy(EnvProxy); | ||
|
||
public IEnvProxy EnvProxy => new EnvProxy(); | ||
} | ||
} |
Oops, something went wrong.