-
Notifications
You must be signed in to change notification settings - Fork 494
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CosmosClientOptions: Adds validation for ApplicationName (#3455)
* IGNORE ME * IGNORE ME * Implemented suggested changes, verify that application name does not contain illegal or dangerous characters * Cleaned up unnecessary code * Now using built-in NameValueHeaderValueParser * Clarified Exception message * Fixed added bug * Updated Contracts * Wrapped Format Exception in Argument Exception * Moved test to unit tests, removed unused variable * restored ClientTests.cs * Now checking application name parse with a dummy http request to correctly catch all valid/invalid names * pushed accidentily unstaged changes * Use Base HttpRequestMessage Co-authored-by: Matias Quaranta <ealsur@users.noreply.github.com> * Changed User Agent String to HttpConstant * Changed User Agent String to HttpConstant Co-authored-by: Nalu Tripician <ntripician@microsoft.com> Co-authored-by: Matias Quaranta <ealsur@users.noreply.github.com>
- Loading branch information
1 parent
36ee222
commit 5d70017
Showing
5 changed files
with
133 additions
and
10 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
41 changes: 41 additions & 0 deletions
41
...sts/BaselineTest/TestBaseline/PassThroughQueryBaselineTests.NegativePassThroughOutput.xml
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,41 @@ | ||
<Results> | ||
<Result> | ||
<Input> | ||
<Description>Null Partition Key Value</Description> | ||
<Query>SELECT * FROM c</Query> | ||
<PartitionKeys> | ||
<Key>/pk</Key> | ||
</PartitionKeys> | ||
<PartitionKeyType>Hash</PartitionKeyType> | ||
</Input> | ||
<Output> | ||
<ExecuteAsPassThrough>false</ExecuteAsPassThrough> | ||
</Output> | ||
</Result> | ||
<Result> | ||
<Input> | ||
<Description>None Partition Key Value</Description> | ||
<Query>SELECT * FROM c</Query> | ||
<PartitionKeys> | ||
<Key>/pk</Key> | ||
</PartitionKeys> | ||
<PartitionKeyType>Hash</PartitionKeyType> | ||
</Input> | ||
<Output> | ||
<ExecuteAsPassThrough>false</ExecuteAsPassThrough> | ||
</Output> | ||
</Result> | ||
<Result> | ||
<Input> | ||
<Description>C# Null Partition Key Value</Description> | ||
<Query>SELECT * FROM c</Query> | ||
<PartitionKeys> | ||
<Key>/pk</Key> | ||
</PartitionKeys> | ||
<PartitionKeyType>Hash</PartitionKeyType> | ||
</Input> | ||
<Output> | ||
<ExecuteAsPassThrough>false</ExecuteAsPassThrough> | ||
</Output> | ||
</Result> | ||
</Results> |
41 changes: 41 additions & 0 deletions
41
...sts/BaselineTest/TestBaseline/PassThroughQueryBaselineTests.PositivePassThroughOutput.xml
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,41 @@ | ||
<Results> | ||
<Result> | ||
<Input> | ||
<Description>Partition Key + Value and Distinct</Description> | ||
<Query>SELECT DISTINCT c.key FROM c</Query> | ||
<PartitionKeys> | ||
<Key>/pk</Key> | ||
</PartitionKeys> | ||
<PartitionKeyType>Hash</PartitionKeyType> | ||
</Input> | ||
<Output> | ||
<ExecuteAsPassThrough>true</ExecuteAsPassThrough> | ||
</Output> | ||
</Result> | ||
<Result> | ||
<Input> | ||
<Description>Partition Key + Value and Min Aggregate</Description> | ||
<Query>SELECT VALUE MIN(c.key) FROM c</Query> | ||
<PartitionKeys> | ||
<Key>/pk</Key> | ||
</PartitionKeys> | ||
<PartitionKeyType>Hash</PartitionKeyType> | ||
</Input> | ||
<Output> | ||
<ExecuteAsPassThrough>true</ExecuteAsPassThrough> | ||
</Output> | ||
</Result> | ||
<Result> | ||
<Input> | ||
<Description>Partition Key + Value Fields</Description> | ||
<Query>SELECT c.key FROM c</Query> | ||
<PartitionKeys> | ||
<Key>/pk</Key> | ||
</PartitionKeys> | ||
<PartitionKeyType>Hash</PartitionKeyType> | ||
</Input> | ||
<Output> | ||
<ExecuteAsPassThrough>true</ExecuteAsPassThrough> | ||
</Output> | ||
</Result> | ||
</Results> |
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