-
Notifications
You must be signed in to change notification settings - Fork 0
/
RunTest.bat
180 lines (133 loc) · 9.9 KB
/
RunTest.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
@echo off
cd C:\Users\bhill\source\repos\citrix-adc-orchestrator\CitrixAdcTestConsole\bin\Debug\netcoreapp3.1
set Machine=NetScalerBaseUrlMinusHttps
set ApiUser=SomeNetScalerApiUser
set ApiPassword=SomeNetScalerPassword
echo ***********************************
echo Starting Single Firewall Test Cases
echo ***********************************
set clientmachine=%Machine%
set password=%ApiPassword%
set user=%ApiUser%
set storepath=/nsconfig/ssl/
echo ***********************************
echo Starting Management Test Cases
echo ***********************************
set casename=Management
set cert=%random%
set casename=Management
set mgt=add
set overwrite=false
goto bindingscenario
echo ************************************************************************************************************************
echo TC1 %mgt% add unbound certificate. Should do the %mgt% and not bind the certificate to any virtual servers
echo ************************************************************************************************************************
echo overwrite: %overwrite%
echo cert name: %cert%
CitrixAdcTestConsole.exe -clientmachine=%clientmachine% -casename=%casename% -user=%user% -password=%password% -storepath=%storepath% -managementtype=%mgt% -certalias=%cert% -virtualservername= -overwrite=%overwrite% -isrenew=false -snicert=false -domain=citrixadc.boingy.com
set mgt=remove
set overwrite=false
echo ************************************************************************************************************************
echo TC2 %mgt% unbound cert. Should %mgt% the cert in Test Case 1 with no issues because it is not bound
echo ************************************************************************************************************************
echo overwrite: %overwrite%
echo cert name: %cert%
CitrixAdcTestConsole.exe -clientmachine=%clientmachine% -casename=%casename% -user=%user% -password=%password% -storepath=%storepath% -managementtype=%mgt% -certalias=%cert% -virtualservername= -overwrite=%overwrite% -isrenew=false -snicert=false -domain=citrixadc.boingy.com
set cert=%random%
set mgt=add
set overwrite=false
echo ************************************************************************************************************************
echo TC3 %mgt% add bound certificate with Alias. Should do the %mgt% and bind the certificate to one virtual server
echo ************************************************************************************************************************
echo overwrite: %overwrite%
echo cert name: %cert%
CitrixAdcTestConsole.exe -clientmachine=%clientmachine% -casename=%casename% -user=%user% -password=%password% -storepath=%storepath% -managementtype=%mgt% -certalias=%cert% -virtualservername=TestVServer -overwrite=%overwrite% -isrenew=false -snicert=false -domain=citrixadc.boingy.com
:bindingscenario
set cert=%random%
set casename=Management
set mgt=add
set overwrite=true
echo ************************************************************************************************************************
echo TC4 %mgt% add multiple bound certificate with Alias. Should do the %mgt% and bind the certificate to many virtual servers
echo ************************************************************************************************************************
echo overwrite: %overwrite%
echo cert name: %cert%
CitrixAdcTestConsole.exe -clientmachine=%clientmachine% -casename=%casename% -user=%user% -password=%password% -storepath=%storepath% -managementtype=%mgt% -certalias=%cert% -virtualservername=TestVServer,TestVServer2 -overwrite=%overwrite% -isrenew=false -snicert=false,false -domain=citrixadc.boingy.com
set mgt=remove
set overwrite=false
echo:
echo *******************************************************************************************************
echo TC5 %mgt% remove bound certificate. Should not %mgt% the cert and give error, b/c it is bound.
echo *******************************************************************************************************
echo overwrite: %overwrite%
echo cert name: %cert%
CitrixAdcTestConsole.exe -clientmachine=%clientmachine% -casename=%casename% -user=%user% -password=%password% -storepath=%storepath% -managementtype=%mgt% -certalias=%cert% -virtualservername= -overwrite=%overwrite% -isrenew=false -snicert=false -domain=citrixadc.boingy.com
set mgt=add
set overwrite=true
echo:
echo *******************************************************************************************************
echo TC6 %mgt% renew bound certificate. Should %mgt% the cert and renew it to the two bindings in TC4
echo *******************************************************************************************************
echo overwrite: %overwrite%
echo cert name: %cert%
CitrixAdcTestConsole.exe -clientmachine=%clientmachine% -casename=%casename% -user=%user% -password=%password% -storepath=%storepath% -managementtype=%mgt% -certalias=%cert% -virtualservername= -overwrite=%overwrite% -isrenew=true -snicert=false -domain=citrixadc.boingy.com
set mgt=add
set overwrite=false
echo:
echo *******************************************************************************************************
echo TC7 %mgt% replace cert without overwrite flag, should warn you to use overwrite flag.
echo *******************************************************************************************************
echo overwrite: %overwrite%
echo cert name: %cert%
CitrixAdcTestConsole.exe -clientmachine=%clientmachine% -casename=%casename% -user=%user% -password=%password% -storepath=%storepath% -managementtype=%mgt% -certalias=%cert% -virtualservername= -overwrite=%overwrite% -isrenew=false -snicert=false -domain=citrixadc.boingy.com
set mgt=add
set overwrite=true
echo:
echo *******************************************************************************************************
echo TC8 %mgt% replace cert with overwrite flag, should replace the certificate.
echo *******************************************************************************************************
echo overwrite: %overwrite%
echo cert name: %cert%
CitrixAdcTestConsole.exe -clientmachine=%clientmachine% -casename=%casename% -user=%user% -password=%password% -storepath=%storepath% -managementtype=%mgt% -certalias=%cert% -virtualservername= -overwrite=%overwrite% -isrenew=false -snicert=false -domain=citrixadc.boingy.com
set mgt=add
set overwrite=false
set cert=%random%
echo ************************************************************************************************************************
echo TC9 %mgt% add bound certificate with Alias Sni. Should do the %mgt% and bind the sni certificate to one virtual server
echo ************************************************************************************************************************
echo overwrite: %overwrite%
echo cert name: %cert%
CitrixAdcTestConsole.exe -clientmachine=%clientmachine% -casename=%casename% -user=%user% -password=%password% -storepath=%storepath% -managementtype=%mgt% -certalias=%cert% -virtualservername=TestVServer2 -overwrite=%overwrite% -isrenew=false -snicert=true -domain=sni.boingy.com
set mgt=add
set overwrite=true
echo ***********************************************************************************************************************
echo TC10 %mgt% renew bound cert with Alias Sni. Should do the %mgt% and bind the sni certificate to one virtual server
echo ***********************************************************************************************************************
echo overwrite: %overwrite%
echo cert name: %cert%
CitrixAdcTestConsole.exe -clientmachine=%clientmachine% -casename=%casename% -user=%user% -password=%password% -storepath=%storepath% -managementtype=%mgt% -certalias=%cert% -virtualservername=TestVServer2 -overwrite=%overwrite% -isrenew=true -snicert=true -domain=sni.boingy.com
set mgt=add
set overwrite=true
echo ***********************************************************************************************************************
echo TC11 %mgt% replace bound cert with Alias Sni. Should do the %mgt% and bind the sni certificate to one virtual server
echo ***********************************************************************************************************************
echo overwrite: %overwrite%
echo cert name: %cert%
CitrixAdcTestConsole.exe -clientmachine=%clientmachine% -casename=%casename% -user=%user% -password=%password% -storepath=%storepath% -managementtype=%mgt% -certalias=%cert% -virtualservername=TestVServer2 -overwrite=%overwrite% -isrenew=false -snicert=true -domain=sni.boingy.com
set mgt=remove
set overwrite=true
echo ***********************************************************************************************************************
echo TC12 %mgt% remove bound cert with Alias Sni. Should not allow the %mgt% since it is bound
echo ***********************************************************************************************************************
echo overwrite: %overwrite%
echo cert name: %cert%
CitrixAdcTestConsole.exe -clientmachine=%clientmachine% -casename=%casename% -user=%user% -password=%password% -storepath=%storepath% -managementtype=%mgt% -certalias=%cert% -virtualservername=TestVServer2 -overwrite=%overwrite% -isrenew=false -snicert=true -domain=sni.boingy.com
set mgt=add
set overwrite=true
echo ***********************************************************************************************************************
echo TC13 %mgt% Multiple Server Replace. Should allow the %mgt% on multiple servers and update the SNI Accordingly on both
echo ***********************************************************************************************************************
echo overwrite: %overwrite%
echo cert name: %cert%
CitrixAdcTestConsole.exe -clientmachine=%clientmachine% -casename=%casename% -user=%user% -password=%password% -storepath=%storepath% -managementtype=%mgt% -certalias=%cert% -virtualservername=TestVServer,TestVServer2 -overwrite=%overwrite% -isrenew=false -snicert=false,true -domain=sni.boingy.com
@pause