Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define custom platform for HSM tests #17925

Merged
8 commits merged into from
Feb 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
  •  
  •  
  •  
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