-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CLI | Add check to symbolicLink value (AST-45529) (#786)
* add symbolincLink value check * refactor addDirFiles * add test files --------- Co-authored-by: AlvoBen <alvo@post.bgu.ac.il>
- Loading branch information
Showing
5 changed files
with
97 additions
and
5 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
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
44 changes: 44 additions & 0 deletions
44
...ntegration/data/project-with-directory-symlink/check/originalFolder.html/csharp-no-vul.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,44 @@ | ||
namespace EvidenceResolver.Tests.Contract | ||
{ | ||
public static class MockProviderServiceExtenstion | ||
{ | ||
public static IMockProviderService WithRequest(this IMockProviderService mockProviderService, | ||
HttpVerb method, object path, object body = null, Dictionary<string, object> headers = null) | ||
{ | ||
var providerServiceRequest = new ProviderServiceRequest | ||
{ | ||
Method = method, | ||
Path = path | ||
}; | ||
|
||
providerServiceRequest.Headers = headers ?? new Dictionary<string, object> | ||
{ | ||
{"Content-Type", "application/json"} | ||
}; | ||
|
||
if (body != null) { | ||
providerServiceRequest.Body = PactNet.Matchers.Match.Type(body); | ||
} | ||
|
||
return mockProviderService.With(providerServiceRequest); | ||
} | ||
|
||
public static void WillRespondParameters(this IMockProviderService mockProviderService, | ||
int status, dynamic body = null, Dictionary<string, object> headers = null) | ||
{ | ||
if (body == null) { | ||
body = new { }; | ||
} | ||
|
||
var expectedResponse = new ProviderServiceResponse | ||
{ | ||
Status = status, | ||
Headers = headers ?? new Dictionary<string, object> | ||
{{"Content-Type", "application/json; charset=utf-8"}}, | ||
Body = PactNet.Matchers.Match.Type(body) | ||
}; | ||
|
||
mockProviderService.WillRespondWith(expectedResponse); | ||
} | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
test/integration/data/project-with-directory-symlink/originalFolder.html
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 @@ | ||
/Users/benalvo/CxDev/workspace/Pheonix-workspace/ast-cli/test/integration/data/project-with-directory-symlink/check/originalFolder.html |
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