Skip to content

Commit d2e29ac

Browse files
committed
Added tests for builtin resources
1 parent 74d1ec8 commit d2e29ac

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

ITTests/Simple.ITTests.ps1

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,37 @@ Describe "Netscaler Get-*" {
5252
$Cert | Should Not BeNullOrEmpty
5353
$Cert.certkey | Should Be "ns-server-certificate"
5454
}
55+
56+
It "should list builtin responder policies" {
57+
$Result = Get-NSResponderPolicy -ShowBuiltin
58+
59+
$Result | Should Not BeNullOrEmpty
60+
# TODO: this is fragile, it probably depends on the NS version
61+
$Result.Count | Should Be 6
62+
}
63+
64+
It "should list builtin rewrite actions" {
65+
$Result = Get-NSRewriteAction -ShowBuiltin
66+
67+
$Result | Should Not BeNullOrEmpty
68+
# TODO: this is fragile, it probably depends on the NS version
69+
$Result.Count | Should Be 45
70+
}
71+
72+
It "should list builtin rewrite policies" {
73+
$Result = Get-NSRewritePolicy -ShowBuiltin
74+
75+
$Result | Should Not BeNullOrEmpty
76+
# TODO: this is fragile, it probably depends on the NS version
77+
$Result.Count | Should Be 49
78+
}
5579
}
5680

5781
Describe "Netscaler" {
5882
$Session = Connect-Netscaler -Hostname $Nsip -Credential $Credential -PassThru
5983

6084

61-
It "should add a server" {
85+
It "should add a LB server" {
6286
New-NSLBServer -Name 'srv-test' -IPAddress 1.2.3.4
6387

6488
Compare-NSConfig $OldConf | Should Match "=> add server srv-test 1.2.3.4"

0 commit comments

Comments
 (0)