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
- task: VSTest@2 | |
displayName: 'VsTest - Integration Tests' | |
inputs: | |
testAssemblyVer2: | | |
**\MyNamespace.IntegrationTests.dll | |
!**\*xunit.runner*.dll | |
!**\obj\** | |
codeCoverageEnabled: true | |
diagnosticsEnabled: true | |
rerunFailedTests: true |
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
- task: VSTest@2 | |
inputs: | |
testAssemblyVer2: | | |
**\$(BuildConfiguration)\**\*Tests*.dll | |
!**\$(BuildConfiguration)\**\*Models*.dll | |
!**\*TestAdapter.dll | |
!**\obj\** | |
!**\$(BuildConfiguration)\**\*IntegrationTests*.dll | |
codeCoverageEnabled: true | |
testRunTitle: '$(Build.DefinitionName) | $(Build.Reason) |$(Build.SourceVersion)' |
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
public static class ConfigHelper | |
{ | |
private static readonly IConfigurationRoot Config; | |
static ConfigHelper() | |
{ | |
Config = new ConfigurationBuilder() | |
.SetBasePath(AppContext.BaseDirectory) | |
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) | |
.Build(); | |
} |
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
{ | |
"AppSettings":{ | |
"AzureKeyVault":"https://hours-key-vault.vault.azure.net/", | |
"Title": "Something that is not secret" | |
}, | |
"Comment":"Connection strings don't include passwords - these are stored in Secret Manager or Azure key Vault", | |
"ConnectionStrings": { | |
"BeautifulLoopProcessing" : "Server=tcp:xxx.database.windows.net,1433;Initial Catalog=xxx-xxx-xxx-dev;Persist Security Info=False;User ID=xxxxx;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;" | |
} | |
} |
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
az keyvault set-policy --name {KEY VAULT NAME} --object-id {OBJECT ID} --secret-permissions get list |
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
using System; | |
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Hosting; | |
using VSTestKeyVault.Models; | |
using Azure.Identity; | |
using Azure.Security.KeyVault.Secrets; | |
using Azure.Core; |
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
requests | where name == "OperationName" | | |
where timestamp > ago(30d) and operation_Name != "" | |
| summarize avg(duration) by operation_Name, bin(timestamp, 1d) |
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
requests | where timestamp > ago(7d) | |
| summarize count(), min(duration) , max(duration), avg(duration) by operation_Name |
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
requests | where timestamp > ago(30d) | |
| summarize count() by resultCode |
NewerOlder