From d5220a88a085385ebc4b783a40f27d128ea7d28f Mon Sep 17 00:00:00 2001 From: Gaurav Aradhye Date: Thu, 24 Jul 2014 13:38:38 +0530 Subject: [PATCH] CLOUDSTACK-7127: Fix for addRegion failure, avoiding regionid 1 while creating new region through test case (cherry picked from commit ca59f01602823a6d6fe84233f3a3d3ea499efa06) --- test/integration/component/test_regions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/integration/component/test_regions.py b/test/integration/component/test_regions.py index b40a48b1ce7..2a84943db72 100644 --- a/test/integration/component/test_regions.py +++ b/test/integration/component/test_regions.py @@ -46,7 +46,7 @@ class TestRegions(cloudstackTestCase): return def setUp(self): - pseudo_random_int = choice(xrange(1, 200)) + pseudo_random_int = choice(xrange(2, 200)) self.services["region"]["regionid"] = pseudo_random_int self.services["region"]["regionname"] = "region" + str(pseudo_random_int) self.services["region"]["regionendpoint"] = "http://region" + str(pseudo_random_int) + ":8080/client" @@ -78,7 +78,7 @@ class TestRegions(cloudstackTestCase): def test_createRegionWithExistingRegionName(self): """Test for duplicate checks on region name """ - random_int = choice(xrange(1, 200)) + random_int = choice(xrange(2, 200)) self.services["region"]["regionid"] = random_int #alter id but not name self.services["region"]["regionendpoint"] = "http://region" + str(random_int) + ":8080/client" self.assertRaises(Exception, Region.create, self.api_client, self.services["region"])