tests: Use swarm-mode for api tests
* Swarm-mode is the fastest cluster to deploy since it doesn't require to pull anything from outside. * Add the output nodes for swarm-mode too. * Disable copy logs (I think a better practice is to copy logs on demand). * Don't run test_create_list_sign_delete_clusters, because it is very unstable on the CI. Partially-Implements: blueprint swarm-mode-support 2nd commit message: Update to Fedora Atomic 26 This patch moves the current master to test against Fedora Atomic 26, in addition, it switches to downloading from Fedora mirrors. 2nd-Change-Id: I9a97c0eb78b2c9d10e8be1501babb19e73ee70c1 3rd commit message: Set default iptables FORWARD policy to ACCEPT With the release of Docker 1.13 which is available in Fedora Atomic 26, it no longer sets the policy of the FORWARD chain to ACCEPT[1]. Therefore, CNI networking such as Flannel will cease to work. This patch sets the policy to ACCEPT so that traffic can work once again for deployments which are based on Docker versions which are newer than 1.13 [1]: https://github.com/moby/moby/pull/28257 3rd-Change-Id: I1457602748619f38f87542fc01a2996ee80e58b7 Closes-Bug: #1708454 Co-Authored-By: Mohammed Naser <mnaser@vexxhost.com> Change-Id: I86d4dcc94fff622be4ee2acc8dd60ed81bc5d433
This commit is contained in:
parent
1009ad4c60
commit
27c5a14ef9
|
@ -58,7 +58,7 @@ class BayTest(base.BaseTempestTest):
|
|||
creds=self.creds,
|
||||
type_of_creds='default',
|
||||
request_type='cert')
|
||||
model = datagen.valid_swarm_baymodel()
|
||||
model = datagen.valid_swarm_mode_baymodel()
|
||||
_, self.baymodel = self._create_baymodel(model)
|
||||
|
||||
# NOTE (dimtruck) by default tempest sets timeout to 20 mins.
|
||||
|
|
|
@ -74,7 +74,7 @@ class BayModelTest(base.BaseTempestTest):
|
|||
|
||||
@testtools.testcase.attr('positive')
|
||||
def test_create_get_public_baymodel(self):
|
||||
gen_model = datagen.valid_swarm_baymodel(is_public=True)
|
||||
gen_model = datagen.valid_swarm_mode_baymodel(is_public=True)
|
||||
self.assertRaises(
|
||||
exceptions.Forbidden,
|
||||
self.baymodel_client.post_baymodel, gen_model)
|
||||
|
|
|
@ -57,7 +57,7 @@ class BayModelAdminTest(base.BaseTempestTest):
|
|||
|
||||
@testtools.testcase.attr('positive')
|
||||
def test_create_get_public_baymodel(self):
|
||||
gen_model = datagen.valid_swarm_baymodel(is_public=True)
|
||||
gen_model = datagen.valid_swarm_mode_baymodel(is_public=True)
|
||||
resp, model = self._create_baymodel(gen_model)
|
||||
|
||||
resp, model = self.baymodel_client.get_baymodel(model.uuid)
|
||||
|
|
|
@ -63,7 +63,7 @@ class ClusterTest(base.BaseTempestTest):
|
|||
creds=self.creds,
|
||||
type_of_creds='default',
|
||||
request_type='cert')
|
||||
model = datagen.valid_swarm_cluster_template()
|
||||
model = datagen.valid_swarm_mode_cluster_template()
|
||||
_, self.cluster_template = self._create_cluster_template(model)
|
||||
|
||||
# NOTE (dimtruck) by default tempest sets timeout to 20 mins.
|
||||
|
|
|
@ -79,7 +79,7 @@ class ClusterTemplateTest(base.BaseTempestTest):
|
|||
|
||||
@testtools.testcase.attr('positive')
|
||||
def test_create_get_public_cluster_template(self):
|
||||
gen_model = datagen.valid_swarm_cluster_template(is_public=True)
|
||||
gen_model = datagen.valid_swarm_mode_cluster_template(is_public=True)
|
||||
self.assertRaises(
|
||||
exceptions.Forbidden,
|
||||
self.cluster_template_client.post_cluster_template, gen_model)
|
||||
|
|
|
@ -59,7 +59,7 @@ class ClusterTemplateAdminTest(base.BaseTempestTest):
|
|||
|
||||
@testtools.testcase.attr('positive')
|
||||
def test_create_get_public_cluster_template(self):
|
||||
gen_model = datagen.valid_swarm_cluster_template(is_public=True)
|
||||
gen_model = datagen.valid_swarm_mode_cluster_template(is_public=True)
|
||||
resp, model = self._create_cluster_template(gen_model)
|
||||
|
||||
resp, model = \
|
||||
|
|
|
@ -37,6 +37,7 @@ def gen_coe_dep_network_driver(coe):
|
|||
allowed_driver_types = {
|
||||
'kubernetes': ['flannel', None],
|
||||
'swarm': ['docker', 'flannel', None],
|
||||
'swarm-mode': ['docker', None],
|
||||
'mesos': ['docker', None],
|
||||
}
|
||||
driver_types = allowed_driver_types[coe]
|
||||
|
@ -47,6 +48,7 @@ def gen_coe_dep_volume_driver(coe):
|
|||
allowed_driver_types = {
|
||||
'kubernetes': ['cinder', None],
|
||||
'swarm': ['rexray', None],
|
||||
'swarm-mode': ['rexray', None],
|
||||
'mesos': ['rexray', None],
|
||||
}
|
||||
driver_types = allowed_driver_types[coe]
|
||||
|
@ -103,7 +105,7 @@ def baymodel_data(**kwargs):
|
|||
|
||||
data = {
|
||||
"name": data_utils.rand_name('bay'),
|
||||
"coe": "swarm",
|
||||
"coe": "swarm-mode",
|
||||
"tls_disabled": False,
|
||||
"network_driver": None,
|
||||
"volume_driver": None,
|
||||
|
@ -208,8 +210,8 @@ def baymodel_valid_data_with_specific_coe(coe):
|
|||
image_id=config.Config.image_id, coe=coe)
|
||||
|
||||
|
||||
def valid_swarm_baymodel(is_public=False):
|
||||
"""Generates a valid swarm baymodel with valid data
|
||||
def valid_swarm_mode_baymodel(is_public=False):
|
||||
"""Generates a valid swarm mode baymodel with valid data
|
||||
|
||||
:returns: BayModelEntity with generated data
|
||||
"""
|
||||
|
@ -218,7 +220,7 @@ def valid_swarm_baymodel(is_public=False):
|
|||
flavor_id=config.Config.flavor_id, public=is_public,
|
||||
dns_nameserver=config.Config.dns_nameserver,
|
||||
master_flavor_id=config.Config.master_flavor_id,
|
||||
keypair_id=config.Config.keypair_id, coe="swarm",
|
||||
keypair_id=config.Config.keypair_id, coe="swarm-mode",
|
||||
cluster_distro=None,
|
||||
external_network_id=config.Config.nic_id,
|
||||
http_proxy=None, https_proxy=None, no_proxy=None,
|
||||
|
@ -343,7 +345,7 @@ def cluster_template_data(**kwargs):
|
|||
|
||||
data = {
|
||||
"name": data_utils.rand_name('cluster'),
|
||||
"coe": "swarm",
|
||||
"coe": "swarm-mode",
|
||||
"tls_disabled": False,
|
||||
"network_driver": None,
|
||||
"volume_driver": None,
|
||||
|
@ -485,8 +487,8 @@ def cluster_template_valid_data_with_specific_coe(coe):
|
|||
image_id=config.Config.image_id, coe=coe)
|
||||
|
||||
|
||||
def valid_swarm_cluster_template(is_public=False):
|
||||
"""Generates a valid swarm cluster_template with valid data
|
||||
def valid_swarm_mode_cluster_template(is_public=False):
|
||||
"""Generates a valid swarm-mode cluster_template with valid data
|
||||
|
||||
:returns: ClusterTemplateEntity with generated data
|
||||
"""
|
||||
|
@ -496,7 +498,7 @@ def valid_swarm_cluster_template(is_public=False):
|
|||
public=is_public,
|
||||
dns_nameserver=config.Config.dns_nameserver,
|
||||
master_flavor_id=master_flavor_id,
|
||||
coe="swarm",
|
||||
coe="swarm-mode",
|
||||
cluster_distro=None,
|
||||
external_network_id=config.Config.nic_id,
|
||||
http_proxy=None, https_proxy=None,
|
||||
|
|
Loading…
Reference in New Issue