Fix gate issues with functional-api job

Prevents etcdctl from hanging when etcd has not started by explictly
specifying connection timeouts.
Reduce swarm build time by removing the unneccessary dependency
between masters and nodes.
Only create 1 node instead of 2 nodes
Remove test_update_bay_name_for_existing_bay

Change-Id: If6724497b47247d2858b6da90309949f92314cfb
Closes-Bug: 1541105
This commit is contained in:
Corey O'Brien 2016-02-03 11:01:05 -05:00
parent 547780e22b
commit 1a9806b17f
3 changed files with 7 additions and 21 deletions

View File

@ -41,7 +41,11 @@ SCRIPT=/usr/local/bin/notify-heat
cat > $SCRIPT << EOF cat > $SCRIPT << EOF
#!/bin/sh #!/bin/sh
until etcdctl --peers $ETCD_SERVER_IP:2379 ls /v2/keys/swarm/docker/swarm/nodes/$myip:2375 until etcdctl \
--peers $ETCD_SERVER_IP:2379 \
--timeout 1s \
--total-timeout 5s \
ls /v2/keys/swarm/docker/swarm/nodes/$myip:2375
do do
echo "Waiting for swarm agent registration..." echo "Waiting for swarm agent registration..."
sleep 5 sleep 5

View File

@ -299,7 +299,6 @@ resources:
type: "OS::Heat::ResourceGroup" type: "OS::Heat::ResourceGroup"
depends_on: depends_on:
- extrouter_inside - extrouter_inside
- swarm_masters
properties: properties:
count: {get_param: number_of_nodes} count: {get_param: number_of_nodes}
resource_def: resource_def:

View File

@ -106,7 +106,8 @@ class BayTest(base.BaseMagnumTest):
# they time out on the gate (2 hours not enough) # they time out on the gate (2 hours not enough)
@testtools.testcase.attr('positive') @testtools.testcase.attr('positive')
def test_create_list_and_delete_bays(self): def test_create_list_and_delete_bays(self):
gen_model = datagen.valid_bay_data(baymodel_id=self.baymodel.uuid) gen_model = datagen.valid_bay_data(
baymodel_id=self.baymodel.uuid, node_count=1)
_, temp_model = self._create_bay(gen_model) _, temp_model = self._create_bay(gen_model)
resp, model = self.bay_client.list_bays() resp, model = self.bay_client.list_bays()
self.assertEqual(resp.status, 200) self.assertEqual(resp.status, 200)
@ -139,24 +140,6 @@ class BayTest(base.BaseMagnumTest):
exceptions.BadRequest, exceptions.BadRequest,
self.bay_client.post_bay, gen_model) self.bay_client.post_bay, gen_model)
@testtools.testcase.attr('negative')
def test_update_bay_baymodel_name_for_existing_bay(self):
first_model = datagen.valid_bay_data(baymodel_id=self.baymodel.uuid,
name='test')
_, old_model = self._create_bay(first_model)
patch_model = datagen.bay_name_patch_data()
self.assertRaises(
exceptions.BadRequest,
self.bay_client.patch_bay,
old_model.uuid, patch_model)
patch_baymodel = datagen.baymodel_name_patch_data()
self.assertRaises(
exceptions.BadRequest,
self.baymodel_client.patch_baymodel,
self.baymodel.uuid, patch_baymodel)
@testtools.testcase.attr('negative') @testtools.testcase.attr('negative')
def test_update_bay_for_nonexisting_bay(self): def test_update_bay_for_nonexisting_bay(self):
patch_model = datagen.bay_name_patch_data() patch_model = datagen.bay_name_patch_data()