@@ -253,6 +253,38 @@ var _ = Describe("Main Tests", func() {
253253 Expect (isNodePort ).To (BeFalse ())
254254 })
255255
256+ It ("verifies Common not in list of partitions" , func () {
257+ defer _init ()
258+ os .Args = []string {
259+ "./bin/k8s-bigip-ctlr" ,
260+ "--namespace=testing" ,
261+ "--bigip-partition=velcro1" ,
262+ "--bigip-partition=velcro2" ,
263+ "--bigip-password=admin" ,
264+ "--bigip-url=bigip.example.com" ,
265+ "--bigip-username=admin" ,
266+ "--vs-snat-pool-name=test-snat-pool" }
267+ flags .Parse (os .Args )
268+ argError := verifyArgs ()
269+ Expect (argError ).To (BeNil ())
270+ hasCommon := hasCommonPartition (* bigIPPartitions )
271+ Expect (hasCommon ).To (BeFalse ())
272+
273+ os .Args = []string {
274+ "./bin/k8s-bigip-ctlr" ,
275+ "--namespace=testing" ,
276+ "--bigip-partition=velcro1" ,
277+ "--bigip-partition=Common" ,
278+ "--bigip-partition=velcro2" ,
279+ "--bigip-password=admin" ,
280+ "--bigip-url=bigip.example.com" ,
281+ "--bigip-username=admin" ,
282+ "--vs-snat-pool-name=test-snat-pool" }
283+ flags .Parse (os .Args )
284+ hasCommon = hasCommonPartition (* bigIPPartitions )
285+ Expect (hasCommon ).To (BeTrue ())
286+ })
287+
256288 It ("verifies args labels" , func () {
257289 defer _init ()
258290 os .Args = []string {
0 commit comments