зеркало из https://github.com/Azure/benchpress.git
1.5 KiB
1.5 KiB
How To Run ContainerApp.Tests.ps1
ContainerApp.Tests.ps1
contains examples of using the Confirm-AzBPContainerApp
and the
Confirm-AzBPContainerAppManagedEnv
cmdlet.
Pre-Requisites
- Follow the setup instructions
Steps
-
Navigate to ContainerApp directory:
cd examples\ContainerApp\
-
Deploy the Container Registry to your resource group:
New-AzResourceGroupDeployment -ResourceGroupName "<your-resource-group-name>"` -TemplateFile ".\containerApp.bicep"
-
Update
ContainerApp.Tests.ps1
variables to point to your expected resources:rg-test
->your-resource-group-name
containerAppBenchPressTest
->your-container-application-name
managedenvbenchpresstest
->your-container-application-managed-environment-name
westus3
->your-resource-group-location-name
-
If using a local copy of
BenchPress.Azure
, replaceImport-Module BenchPress.Azure
withImport-Module "../../bin/BenchPress.Azure.psd1"
. Note that the finalAfterAll
step will properly remove the module regardless of which method is chosen to load the module. -
Run
ContainerApp.Tests.ps1
:Invoke-Pester -Path .\ContainerApp.Tests.ps1
-
Success!
Tests completed in 5.02s Tests Passed: 7, Failed: 0, Skipped: 0 NotRun: 0
-
Don't forget to delete any deployed resources that are no longer needed.