Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,11 @@ public override async Task GlobalCleanupAsync()
public override void Run(CancellationToken cancellationToken)
{
using X509Certificate2 x509certificate = Client.DownloadCertificate(_certificateName);
string subject = x509certificate.Subject;

#if DEBUG
Assert.AreEqual("CN=Azure SDK", subject);
#endif
}

public override async Task RunAsync(CancellationToken cancellationToken)
{
using X509Certificate2 x509certificate = await Client.DownloadCertificateAsync(_certificateName);
string subject = x509certificate.Subject;

#if DEBUG
Assert.AreEqual("CN=Azure SDK", subject);
#endif
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,11 @@ public override async Task GlobalCleanupAsync()
public override void Run(CancellationToken cancellationToken)
{
KeyVaultCertificate certificate = Client.GetCertificate(_certificateName);
using X509Certificate2 x509certificate = new(certificate.Cer);
string subject = x509certificate.Subject;

#if DEBUG
Assert.AreEqual("CN=Azure SDK", subject);
#endif
}

public override async Task RunAsync(CancellationToken cancellationToken)
{
KeyVaultCertificate certificate = await Client.GetCertificateAsync(_certificateName);
using X509Certificate2 x509certificate = new(certificate.Cer);
string subject = x509certificate.Subject;

#if DEBUG
Assert.AreEqual("CN=Azure SDK", subject);
#endif
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,11 @@ public override async Task SetupAsync()
public override void Run(CancellationToken cancellationToken)
{
DecryptResult result = CryptographyClient.Decrypt(s_algorithm, _ciphertext);
byte[] plaintext = result.Plaintext;

#if DEBUG
Assert.AreEqual(_plaintext, plaintext);
#endif
}

public override async Task RunAsync(CancellationToken cancellationToken)
{
DecryptResult result = await CryptographyClient.DecryptAsync(s_algorithm, _ciphertext);
byte[] plaintext = result.Plaintext;

#if DEBUG
Assert.AreEqual(_plaintext, plaintext);
#endif
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,11 @@ public GetKey(PerfOptions options) : base(options)
public override void Run(CancellationToken cancellationToken)
{
KeyVaultKey key = Client.GetKey(KeyName);
KeyType keyType = key.Key.KeyType;
#if DEBUG
Assert.AreEqual(KeyType.Rsa, keyType);
#endif
}

public override async Task RunAsync(CancellationToken cancellationToken)
{
KeyVaultKey key = await Client.GetKeyAsync(KeyName);
KeyType keyType = key.Key.KeyType;
#if DEBUG
Assert.AreEqual(KeyType.Rsa, keyType);
#endif
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,11 @@ public override async Task SetupAsync()
public override void Run(CancellationToken cancellationToken)
{
SignResult result = CryptographyClient.Sign(s_algorithm, _digest);
byte[] signature = result.Signature;

#if DEBUG
Assert.AreEqual(256, signature.Length);
#endif
}

public override async Task RunAsync(CancellationToken cancellationToken)
{
SignResult result = await CryptographyClient.SignAsync(s_algorithm, _digest);
byte[] signature = result.Signature;

#if DEBUG
Assert.AreEqual(256, signature.Length);
#endif
}

public override void Dispose(bool disposing)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,11 @@ public override async Task SetupAsync()
public override void Run(CancellationToken cancellationToken)
{
UnwrapResult result = CryptographyClient.UnwrapKey(KeyWrapAlgorithm.RsaOaep256, _encryptedKey);
byte[] key = result.Key;

#if DEBUG
Assert.AreEqual(_aes.Key, key);
#endif
}

public override async Task RunAsync(CancellationToken cancellationToken)
{
UnwrapResult result = await CryptographyClient.UnwrapKeyAsync(s_algorithm, _encryptedKey);
byte[] key = result.Key;

#if DEBUG
Assert.AreEqual(_aes.Key, key);
#endif
}

public override void Dispose(bool disposing)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,11 @@ public override async Task GlobalCleanupAsync()
public override void Run(CancellationToken cancellationToken)
{
KeyVaultSecret secret = Client.GetSecret(_secretName);
string value = secret.Value;

#if DEBUG
Assert.AreEqual(SecretValue, value);
#endif
}

public override async Task RunAsync(CancellationToken cancellationToken)
{
KeyVaultSecret secret = await Client.GetSecretAsync(_secretName);
string value = secret.Value;

#if DEBUG
Assert.AreEqual(SecretValue, value);
#endif
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ public override void Run(CancellationToken cancellationToken)
{
count++;
}

#if DEBUG
Assert.AreEqual(Options.Count, count);
#endif
}

public override async Task RunAsync(CancellationToken cancellationToken)
Expand All @@ -79,10 +75,6 @@ public override async Task RunAsync(CancellationToken cancellationToken)
{
count++;
}

#if DEBUG
Assert.AreEqual(Options.Count, count);
#endif
}
}
}