Skip to content

Commit

Permalink
Define custom platform for HSM tests (#17925)
Browse files Browse the repository at this point in the history
Resolves #16483
  • Loading branch information
heaths authored Feb 6, 2021
1 parent 7db5b3b commit fa7b44b
Show file tree
Hide file tree
Showing 436 changed files with 27,201 additions and 43,818 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ public KeyVaultAccessControlClient(System.Uri vaultUri, Azure.Core.TokenCredenti
}
public partial class KeyVaultAdministrationClientOptions : Azure.Core.ClientOptions
{
public KeyVaultAdministrationClientOptions(Azure.Security.KeyVault.Administration.KeyVaultAdministrationClientOptions.ServiceVersion version = Azure.Security.KeyVault.Administration.KeyVaultAdministrationClientOptions.ServiceVersion.V7_2_Preview) { }
public KeyVaultAdministrationClientOptions(Azure.Security.KeyVault.Administration.KeyVaultAdministrationClientOptions.ServiceVersion version = Azure.Security.KeyVault.Administration.KeyVaultAdministrationClientOptions.ServiceVersion.V7_2) { }
public Azure.Security.KeyVault.Administration.KeyVaultAdministrationClientOptions.ServiceVersion Version { get { throw null; } }
public enum ServiceVersion
{
V7_2_Preview = 1,
V7_2 = 1,
}
}
public static partial class KeyVaultAdministrationModelFactory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ BackupOperation backupOperation = await Client.StartBackupAsync(builder.Uri, sas
// Wait for completion of the BackupOperation.
Response<BackupResult> backupResult = await backupOperation.WaitForCompletionAsync();

// Get the Uri for the location of you backup blob.
// Get the Uri for the location of your backup blob.
Uri folderUri = backupResult.Value.FolderUri;
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class KeyVaultAdministrationClientOptions : ClientOptions
/// For more information, see
/// <see href="https://docs.microsoft.com/rest/api/keyvault/key-vault-versions">Key Vault versions</see>.
/// </summary>
internal const ServiceVersion LatestVersion = ServiceVersion.V7_2_Preview;
internal const ServiceVersion LatestVersion = ServiceVersion.V7_2;

/// <summary>
/// The versions of Azure Key Vault supported by this client
Expand All @@ -26,9 +26,9 @@ public enum ServiceVersion
{
#pragma warning disable CA1707 // Identifiers should not contain underscores
/// <summary>
/// The Key Vault API version 7.2-preview.
/// The Key Vault API version 7.2.
/// </summary>
V7_2_Preview = 1,
V7_2 = 1,
#pragma warning restore CA1707 // Identifiers should not contain underscores
}

Expand Down Expand Up @@ -58,7 +58,7 @@ internal string GetVersionString()
{
return Version switch
{
ServiceVersion.V7_2_Preview => "7.2-preview",
ServiceVersion.V7_2 => "7.2",

_ => throw new ArgumentException(Version.ToString()),
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Run `dotnet build /t:GenerateCode` in src directory to re-generate.
``` yaml
title: Azure.Security.KeyVault.Administration
input-file:
- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/a094846a5f9ee9e8a3cf3f3c809203e250798b22/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.2-preview/rbac.json
- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/a094846a5f9ee9e8a3cf3f3c809203e250798b22/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.2-preview/backuprestore.json
- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/612f78afd05911d0e1e82ba72b41781f655dbffb/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.2-preview/rbac.json
- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/612f78afd05911d0e1e82ba72b41781f655dbffb/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.2-preview/backuprestore.json
namespace: Azure.Security.KeyVault.Administration
include-csproj: disable
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ public FullBackupClientLiveTests(bool isAsync)
: base(isAsync, null /* RecordedTestMode.Record /* to re-record */)
{ }

public TimeSpan Timeout => TimeSpan.FromMinutes(5);

[RecordedTest]
public async Task BackupAndRestore()
{
var source = new CancellationTokenSource(TimeSpan.FromMinutes(2));
var source = new CancellationTokenSource(Timeout);

UriBuilder builder = new UriBuilder(TestEnvironment.StorageUri);
builder.Path = BlobContainerName;
Expand Down Expand Up @@ -53,7 +55,7 @@ public async Task BackupAndRestore()
[LiveOnly]
public async Task BackupAndRestoreMultiPartFolderName()
{
var source = new CancellationTokenSource(TimeSpan.FromMinutes(2));
var source = new CancellationTokenSource(Timeout);

UriBuilder builder = new UriBuilder(TestEnvironment.StorageUri);
builder.Path = BlobContainerNameMultiPart;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fa7b44b

Please sign in to comment.