-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Perf] Update keyvault-secrets test to match .NET (#17799)
- Move single-secret code from SecretTest to GetSecretTest - Ensure vault contains 0 secrets before ListSecretsTest - Delete and purge all created secrets
- Loading branch information
1 parent
c2a25c7
commit 223e285
Showing
4 changed files
with
39 additions
and
24 deletions.
There are no files selected for viewing
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
13 changes: 12 additions & 1 deletion
13
sdk/keyvault/perf-tests/keyvault-secrets/test/getSecret.spec.ts
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,20 @@ | ||
import { SecretTest } from "./secretTest"; | ||
import { v4 as uuid } from "uuid"; | ||
|
||
export class GetSecretTest extends SecretTest { | ||
static secretName = `s-${uuid()}`; | ||
|
||
public options = {}; | ||
|
||
async globalSetup() { | ||
await this.secretClient.setSecret(GetSecretTest.secretName, "value"); | ||
} | ||
|
||
async runAsync(): Promise<void> { | ||
await this.secretClient.getSecret(SecretTest.secretName); | ||
await this.secretClient.getSecret(GetSecretTest.secretName); | ||
} | ||
|
||
async globalCleanup() { | ||
await this.deleteAndPurgeSecrets(GetSecretTest.secretName); | ||
} | ||
} |
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
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