@@ -32,6 +32,7 @@ const (
3232 requestPercent = 100
3333 batchSize = 10
3434 initPoolSize = 10
35+ ncID = "6a07155a-32d7-49af-872f-1e70ee366dc0"
3536)
3637
3738var dnsservers = []string {"8.8.8.8" , "8.8.4.4" }
@@ -61,7 +62,6 @@ func TestCreateAndUpdateNCWithSecondaryIPNCVersion(t *testing.T) {
6162 // NC version set as 0 which is the default initial value.
6263 ncVersion := 0
6364 secondaryIPConfigs := make (map [string ]cns.SecondaryIPConfig )
64- ncID := "testNc1"
6565
6666 // Build secondaryIPConfig, it will have one item as {IPAddress:"10.0.0.16", NCVersion: 0}
6767 ipAddress := "10.0.0.16"
@@ -219,7 +219,6 @@ func createNCReqeustForSyncHostNCVersion(t *testing.T) cns.CreateNetworkContaine
219219 // NC version set as 0 which is the default initial value.
220220 ncVersion := 0
221221 secondaryIPConfigs := make (map [string ]cns.SecondaryIPConfig )
222- ncID := "testNc1"
223222
224223 // Build secondaryIPConfig, it will have one item as {IPAddress:"10.0.0.16", NCVersion: 0}
225224 ipAddress := "10.0.0.16"
@@ -393,7 +392,6 @@ func setOrchestratorTypeInternal(orchestratorType string) {
393392
394393func validateCreateNCInternal (t * testing.T , secondaryIpCount int , ncVersion string ) {
395394 secondaryIPConfigs := make (map [string ]cns.SecondaryIPConfig )
396- ncId := "testNc1"
397395 ncVersionInInt , _ := strconv .Atoi (ncVersion )
398396 startingIndex := 6
399397 for i := 0 ; i < secondaryIpCount ; i ++ {
@@ -404,12 +402,11 @@ func validateCreateNCInternal(t *testing.T, secondaryIpCount int, ncVersion stri
404402 startingIndex ++
405403 }
406404
407- createAndValidateNCRequest (t , secondaryIPConfigs , ncId , ncVersion )
405+ createAndValidateNCRequest (t , secondaryIPConfigs , ncID , ncVersion )
408406}
409407
410408func validateCreateOrUpdateNCInternal (t * testing.T , secondaryIpCount int , ncVersion string ) {
411409 secondaryIPConfigs := make (map [string ]cns.SecondaryIPConfig )
412- ncId := "testNc1"
413410 ncVersionInInt , _ := strconv .Atoi (ncVersion )
414411 startingIndex := 6
415412 for i := 0 ; i < secondaryIpCount ; i ++ {
@@ -420,7 +417,7 @@ func validateCreateOrUpdateNCInternal(t *testing.T, secondaryIpCount int, ncVers
420417 startingIndex ++
421418 }
422419
423- createAndValidateNCRequest (t , secondaryIPConfigs , ncId , ncVersion )
420+ createAndValidateNCRequest (t , secondaryIPConfigs , ncID , ncVersion )
424421
425422 // now Validate Update, add more secondaryIPConfig and it should handle the update
426423 fmt .Println ("Validate Scaleup" )
@@ -432,7 +429,7 @@ func validateCreateOrUpdateNCInternal(t *testing.T, secondaryIpCount int, ncVers
432429 startingIndex ++
433430 }
434431
435- createAndValidateNCRequest (t , secondaryIPConfigs , ncId , ncVersion )
432+ createAndValidateNCRequest (t , secondaryIPConfigs , ncID , ncVersion )
436433
437434 // now Scale down, delete 3 ipaddresses from secondaryIPConfig req
438435 fmt .Println ("Validate Scale down" )
@@ -446,15 +443,15 @@ func validateCreateOrUpdateNCInternal(t *testing.T, secondaryIpCount int, ncVers
446443 }
447444 }
448445
449- createAndValidateNCRequest (t , secondaryIPConfigs , ncId , ncVersion )
446+ createAndValidateNCRequest (t , secondaryIPConfigs , ncID , ncVersion )
450447
451448 // Cleanup all SecondaryIps
452449 fmt .Println ("Validate no SecondaryIpconfigs" )
453450 for ipid := range secondaryIPConfigs {
454451 delete (secondaryIPConfigs , ipid )
455452 }
456453
457- createAndValidateNCRequest (t , secondaryIPConfigs , ncId , ncVersion )
454+ createAndValidateNCRequest (t , secondaryIPConfigs , ncID , ncVersion )
458455}
459456
460457func createAndValidateNCRequest (t * testing.T , secondaryIPConfigs map [string ]cns.SecondaryIPConfig , ncId , ncVersion string ) {
0 commit comments