Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
1fe9b58
[Storage] Add test case for accesstier (#12340)
blueww Jun 1, 2020
1a86c97
[Datafactory] Enable Excel SDK (#12282)
yuzhangyi Jun 1, 2020
27003d4
update Azure.ClientSdk.Analyzers to 20200529.1 (#12370)
christothes Jun 1, 2020
b6d7f43
make it required (#12354)
maririos Jun 1, 2020
6e83f93
Tables: Query support for dictionary entities and CreateFilter (#12366)
christothes Jun 1, 2020
3d7694f
Initial commit to master for Azure Digital Twins .Net SDK. (#12398)
azabbasi Jun 1, 2020
56c7d16
Update Batch SDK regeneration instructions (#12347)
jafreck Jun 2, 2020
fd0e9af
K8sConfiguration .Net SDK - Create (#12227)
NarayanThiru Jun 2, 2020
8affe75
Support Sku capabilities. Bump to 7.3.0 (#12328)
yangyuan Jun 2, 2020
8e4a058
Removed color and imageType from the VisualFeature enum (#12375)
jennifermarsman Jun 2, 2020
307cabf
Generate new .NET SDK based on #9377 (#12364)
juniwang Jun 2, 2020
710bc50
[Event Hubs Client] Migration Guide Updates (#12402)
jsquire Jun 2, 2020
f5f53e4
[FormRecognizer] Remove Operation type constructors (#12419)
kinelski Jun 2, 2020
939c24f
Release prep (#12422)
kasobol-msft Jun 2, 2020
22e6c00
Update GitIgnore (#12368)
chidozieononiwu Jun 2, 2020
a6d58cf
Enable return type and banned assembly analyzers (#12418)
pakrym Jun 2, 2020
a520bd9
Increment version for storage releases (#12423)
azure-sdk Jun 2, 2020
8f39a09
Increment version for storage releases (#12425)
azure-sdk Jun 2, 2020
9972a17
feat(Samples): Add Telemetry Sample (#12407)
Jun 2, 2020
baec1ad
add some unit tests for expression parsing (#12421)
christothes Jun 2, 2020
b4b0b70
samples(adt): Update ctor snippets, and update sample options (#12409)
Jun 2, 2020
be83d78
fix(e2e): Fix replay tests for differnt OS(s) (#12424)
vinagesh Jun 2, 2020
96f7858
fix(adt): fix BasicDigitalTwin and use in an example (#12428)
Jun 2, 2020
db2ea3a
Update root readme file (#12430)
azabbasi Jun 2, 2020
188cec8
samples(adt): add a sample for using a custom twin type for serializa…
Jun 2, 2020
069ce6c
Update swagger_to_sdk_config.json (#12412)
isra-fel Jun 3, 2020
7369616
Fix Incomplete Doc Upload (#12442)
scbedd Jun 3, 2020
404aff4
Update AutoRest C# version to https://github.com/Azure/autorest.cshar…
azure-sdk Jun 3, 2020
dd7ad05
Fix json serialization of geometries (#12440)
pakrym Jun 3, 2020
78b52d8
samples(adt): add snippets for get and deserialize digital twin (#12441)
Jun 3, 2020
4c5adff
fix(adt): Updated comments to generted more meaningful API documentat…
vinagesh Jun 3, 2020
ed7c9cf
Escaping % (percent sign) segment in Uri.AppendToPath (#12369)
amnguye Jun 3, 2020
1dd4b47
webdocs(adt): test seealso, and adding links for more resources (#12471)
Jun 3, 2020
820fad0
Make collection properties read-only (#12459)
heaths Jun 3, 2020
f717d8d
feat(adt): Adding see-also section for sync methods (#12470)
vinagesh Jun 3, 2020
66c3567
comments(adt): removing inaccurate comment (#12474)
Jun 3, 2020
55fce02
Remove FieldBuilder (#12464)
heaths Jun 3, 2020
b7bdeb9
feat(test): Adding tests to ensure that the test mode values are not …
vinagesh Jun 3, 2020
c4dcd59
Ignore Azure.Management.KeyVault.Tests (#12483)
heaths Jun 3, 2020
ad21e16
Default to more Newtonsoft-like response encoding in TestFramework (#…
pakrym Jun 3, 2020
772f886
samples(adt): misc minor clean-up from Azure SDK review (#12488)
Jun 4, 2020
a338062
feat(adt): Add exception tag to comments (#12475)
vinagesh Jun 4, 2020
d07dcc5
Add SessionReceiverOptions/SessionProcessorOptions (#12383)
JoshLove-msft Jun 4, 2020
5a2eb90
Changelogs and version updates for June release (#12507)
pakrym Jun 4, 2020
773a2cd
test(PublishTelemetry): Add E2E test for Publish Telemetry API (#12479)
Jun 4, 2020
e52bcc1
Increment version for core releases (#12516)
azure-sdk Jun 4, 2020
46745c8
Update versions of Azure.Core and Azure.Core.Experimental (#12520)
pakrym Jun 4, 2020
c8d4ed2
Update AutoRest C# version (#12525)
azure-sdk Jun 4, 2020
5949cbc
Release Prep (#12526)
kasobol-msft Jun 4, 2020
520ee9e
samples(adt): Update component property to be an integer (#12515)
abhipsaMisra Jun 4, 2020
da79d63
Increment version for storage releases (#12529)
azure-sdk Jun 5, 2020
6a8d65f
samples(adt): more misc changes per Azure SDK review (#12532)
Jun 5, 2020
ab13111
feat(samples): Add an introduction section to the samples page (#12524)
Jun 5, 2020
093c601
Added xml dataset & fixed version issue (#12458)
shawnxzq Jun 5, 2020
c69633e
Batch Management SDK 11.0.0 (#12393)
jafreck Jun 5, 2020
d4a2c7d
GuestConfiguration SDK update to support ARC senario (#12373)
gehuang-dut Jun 5, 2020
a6b6aee
Rename AnalyzeRequest to AnalyzeTextOptions (#12489)
heaths Jun 5, 2020
9bd1293
Implement the management client (#12484)
ShivangiReja Jun 5, 2020
762f929
Making developer credential types public (#12501)
schaabs Jun 5, 2020
d7e73a8
docs(adt): add link to samples (#12533)
Jun 5, 2020
17e05e1
Increment version for extensions releases (#12547)
azure-sdk Jun 5, 2020
12c2c31
feat(samples): Use DefaultAzureCredential in samples using app id log…
vinagesh Jun 5, 2020
6c96ee3
[FormRecognizer] Preview 3: moving to new Receipt design (#12523)
kinelski Jun 5, 2020
4ae35d4
Identity Adding Authenticate APIs to UsernamePasswordCredential (#12502)
schaabs Jun 5, 2020
b7c3932
[TA] Drop preview and change readme links to absolute (#12541)
maririos Jun 5, 2020
c4a79ec
Consistency operation failed status management in LRO (#12453)
maririos Jun 5, 2020
be0472f
[FR] Absolute links and bump version in Readme (#12540)
maririos Jun 5, 2020
2e9a93c
Add changelog format template - bump nuget version for next release -…
azabbasi Jun 5, 2020
9dad78f
refactor(adt): move QueryChargeHelper to root namespace (#12569)
Jun 5, 2020
bd7cd8f
Add sdk directory name check (#12556)
pakrym Jun 5, 2020
779ddcd
[Synapse] - Build track 2 data plane SDK (#12275)
idear1203 Jun 6, 2020
209260a
update change log for KeyVault track 2 mgmt sdk (#12272)
erich-wang Jun 8, 2020
d6ea0ea
update change logs for track 2 mgmt sdks for preview (#12391)
erich-wang Jun 8, 2020
77f5144
[App Service] Azure .NET SDK update for Powershell (#12380)
shubDhond Jun 8, 2020
afb2903
[Datafactory] Add source/sink linked service/schema linked service su…
richardkz Jun 8, 2020
a647074
renaming operation-ids for Cluster put and patch as per guidelines (#…
Jun 8, 2020
1692036
[Event Hubs Client] Fix Test Environment Typo (#12596)
jsquire Jun 8, 2020
639e185
Port clientside encryption to mono-dll (#12183)
jaschrep-msft Jun 8, 2020
c22891a
fix(tests,samples)do not send modelid in component metadata (#12573)
Jun 8, 2020
2c66b83
docs(adt): update RequestOptions documentation (#12571)
azabbasi Jun 8, 2020
0c3b870
[FormRecognizer] Remove <inheritdoc> from documentation (#12570)
kinelski Jun 8, 2020
5800dc1
Fix Tables access policies test and configure related methods (#12567)
meanjeekim Jun 8, 2020
12df3e5
fix(samples):remove unnecessary lines from sample (#12606)
Jun 8, 2020
a83cfd7
Update for Preview 3 (#12608)
JoshLove-msft Jun 8, 2020
cbd4096
[FormRecognizer] Preview 3: updating changelog
kinelski Jun 8, 2020
e5a22e0
Update DigitalTwin lifecycle to use ETag and re-record (#12603)
azabbasi Jun 8, 2020
73ca0ee
Update changelog (#12612)
azabbasi Jun 8, 2020
76f3461
Updated changelogs for preview release (#12616)
jaschrep-msft Jun 8, 2020
cb85408
Increment package version after release of Azure.Messaging.ServiceBus…
azure-sdk Jun 8, 2020
d33d09e
readme(adt): update readme (#12618)
Jun 8, 2020
3780ed9
Tables: Fixup diagnostic scopes (#12621)
christothes Jun 8, 2020
ad4f1e1
fix random failure by changing from referencing helper project to con…
erich-wang Jun 9, 2020
d0d803f
Supporting specifying test run frequency (#12454)
erich-wang Jun 9, 2020
535a672
fix(comments): Fix xml comments for API surface (#12635)
vinagesh Jun 9, 2020
a9cd95d
Search cross-language consistency API changes (#12615)
tg-msft Jun 9, 2020
423fa77
Add strongly typed FacetResult helpers for Search (#12620)
tg-msft Jun 9, 2020
48f2e62
[Synapse] - Fix test failure (#12625)
idear1203 Jun 9, 2020
805e4ad
change namespace to Azure.ResourceManager for track 2 mgmt sdk (#12598)
erich-wang Jun 9, 2020
9a63855
Support node reboot features (#12641)
aim-for-better Jun 9, 2020
213cce4
Throw an AggregateException for Search IndexDocuments batch errors (#…
tg-msft Jun 9, 2020
66e62b1
Add SearchModelFactory (#12626)
tg-msft Jun 9, 2020
dfe9b53
[FormRecognizer] Remove long-running operation transform (#12652)
kinelski Jun 9, 2020
5d62379
Adding SearchClientBuilderExtensions (#12628)
tg-msft Jun 9, 2020
80c89ee
Increment package version after release of Azure.DigitalTwins.Core (#…
azure-sdk Jun 9, 2020
d6a87dc
[Event Hubs Client] Migration Guide Tweaks (#12656)
jsquire Jun 9, 2020
35aeb63
fix setup script (#12661)
azabbasi Jun 9, 2020
e95f06f
Fix SearchDocument (#12610)
tg-msft Jun 9, 2020
7dfb547
Update README.mds for extensions (#12658)
pakrym Jun 9, 2020
c6adceb
Increment package version after release of Azure.AI.TextAnalytics (#1…
azure-sdk Jun 9, 2020
9d67114
updated mappings for new Microsoft.Web event types in the azure-sdk-f…
ElleTojaroon Jun 9, 2020
fa94755
Increment package version after release of Azure.Search.Documents (#1…
azure-sdk Jun 9, 2020
66c8e54
Sync eng/common directory with azure-sdk-tools repository (#12665)
azure-sdk Jun 10, 2020
ad9838c
Event Grid: Regenerate new .NET SDK and record tests for new GA servi…
ahamad-MS Jun 10, 2020
5b79a20
[Azure Cognitive Search] Creating new SDK version to match new manage…
tjacobhi Jun 10, 2020
cab3687
[Microsoft.StorageSync] Update SDK to use 2020-03-01 API version (#12…
anpint Jun 10, 2020
6ed841c
Azure Digital Twins 0.1.0 SDK (#12538)
c-ryan-k Jun 10, 2020
cdd3a31
[FormRecognizer] Changing test location to West Central US + Live tes…
kinelski Jun 10, 2020
b94dbcb
[FormRecognizer] Preview 3: update changelogs (#12687)
kinelski Jun 10, 2020
a97cf19
Update CRUD samples (#12693)
JoshLove-msft Jun 10, 2020
34f95a9
Identity updating changelog for 1.2.0-preview.4 release (#12696)
schaabs Jun 10, 2020
26653ab
Remove unhealthy pump (#12691)
serkantkaraca Jun 10, 2020
1895a8e
enable apicompat (#12669)
maririos Jun 10, 2020
15ff4bc
Increment package version after release of Azure.Identity (#12697)
azure-sdk Jun 10, 2020
c938cdd
Increment package version after release of Azure.AI.FormRecognizer (#…
azure-sdk Jun 10, 2020
7505a33
[Event Hubs Client] Documentation Updates (#12690)
jsquire Jun 10, 2020
4b26c0d
Increase Key Vault test timeout to 120mins (#12700)
heaths Jun 10, 2020
bb15740
Update sample readmes to have absolute links to GitHub (#12568)
JoshLove-msft Jun 10, 2020
692f793
Network SDK release for API version 2020-05-01 (#12685)
anton-evseev Jun 11, 2020
c7c8c91
DiskRp changes for 2020-05-01 (#12553)
chetmaddula Jun 11, 2020
77e7b6a
CRR update (#12650)
pratimaupadhyay02 Jun 11, 2020
c1fbe05
ADT C# SDK Samples Improvements (#12683)
Jun 11, 2020
8d8a6fd
Initial AccessControlClient for Azure.Security.KeyVault.Administratio…
christothes Jun 11, 2020
f1bc212
refactor(samples): Refactor the delete digital twin sample snippet (#…
abhipsaMisra Jun 11, 2020
0ce4dd9
Update AutoRest C# version (#12692)
azure-sdk Jun 11, 2020
b8307f7
Generate API (#12720)
JoshLove-msft Jun 11, 2020
84d8169
Add initial samples for review (#12664)
meanjeekim Jun 11, 2020
7e38193
Refresh generated code for KVAdmin library (#12725)
weshaggard Jun 11, 2020
2bb1deb
Simplify delete relationship snippet (#12717)
Jun 11, 2020
67c4c61
Api compat changes (#12703)
weshaggard Jun 12, 2020
c2d949b
Add reboot parameters for multiple replicas per master. (#12712)
Priya91 Jun 12, 2020
8ec922f
Reenable registered server tests, update recordings (#12724)
anpint Jun 12, 2020
fde680f
Update AutoRest C# version (#12739)
azure-sdk Jun 12, 2020
cd0ffd3
Fix links in extensions README.mds (#12689)
pakrym Jun 12, 2020
eac9f3b
doc(adt): update prereq readme instructions (#12743)
Jun 12, 2020
61953d3
Sanitize json body (#12707)
maririos Jun 13, 2020
321c6a1
Use US sovereign region
danieljurek May 31, 2020
13bf2f3
Use sovereign KV domain suffix
danieljurek Jun 2, 2020
c3df320
Update KV tests.yml to use new approach
danieljurek Jun 4, 2020
3a57360
Unique naming of jobs
danieljurek Jun 4, 2020
12cc9c7
Unique display names
danieljurek Jun 4, 2020
4799cba
Set SubscriptionConfiguraiton back to default
danieljurek Jun 4, 2020
4bb7fdb
Name Job directly
danieljurek Jun 4, 2020
956145e
use valid characters for job name
danieljurek Jun 4, 2020
ebf7753
Parameterize KV SKU and adjust Azure China Cloud deployment
danieljurek Jun 4, 2020
2cc9dc8
add AZURE_AUTHORITY_HOST
danieljurek Jun 4, 2020
785cb32
Merge branch 'feature/live-test-other-clouds' into feature/live-test-…
danieljurek Jun 15, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
/sdk/search/ @brjohnstmsft @arv100kri @bleroy @tg-msft @heaths
/sdk/search/Microsoft.*/ @brjohnstmsft @arv100kri @bleroy

/sdk/servicebus/ @JoshLove-msft @ShivangiReja @jsquire
/sdk/servicebus/ @JoshLove-msft @ShivangiReja @jsquire @MiYanni
/sdk/servicebus/Microsoft.*/ @nemakam

/sdk/storage/ @amishra-dev @seanmcc-msft @amnguye @kasobol-msft @tg-msft
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ ipch/
*.psess
*.vsp

# VS Code
.vscode/

# Code analysis
*.CodeAnalysisLog.xml

Expand Down
11 changes: 4 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,10 @@ eng\scripts\Export-API.ps1 tables
.NET is using the [ApiCompat tool](https://github.com/dotnet/arcade/tree/master/src/Microsoft.DotNet.ApiCompat) to enforce API compatibility between versions. Builds of GA'ed libraries will fail locally and in CI if there are breaking changes.

### How it works
We use a dummy project called [ApiCompat](https://github.com/Azure/azure-sdk-for-net/tree/master/eng/ApiCompat/ApiCompat.csproj) to enforce API compatibility between the GA'ed libraries and the most recent version available on Nuget. This project includes package references to all GA'ed libraries and to Microsoft.DotNet.ApiCompat.
Each listed library package is restored from Nuget via the package references listed in the `ApiCompat.csproj` file, in combination with the version listed for that package in [eng/Packages.Data.props](https://github.com/Azure/azure-sdk-for-net/blob/master/eng/Packages.Data.props).
The `ApiCompatVerification` target defined in `ApiCompat.csproj` is referenced in the [eng/Directory.Build.Data.targets](https://github.com/Azure/azure-sdk-for-net/blob/master/eng/Directory.Build.Data.targets) which causes this target to be executed for each csproj that has the `EnableApiCompat` parameter set to true. The `EnableApiCompat` parameter defaults to the value of the `IsShippingClientLibrary` parameter, which is defined in [eng/Directory.Build.Data.props](https://github.com/Azure/azure-sdk-for-net/blob/master/eng/Directory.Build.Data.props). For libraries that do not yet have a public package defined in `ApiCompat.csproj` for comparison, set `<EnableApiCompat>false</EnableApiCompat>` in the csproj.

### Adding a new GA'ed library
To include add a new GA'ed library in the `ApiCompatVerification` target, add a package reference for the library to the `ApiCompat.csproj` file. You will also need to include the latest GA version of the library in [eng/Packages.Data.props](https://github.com/Azure/azure-sdk-for-net/blob/master/eng/Packages.Data.props).
Finally, include the `ApiCompat.csproj` in your solution so that the project will get automatically restored in Visual Studio.
We use a dummy project called [ApiCompat](https://github.com/Azure/azure-sdk-for-net/tree/master/eng/ApiCompat/ApiCompat.csproj) to enforce API compatibility between the GA'ed libraries and the most recent version available on Nuget. This project includes package references to the GA'ed library and to Microsoft.DotNet.ApiCompat.
Each library needs to provide a `ApiCompatVersion` property which is set to the last GA'ed version of the library which is used to compare APIs with the current to ensure no breaks
have been introduced.
The `ApiCompatVerification` target defined in `ApiCompat.csproj` is referenced in the [eng/Directory.Build.Data.targets](https://github.com/Azure/azure-sdk-for-net/blob/master/eng/Directory.Build.Data.targets) which causes this target to be executed for each csproj that has the `ApiCompatVersion` property set. For libraries that wish to disable the APICompat check they can remove the `ApiCompatVersion` property from their project. Our version bump automation will automatically add or increment the `ApiCompatVersion` property to the project when it detects that the version it is changing was a GA version which usually indicates that we just shipped that GA version and so it should be the new baseline for api checks.

### Releasing a new version of a GA'ed libary
Since the [eng/Packages.Data.props](https://github.com/Azure/azure-sdk-for-net/blob/master/eng/Packages.Data.props) is currently maintained manually, you will need to update the version number for your library in this file when releasing a new version.
Expand Down
81 changes: 81 additions & 0 deletions common/ManagementTestShared/ManagementRecordedTestBase.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using System.Linq;
using System.Threading.Tasks;

using Azure.Core;
using Azure.Core.TestFramework;
using Azure.Management.Resources;

namespace Azure.ResourceManager.TestFramework
{
public abstract class ManagementRecordedTestBase<TEnvironment> : RecordedTestBase<TEnvironment> where TEnvironment: TestEnvironment, new()
{
private static TimeSpan ZeroPollingInterval { get; } = TimeSpan.FromSeconds(0);

protected ResourceGroupCleanupPolicy CleanupPolicy { get; set; }

protected ManagementRecordedTestBase(bool isAsync) : base(isAsync)
{
}

protected ManagementRecordedTestBase(bool isAsync, RecordedTestMode mode) : base(isAsync, mode)
{
}

protected ValueTask<Response<T>> WaitForCompletionAsync<T>(Operation<T> operation)
{
if (Mode == RecordedTestMode.Playback)
{
return operation.WaitForCompletionAsync(ZeroPollingInterval, default);
}
else
{
return operation.WaitForCompletionAsync();
}
}

protected ResourcesManagementClient GetResourceManagementClient()
{
var options = Recording.InstrumentClientOptions(new ResourcesManagementClientOptions());
CleanupPolicy = new ResourceGroupCleanupPolicy();
options.AddPolicy(CleanupPolicy, HttpPipelinePosition.PerCall);

return CreateClient<ResourcesManagementClient>(
TestEnvironment.SubscriptionId,
TestEnvironment.Credential,
options);
}

protected async Task CleanupResourceGroupsAsync()
{
if (CleanupPolicy != null && Mode != RecordedTestMode.Playback)
{
var resourceGroupsClient = new ResourcesManagementClient(
TestEnvironment.SubscriptionId,
TestEnvironment.Credential,
new ResourcesManagementClientOptions()).ResourceGroups;
foreach (var resourceGroup in CleanupPolicy.ResourceGroupsCreated)
{
await resourceGroupsClient.StartDeleteAsync(resourceGroup);
}
}
}

protected async Task<string> GetFirstUsableLocationAsync(ProvidersOperations providersClient, string resourceProviderNamespace, string resourceType)
{
var provider = (await providersClient.GetAsync(resourceProviderNamespace)).Value;
return provider.ResourceTypes.Where(
(resType) =>
{
if (resType.ResourceType == resourceType)
return true;
else
return false;
}
).First().Locations.FirstOrDefault();
}
}
}
34 changes: 34 additions & 0 deletions common/ManagementTestShared/ResourceGroupCleanupPolicy.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System.Collections.Generic;
using System.Text.RegularExpressions;

using Azure.Core;
using Azure.Core.Pipeline;

namespace Azure.ResourceManager.TestFramework
{
public class ResourceGroupCleanupPolicy : HttpPipelineSynchronousPolicy
{
private Regex _resourceGroupPattern = new Regex(@"/subscriptions/[^/]+/resourcegroups/([^?/]+)\?api-version");
private readonly IList<string> _resourceGroupCreated = new List<string>();

public IList<string> ResourceGroupsCreated
{
get { return _resourceGroupCreated; }
}

public override void OnSendingRequest(HttpMessage message)
{
if (message.Request.Method == RequestMethod.Put)
{
var match = _resourceGroupPattern.Match(message.Request.Uri.ToString());
if (match.Success)
{
_resourceGroupCreated.Add(match.Groups[1].Value);
}
}
}
}
}
15 changes: 12 additions & 3 deletions doc/dev/Track2TestFramework.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# Acquiring TestFramework

To start using test framework import `sdk\core\Azure.Core\tests\TestFramework.props` into test `.csproj`:
To start using Test Framework add a project reference using the alias `AzureCoreTestFramework` into your test `.csproj`:

``` xml
<Project Sdk="Microsoft.NET.Sdk">

...
<Import Project="..\..\..\core\Azure.Core\tests\TestFramework.props" />
<ProjectReference Include="$(AzureCoreTestFramework)" />
...

</Project>

```
As an example, see the [Template](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/template/Azure.Template/tests/Azure.Template.Tests.csproj#L15) project.

# Sync-async tests

Expand Down Expand Up @@ -182,13 +183,19 @@ __NOTE:__ recordings are copied from `netcoreapp2.1` directory by default, make

## Sanitizing

Secrets that are part of requests, responses, headers or connections strings should be sanitized before saving the record. Common headers like `Authentication` are sanitized automatically but if custom logic is required `RecordedTest.Sanitizer` should be used as extension point.
Secrets that are part of requests, responses, headers, or connections strings should be sanitized before saving the record. Common headers like `Authentication` are sanitized automatically but if custom logic is required and/or if request or response body need to be sanitied, the `RecordedTest.Sanitizer` should be used as extension point.

For example:

``` C#
public class ConfigurationRecordedTestSanitizer : RecordedTestSanitizer
{
public ConfigurationRecordedTestSanitizer()
base()
{
JsonPathSanitizers.Add("$..secret");
}

public override void SanitizeConnectionString(ConnectionString connectionString)
{
const string secretKey = "secret";
Expand All @@ -209,6 +216,8 @@ For example:
}
```

**Note:** `JsonPathSanitizers` takes [Json Path](https://www.newtonsoft.com/json/help/html/QueryJsonSelectToken.htm) format strings that will be validated against the body. If a match exists, the value will be sanitized.

## Matching

When tests are ran in replay mode HTTP method, uri and headers are used to match request to response. Some headers change on every request and are not controlled by the client code and should be ignored during the matching. Common headers like `Date`, `x-ms-date`, `x-ms-client-request-id`, `User-Agent`, `Request-Id` are ignored by default but if more headers need to be ignored use `Recording.Matcher` extensions point.
Expand Down
43 changes: 16 additions & 27 deletions eng/ApiCompat/ApiCompat.csproj
Original file line number Diff line number Diff line change
@@ -1,40 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk">
<!--This project is used to enforce API compatibility between the GA'ed libraries and the most recent version available on Nuget. The most recent
<!--
This project is used to enforce API compatibility between the GA'ed libraries and the most recent version available on Nuget. The most recent
version is restored from Nuget via the package references below. The ApiCompatVerification target, specified below, is referenced in the
eng/Directory.Build.Data.targets file which causes this target to be executed for each csproj that has the EnableApiCompat parameter set to true.
The EnableApiCompat parameter defaults to the value of the IsShippingClientLibrary parameter, which is defined in the eng/Directory.Build.Data.props file.-->
eng/Directory.Build.Data.targets file which causes this target to be executed for each csproj that has an ApiCompatVersion set.
-->
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RunApiCompatForSrc>true</RunApiCompatForSrc>
<IntermediateOutputPath>$(IntermediateOutputPath)/$(TargetPackageName)</IntermediateOutputPath>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.DotNet.ApiCompat" />
<PackageReference Include="Microsoft.DotNet.ApiCompat" Version="5.0.0-beta.19552.1" />
<PackageReference Include="$(TargetPackageName)" Version="$(TargetPackageVersion)" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Azure.Core" />
<PackageReference Include="Azure.Data.AppConfiguration" />
<PackageReference Include="Azure.Messaging.EventHubs" />
<PackageReference Include="Azure.Messaging.EventHubs.Processor" />
<PackageReference Include="Azure.Identity" />
<PackageReference Include="Azure.Security.KeyVault.Certificates" />
<PackageReference Include="Azure.Security.KeyVault.Keys" />
<PackageReference Include="Azure.Security.KeyVault.Secrets" />
<PackageReference Include="Azure.Storage.Blobs" />
<PackageReference Include="Azure.Storage.Blobs.Batch" />
<PackageReference Include="Azure.Storage.Common" />
<PackageReference Include="Azure.Storage.Files.Shares" />
<PackageReference Include="Azure.Storage.Queues" />
<PackageReference Include="Microsoft.Extensions.Azure" />
</ItemGroup>

<Import Project="..\Packages.Data.props" />

<Target Name="ApiCompatVerification" DependsOnTargets="_ResolveResolvedMatchingContract;$(TargetsTriggeredByCompilation)">
<Target Name="_VerifyTargetPackageInfo">
<Error Condition="'$(TargetPackageName)' == ''" Text="TargetPackageName is not set!" />
<Error Condition="'$(TargetPackageVersion)' == ''" Text="TargetPackageVersion is not set!" />
<Error Condition="'$(TargetOutputPath)' == ''" Text="TargetOutputPath is not set!" />
</Target>

<Target Name="ApiCompatVerification"
DependsOnTargets="_VerifyTargetPackageInfo;
Restore;
_ResolveResolvedMatchingContract;
$(TargetsTriggeredByCompilation)" />

<Target Name="_ResolveResolvedMatchingContract" DependsOnTargets="ResolveReferences">
<PropertyGroup>
<TargetPackageDll Condition="'%(ResolvedCompileFileDefinitions.NuGetPackageId)' == '$(TargetPackageName)'" >%(ResolvedCompileFileDefinitions.Identity)</TargetPackageDll>
Expand All @@ -45,8 +36,6 @@
<_DependencyDirectories Include="$(TargetOutputPath)" />
<ReferencePath Remove="$(TargetPackageDll)" />
</ItemGroup>
<Error Condition="'@(ResolvedMatchingContract)' == ''"
Text="Unable to find dll for $(TargetPackageName). Make sure it is included in list of Package References if the ApiCompatVerification target (defined in eng/ApiCompat/ApiCompat.csproj) is intended to run for this package. If ApiCompatVerification should not be run, set the EnableApiCompat parameter to false in the csproj file." />
<Message Text="Running ApiCompatVerification against $(TargetPackageDll) using assemblies from $(TargetOutputPath)" Importance="High" />
</Target>
</Project>
45 changes: 45 additions & 0 deletions eng/Azure.Management.Test.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ManagementTestSharedSources>$(MSBuildThisFileDirectory)/../common/ManagementTestShared</ManagementTestSharedSources>
<RbacSharedSources>$(MSBuildThisFileDirectory)/../sdk/testcommon/Azure.Graph.Rbac/src</RbacSharedSources>
<Resources201705SharedSources>$(MSBuildThisFileDirectory)/../sdk/testcommon/Azure.Management.Resources.2017_05/src</Resources201705SharedSources>
<Compute201912SharedSources>$(MSBuildThisFileDirectory)/../sdk/testcommon/Azure.Management.Compute.2019_12/src</Compute201912SharedSources>
<Network202004SharedSources>$(MSBuildThisFileDirectory)/../sdk/testcommon/Azure.Management.Network.2020_04/src</Network202004SharedSources>
<Storage201906SharedSources>$(MSBuildThisFileDirectory)/../sdk/testcommon/Azure.Management.Storage.2019_06/src</Storage201906SharedSources>
</PropertyGroup>

<ItemGroup Condition="'$(TestHelperProjects)' != ''">
<Compile Include="$(ManagementTestSharedSources)/**/*.cs"
Link="TestShared/%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>

<ItemGroup Condition="$(TestHelperProjects.Contains('Rbac1.6'))">
<Compile Include="$(RbacSharedSources)/**/*.cs"
Link="Rbac/%(RecursiveDir)%(Filename)%(Extension)"
Exclude="$(RbacSharedSources)/Properties/AssemblyInfo.cs" />
</ItemGroup>

<ItemGroup Condition="$(TestHelperProjects.Contains('Resources201705'))">
<Compile Include="$(Resources201705SharedSources)/**/*.cs"
Link="Resources201705/%(RecursiveDir)%(Filename)%(Extension)"
Exclude="$(Resources201705SharedSources)/Properties/AssemblyInfo.cs" />
</ItemGroup>

<ItemGroup Condition="$(TestHelperProjects.Contains('Compute201912'))">
<Compile Include="$(Compute201912SharedSources)/**/*.cs"
Link="Compute201912/%(RecursiveDir)%(Filename)%(Extension)"
Exclude="$(Compute201912SharedSources)/Properties/AssemblyInfo.cs" />
</ItemGroup>

<ItemGroup Condition="$(TestHelperProjects.Contains('Network202004'))">
<Compile Include="$(Network202004SharedSources)/**/*.cs"
Link="Network202004/%(RecursiveDir)%(Filename)%(Extension)"
Exclude="$(Network202004SharedSources)/Properties/AssemblyInfo.cs" />
</ItemGroup>

<ItemGroup Condition="$(TestHelperProjects.Contains('Storage201906'))">
<Compile Include="$(Storage201906SharedSources)/**/*.cs"
Link="Storage201906/%(RecursiveDir)%(Filename)%(Extension)"
Exclude="$(Storage201906SharedSources)/Properties/AssemblyInfo.cs" />
</ItemGroup>
</Project>
10 changes: 7 additions & 3 deletions eng/CodeGeneration.targets
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project>

<PropertyGroup>
<_AutoRestVersion>https://github.com/Azure/autorest/releases/download/autorest-3.0.6222/autorest-3.0.6222.tgz</_AutoRestVersion>
<_AutoRestCoreVersion>3.0.6282</_AutoRestCoreVersion>
<_AutoRestCSharpVersion>https://github.com/Azure/autorest.csharp/releases/download/3.0.0-dev.20200527.1/autorest-csharp-v3-3.0.0-dev.20200527.1.tgz</_AutoRestCSharpVersion>
<_AutoRestVersion>https://github.com/Azure/autorest/releases/download/autorest-3.0.6223/autorest-3.0.6223.tgz</_AutoRestVersion>
<_AutoRestCoreVersion>3.0.6283</_AutoRestCoreVersion>
<_AutoRestCSharpVersion>https://github.com/Azure/autorest.csharp/releases/download/3.0.0-dev.20200612.2/autorest-csharp-v3-3.0.0-dev.20200612.2.tgz</_AutoRestCSharpVersion>
<_SupportsCodeGeneration Condition="'$(IsClientLibrary)' == 'true'">true</_SupportsCodeGeneration>
<_DefaultInputName Condition="Exists('$(MSBuildProjectDirectory)/autorest.md')">$(MSBuildProjectDirectory)/autorest.md</_DefaultInputName>
<AutoRestInput Condition="'$(AutoRestInput)' == ''">$(_DefaultInputName)</AutoRestInput>
Expand Down Expand Up @@ -48,3 +48,7 @@







Loading