Skip to content
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.

Commit

Permalink
Load Balancer (Tests): Add Load Balancer AppProfile (Context)
Browse files Browse the repository at this point in the history
  • Loading branch information
alagoutte committed Aug 12, 2019
1 parent eaf6017 commit 04293d6
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions tests/integration/20.LB.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,7 @@ Describe "Edge Load Balancer" {
}
}

Context "Load Balancer" {

it "Enable Load Balancer" {
Get-NsxEdge $lbedge1name | Get-NsxLoadBalancer | Set-NsxLoadBalancer -Enabled
$lb = Get-NsxEdge $lbedge1name | Get-NsxLoadBalancer
$lb.enabled | Should be $true
}
Context "Load Balancer App Profile" {

it "Add LB AppProfile" {
#Create LB App Profile
Expand All @@ -129,6 +123,17 @@ Describe "Edge Load Balancer" {
$lb_app_profile.sslPassthrough | should be "false"
}

}
Context "Load Balancer" {

it "Enable Load Balancer" {
Get-NsxEdge $lbedge1name | Get-NsxLoadBalancer | Set-NsxLoadBalancer -Enabled
$lb = Get-NsxEdge $lbedge1name | Get-NsxLoadBalancer
$lb.enabled | Should be $true
}



it "Add LB VIP" {
#Create LB Pool
$pool = Get-NsxEdge $lbedge1name | Get-NsxLoadBalancer | New-NsxLoadBalancerPool -name pester_lb_pool2 -Description "Pester LB Pool 2" -Transparent:$true -Algorithm ip-hash -Monitor $Monitor
Expand All @@ -137,6 +142,9 @@ Describe "Edge Load Balancer" {
$pool = $pool | Add-NsxLoadBalancerPoolMember -name "VM03" -IpAddress 2.2.2.3 -Port 80
$pool = $pool | Add-NsxLoadBalancerPoolMember -name "VM04" -IpAddress 2.2.2.4 -Port 80

#Create LB App Profile
Get-NsxEdge $lbedge1name | Get-NsxLoadBalancer | New-NsxLoadBalancerApplicationProfile -Name pester_lb_app_profile -Type http

#Finally add VIP
$lb_pool = Get-NsxEdge $lbedge1name | Get-NsxLoadBalancer | Get-NsxLoadBalancerPool pester_lb_pool2
$lb_app_profile = Get-NsxEdge $lbedge1name | Get-NsxLoadBalancer | Get-NsxLoadBalancerApplicationProfile -Name pester_lb_app_profile
Expand Down

0 comments on commit 04293d6

Please sign in to comment.