Adopt ramdisk-func-test changes
Change https://review.openstack.org/415709 changes environment object API. This patch adopts our tests to this changes. Change-Id: I2fb3e0d03ea8b10013fd648f51bc7b4526071603
This commit is contained in:
parent
355667dc2e
commit
477933a85d
|
@ -128,11 +128,10 @@ is included with the distribution media.
|
||||||
|
|
||||||
def test_verify_policy_match(self):
|
def test_verify_policy_match(self):
|
||||||
deploy_conf = {
|
deploy_conf = {
|
||||||
"images": self.images,
|
|
||||||
"partitions": self.golden_image_schema,
|
"partitions": self.golden_image_schema,
|
||||||
"partitions_policy": "verify"
|
"partitions_policy": "verify"
|
||||||
}
|
}
|
||||||
|
self.env.patch_config_images(deploy_conf, 'test')
|
||||||
self.env.setup(node_template="data_retention.xml",
|
self.env.setup(node_template="data_retention.xml",
|
||||||
deploy_config=deploy_conf)
|
deploy_config=deploy_conf)
|
||||||
node = self.env.node
|
node = self.env.node
|
||||||
|
@ -164,11 +163,10 @@ is included with the distribution media.
|
||||||
"size": "2000"
|
"size": "2000"
|
||||||
})
|
})
|
||||||
deploy_conf = {
|
deploy_conf = {
|
||||||
"images": self.images,
|
|
||||||
"partitions": self.golden_image_schema,
|
"partitions": self.golden_image_schema,
|
||||||
"partitions_policy": "verify"
|
"partitions_policy": "verify"
|
||||||
}
|
}
|
||||||
|
self.env.patch_config_images(deploy_conf, 'test')
|
||||||
self.env.setup(node_template="data_retention.xml",
|
self.env.setup(node_template="data_retention.xml",
|
||||||
deploy_config=deploy_conf)
|
deploy_config=deploy_conf)
|
||||||
node = self.env.node
|
node = self.env.node
|
||||||
|
@ -189,15 +187,13 @@ is included with the distribution media.
|
||||||
self._assert_vdb_equal_to_goldenimage(node)
|
self._assert_vdb_equal_to_goldenimage(node)
|
||||||
|
|
||||||
def test_verify_policy_mismatch_extra_partition_on_hw(self):
|
def test_verify_policy_mismatch_extra_partition_on_hw(self):
|
||||||
last_partition = self.golden_image_schema[0]['volumes'][-1]
|
self.golden_image_schema[0]['volumes'].pop()
|
||||||
self.golden_image_schema[0]['volumes'].remove(last_partition)
|
|
||||||
|
|
||||||
deploy_conf = {
|
deploy_conf = {
|
||||||
"images": self.images,
|
|
||||||
"partitions": self.golden_image_schema,
|
"partitions": self.golden_image_schema,
|
||||||
"partitions_policy": "verify"
|
"partitions_policy": "verify"
|
||||||
}
|
}
|
||||||
|
self.env.patch_config_images(deploy_conf, 'test')
|
||||||
self.env.setup(node_template="data_retention.xml",
|
self.env.setup(node_template="data_retention.xml",
|
||||||
deploy_config=deploy_conf)
|
deploy_config=deploy_conf)
|
||||||
node = self.env.node
|
node = self.env.node
|
||||||
|
@ -223,11 +219,10 @@ is included with the distribution media.
|
||||||
usr_partition['keep_data'] = False
|
usr_partition['keep_data'] = False
|
||||||
|
|
||||||
deploy_conf = {
|
deploy_conf = {
|
||||||
"images": self.images,
|
|
||||||
"partitions": self.golden_image_schema,
|
"partitions": self.golden_image_schema,
|
||||||
"partitions_policy": "verify"
|
"partitions_policy": "verify"
|
||||||
}
|
}
|
||||||
|
self.env.patch_config_images(deploy_conf, 'test')
|
||||||
self.env.setup(node_template="data_retention.xml",
|
self.env.setup(node_template="data_retention.xml",
|
||||||
deploy_config=deploy_conf)
|
deploy_config=deploy_conf)
|
||||||
node = self.env.node
|
node = self.env.node
|
||||||
|
@ -253,14 +248,6 @@ is included with the distribution media.
|
||||||
|
|
||||||
def test_clean_policy(self):
|
def test_clean_policy(self):
|
||||||
deploy_conf = {
|
deploy_conf = {
|
||||||
"images": [
|
|
||||||
{
|
|
||||||
"name": "test",
|
|
||||||
"boot": True,
|
|
||||||
"target": "/",
|
|
||||||
"image_pull_url": "",
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"partitions": [
|
"partitions": [
|
||||||
{
|
{
|
||||||
"type": "disk",
|
"type": "disk",
|
||||||
|
@ -286,6 +273,7 @@ is included with the distribution media.
|
||||||
"partitions_policy": "clean"
|
"partitions_policy": "clean"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.env.patch_config_images(deploy_conf, 'test')
|
||||||
self.env.setup(node_template="data_retention.xml",
|
self.env.setup(node_template="data_retention.xml",
|
||||||
deploy_config=deploy_conf)
|
deploy_config=deploy_conf)
|
||||||
node = self.env.node
|
node = self.env.node
|
||||||
|
@ -328,14 +316,6 @@ Number Start End Size File system Flags
|
||||||
# NotEnoughSpaceError: Partition scheme for: /dev/vdb exceeds the size
|
# NotEnoughSpaceError: Partition scheme for: /dev/vdb exceeds the size
|
||||||
# of the disk. Scheme size is 150 MB, and disk size is 106.303488 MB.
|
# of the disk. Scheme size is 150 MB, and disk size is 106.303488 MB.
|
||||||
deploy_conf = {
|
deploy_conf = {
|
||||||
"images": [
|
|
||||||
{
|
|
||||||
"name": "test",
|
|
||||||
"boot": True,
|
|
||||||
"target": "/",
|
|
||||||
"image_pull_url": "",
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"partitions": [
|
"partitions": [
|
||||||
{
|
{
|
||||||
"type": "disk",
|
"type": "disk",
|
||||||
|
@ -361,6 +341,7 @@ Number Start End Size File system Flags
|
||||||
"partitions_policy": "clean"
|
"partitions_policy": "clean"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.env.patch_config_images(deploy_conf, 'test')
|
||||||
self.env.setup(node_template="data_retention.xml",
|
self.env.setup(node_template="data_retention.xml",
|
||||||
deploy_config=deploy_conf)
|
deploy_config=deploy_conf)
|
||||||
node = self.env.node
|
node = self.env.node
|
||||||
|
|
|
@ -21,14 +21,6 @@ from bareon import tests_functional
|
||||||
class LvmTestCase(tests_functional.TestCase):
|
class LvmTestCase(tests_functional.TestCase):
|
||||||
def test_multi_volume_multi_group(self):
|
def test_multi_volume_multi_group(self):
|
||||||
deploy_conf = {
|
deploy_conf = {
|
||||||
"images": [
|
|
||||||
{
|
|
||||||
"name": "test",
|
|
||||||
"boot": True,
|
|
||||||
"target": "/",
|
|
||||||
"image_pull_url": "",
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"partitions_policy": "clean",
|
"partitions_policy": "clean",
|
||||||
"partitions": [
|
"partitions": [
|
||||||
{
|
{
|
||||||
|
@ -117,6 +109,7 @@ class LvmTestCase(tests_functional.TestCase):
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
self.env.patch_config_images(deploy_conf, 'test')
|
||||||
self.env.setup(node_template="two_disks.xml",
|
self.env.setup(node_template="two_disks.xml",
|
||||||
deploy_config=deploy_conf)
|
deploy_config=deploy_conf)
|
||||||
node = self.env.node
|
node = self.env.node
|
||||||
|
@ -169,14 +162,6 @@ BYT;
|
||||||
|
|
||||||
def test_mixed_partitions_and_lvs(self):
|
def test_mixed_partitions_and_lvs(self):
|
||||||
deploy_conf = {
|
deploy_conf = {
|
||||||
"images": [
|
|
||||||
{
|
|
||||||
"name": "test",
|
|
||||||
"boot": True,
|
|
||||||
"target": "/",
|
|
||||||
"image_pull_url": "",
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"partitions_policy": "clean",
|
"partitions_policy": "clean",
|
||||||
"partitions": [
|
"partitions": [
|
||||||
{
|
{
|
||||||
|
@ -251,6 +236,8 @@ BYT;
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.env.patch_config_images(deploy_conf, 'test')
|
||||||
self.env.setup(node_template="two_disks.xml",
|
self.env.setup(node_template="two_disks.xml",
|
||||||
deploy_config=deploy_conf)
|
deploy_config=deploy_conf)
|
||||||
node = self.env.node
|
node = self.env.node
|
||||||
|
|
|
@ -115,7 +115,8 @@ Number Start End Size File system Name Flags
|
||||||
utils.assertNoDiff(expected, actual)
|
utils.assertNoDiff(expected, actual)
|
||||||
|
|
||||||
def test_provision_rsync(self):
|
def test_provision_rsync(self):
|
||||||
DEPLOY_DRIVER = 'rsync'
|
self.env.deploy_driver = 'rsync'
|
||||||
|
|
||||||
deploy_conf = {
|
deploy_conf = {
|
||||||
"images": [
|
"images": [
|
||||||
{
|
{
|
||||||
|
@ -124,7 +125,7 @@ Number Start End Size File system Name Flags
|
||||||
"target": "/",
|
"target": "/",
|
||||||
"image_pull_url": self.env.get_url_for_image(
|
"image_pull_url": self.env.get_url_for_image(
|
||||||
'centos-7.1.1503.fpa_func_test.raw',
|
'centos-7.1.1503.fpa_func_test.raw',
|
||||||
DEPLOY_DRIVER),
|
self.env.deploy_driver),
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"partitions_policy": "clean",
|
"partitions_policy": "clean",
|
||||||
|
@ -156,7 +157,7 @@ Number Start End Size File system Name Flags
|
||||||
node = self.env.node
|
node = self.env.node
|
||||||
|
|
||||||
node.run_cmd('bareon-provision --data_driver ironic '
|
node.run_cmd('bareon-provision --data_driver ironic '
|
||||||
'--deploy_driver %s' % DEPLOY_DRIVER,
|
'--deploy_driver %s' % self.env.deploy_driver,
|
||||||
check_ret_code=True,
|
check_ret_code=True,
|
||||||
get_bareon_log=True)
|
get_bareon_log=True)
|
||||||
|
|
||||||
|
@ -192,9 +193,9 @@ Number Start End Size File system Name Flags
|
||||||
|
|
||||||
class MultipleProvisioningTestCase(tests_functional.TestCase):
|
class MultipleProvisioningTestCase(tests_functional.TestCase):
|
||||||
def test_multiple_provisioning(self):
|
def test_multiple_provisioning(self):
|
||||||
DEPLOY_DRIVER = 'swift'
|
self.env.deploy_driver = 'swift'
|
||||||
image_url = self.env.get_url_for_image(
|
image_url = self.env.get_url_for_image(
|
||||||
"centos-7.1.1503.fpa_func_test.raw", DEPLOY_DRIVER)
|
"centos-7.1.1503.fpa_func_test.raw", self.env.deploy_driver)
|
||||||
|
|
||||||
deploy_conf = {
|
deploy_conf = {
|
||||||
"images": [
|
"images": [
|
||||||
|
@ -255,7 +256,7 @@ class MultipleProvisioningTestCase(tests_functional.TestCase):
|
||||||
node = self.env.node
|
node = self.env.node
|
||||||
|
|
||||||
node.run_cmd('bareon-provision --data_driver ironic '
|
node.run_cmd('bareon-provision --data_driver ironic '
|
||||||
'--deploy_driver %s' % DEPLOY_DRIVER,
|
'--deploy_driver %s' % self.env.deploy_driver,
|
||||||
check_ret_code=True,
|
check_ret_code=True,
|
||||||
get_bareon_log=True)
|
get_bareon_log=True)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue