-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
The goal of this design is to create a proposal for a high level abstraction for use in writing tests against Kubernetes in Benchpress.
Parent: #353
Initial spike:
BeforeAll {
Import-Module BenchPress.Kubernetes
}
Describe 'Verify Pods' {
It "Should contain 5 pods, when a kubeconfig is explicitly provided" {
# arrange
$params = @{
KubeConfigFile = "<path>"
}
$pods = Get-Pods $params
# act and assert
$pods.length | Should -Be 5
}
It "Should contain 5 pods, when the environment variable KUBECONFIG is set" {
# arrange
$Env:KUBECONFIG = "<path to kubeconfig file"
$pods = Get-Pods
# act and assert
$pods.length | Should -Be 5
}
It "Should contain 5 pods and use the default kubeconfig when no file or environment variable is set" {
# arrange
# should use the default kubeconfig
$pods = Get-Pods
# act and assert
$pods.length | Should -Be 5
}
}
AfterAll {
Get-Module BenchPress.Kubernetes | Remove-Module
}Metadata
Metadata
Assignees
Labels
No labels