Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Fixed OSTF tests for Murano 0.4.1 release.
Browse files Browse the repository at this point in the history
Removed two extra test cases with deployment of Server Farms,
because Murano uses Neutron Load Balancer for Server Farms and we
have no support of Neutron LB in Mirantis OpenStack.

Also fixed issue with keypairs for linux-based services (it is changed
in Murano and OSTF tests should meet new Murano changes)

Implements blueprint: do-not-use-key-pair-for-murano-ostf-tests

Change-Id: I1066f01e2ff1cc147b217c1bbe1c1d112af06b0f
  • Loading branch information
TimurNurlygayanov committed Jan 28, 2014
1 parent 338ddf8 commit 6816570
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 184 deletions.
6 changes: 0 additions & 6 deletions fuel_health/murano.py
Expand Up @@ -59,12 +59,6 @@ def find_murano_image(self, image_type):
if image_type == metadata['type']:
return image

def find_keypair(self, keyname):
"""
Returns True if keypair exists.
"""
return keyname in [k.id for k in self.compute_client.keypairs.list()]

def list_environments(self):
"""
This method allows to get the list of environments.
Expand Down
161 changes: 1 addition & 160 deletions fuel_health/tests/platform_tests/test_murano.py
@@ -1,5 +1,3 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4

# Copyright 2013 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
Expand All @@ -17,6 +15,7 @@
import logging
from fuel_health import murano


LOG = logging.getLogger(__name__)


Expand Down Expand Up @@ -243,164 +242,6 @@ def test_deploy_aspnet(self):
7, fail_msg, "deleting environment",
self.environment.id)

def test_deploy_iis_farm(self):
"""Check user can deploy IIS Servers Farm in Murano environment
Target component: Murano
Special requirements:
1. Key Pair 'murano-lb-key'
Scenario:
1. Check that Key Pair 'murano-lb-key' exists.
2. Send request to create environment.
3. Send request to create session for environment.
4. Send request to create service IIS farm.
5. Request to deploy session.
6. Checking environment status.
7. Checking deployments status
8. Send request to delete environment.
Duration: 1830 s.
Deployment tags: Murano, Heat
"""

msg = ("Key Pair 'murano-lb-key' does not exist."
" Please, add this key pair manually. ")
if not self.find_keypair('murano-lb-key'):
LOG.debug(msg)
self.fail(msg)

fail_msg = "Can't create environment. Murano API is not available. "
self.environment = self.verify(15, self.create_environment,
2, fail_msg, 'creating environment',
"ost1_test-Murano_env01")

fail_msg = "User can't create session for environment. "
session = self.verify(5, self.create_session,
3, fail_msg, "session creating",
self.environment.id)

creds = {'username': 'Administrator',
'password': 'P@ssw0rd'}
post_body = {"type": "webServerFarm", "domain": "",
"availabilityZone": "nova", "name": "someIISFARM",
"adminPassword": "P@ssw0rd", "loadBalancerPort": 80,
"unitNamingPattern": "",
"osImage":
{"type": "ws-2012-std", "name": str(self.image.name),
"title": "Windows Server 2012 Standard"},
"units": [{}, {}],
"credentials": creds, "flavor": "m1.medium"}

fail_msg = "User can't create service. "
self.verify(5, self.create_service,
4, fail_msg, "service creating",
self.environment.id, session.id, post_body)

fail_msg = "User can't deploy session. "
self.verify(5, self.deploy_session,
5, fail_msg,
"sending session on deployment",
self.environment.id, session.id)

fail_msg = ("Deployment was not completed correctly, "
"please check that Key Pair 'murano-lb-key' exists. ")
self.verify(1800, self.deploy_check,
6, fail_msg, 'deployment is going',
self.environment.id)

self.verify(5, self.deployments_status_check,
7, fail_msg,
'Check deployments status',
self.environment.id)

fail_msg = "Can't delete environment. "
self.verify(5, self.delete_environment,
8, fail_msg, "deleting environment",
self.environment.id)

def test_deploy_aspnet_farm(self):
"""Check deployment of ASP.NET Servers Farm in Murano environment
Target component: Murano
Special requirements:
1. Key Pair 'murano-lb-key'
2. Internet access for virtual machines in OpenStack
Scenario:
1. Check that Key Pair 'murano-lb-key' exists.
2. Send request to create environment.
3. Send request to create session for environment.
4. Send request to create service ASPNet farm.
5. Request to deploy session.
6. Checking environment status.
7. Checking deployments status
8. Send request to delete environment.
Duration: 1830 s.
Deployment tags: Murano, Heat
"""

msg = ("Key Pair 'murano-lb-key' does not exist."
" Please, add this key pair manually. ")
if not self.find_keypair('murano-lb-key'):
LOG.debug(msg)
self.fail(msg)

fail_msg = "Can't create environment. Murano API is not available. "
self.environment = self.verify(15, self.create_environment,
2, fail_msg, 'creating environment',
"ost1_test-Murano_env01")

fail_msg = "User can't create session for environment. "
session = self.verify(5, self.create_session,
3, fail_msg, "session creating",
self.environment.id)

creds = {'username': 'Administrator',
'password': 'P@ssw0rd'}
asp_repository = "git://github.com/Mirantis/murano-mvc-demo.git"
post_body = {"type": "aspNetAppFarm", "domain": "",
"availabilityZone": "nova", "name": "SomeApsFarm",
"repository": asp_repository,
"adminPassword": "P@ssw0rd", "loadBalancerPort": 80,
"unitNamingPattern": "",
"osImage":
{"type": "ws-2012-std", "name": str(self.image.name),
"title": "Windows Server 2012 Standard"},
"units": [{}, {}],
"credentials": creds, "flavor": "m1.medium"}

fail_msg = "User can't create service. "
self.verify(5, self.create_service,
4, fail_msg, "service creating",
self.environment.id, session.id, post_body)

fail_msg = "User can't deploy session. "
self.verify(5, self.deploy_session,
5, fail_msg,
"sending session on deployment",
self.environment.id, session.id)

fail_msg = ("Deployment was not completed correctly, "
"please check, that Key Pair 'murano-lb-key' exists "
"and virtual machines have Internet access. ")
self.verify(1800, self.deploy_check,
6, fail_msg, 'deployment is going',
self.environment.id)

self.verify(5, self.deployments_status_check,
7, fail_msg,
'Check deployments status',
self.environment.id)

fail_msg = "Can't delete environment. "
self.verify(5, self.delete_environment,
8, fail_msg, "deleting environment",
self.environment.id)

def test_deploy_sql(self):
"""Check that user can deploy SQL in Murano environment
Target component: Murano
Expand Down
26 changes: 8 additions & 18 deletions fuel_health/tests/platform_tests/test_platform_murano_linux.py
@@ -1,5 +1,3 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4

# Copyright 2013 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
Expand All @@ -17,6 +15,7 @@
import logging
from fuel_health import murano


LOG = logging.getLogger(__name__)


Expand Down Expand Up @@ -72,7 +71,7 @@ def test_deploy_demo_service(self):
post_body = {"availabilityZone": "nova", "name": "demo",
"unitNamingPattern": "host", "osImage":
{"type": "cirros.demo", "name": str(demo_image.name),
"title": "Demo"}, "units": [{}], "flavor": "m1.small",
"title": "Demo"}, "units": [{}], "flavor": "m1.tiny",
"configuration": "standalone", "type": "demoService"}

fail_msg = "User can't create service. "
Expand Down Expand Up @@ -107,9 +106,8 @@ class MuranoDeployLinuxServicesTests(murano.MuranoTest):
TestClass contains verifications of full Murano functionality.
Special requirements:
1. Murano component should be installed.
2. Key Pair 'murano-lb-key'.
3. Internet access for virtual machines in OpenStack.
4. Linux image with Murano metadata should be imported.
2. Internet access for virtual machines in OpenStack.
3. Linux image with Murano metadata should be imported.
"""

def setUp(self):
Expand All @@ -124,12 +122,6 @@ def setUp(self):
LOG.debug(msg)
self.fail(msg)

msg = ("Key Pair 'murano-lb-key' does not exist."
" Please, add this key pair manually. ")
if not self.find_keypair('murano-lb-key'):
LOG.debug(msg)
self.fail(msg)

def test_deploy_telnet_service(self):
"""Check that user can deploy Telnet service in Murano environment
Target component: Murano
Expand All @@ -143,7 +135,7 @@ def test_deploy_telnet_service(self):
6. Checking deployments status
7. Send request to delete environment.
Duration: 320 s.
Duration: 920 s.
Deployment tags: Murano, Heat
"""
Expand All @@ -159,8 +151,7 @@ def test_deploy_telnet_service(self):
self.environment.id)

post_body = {"availabilityZone": "nova", "name": "LinuxTelnet",
"deployTelnet": True, "unitNamingPattern": "telnet",
"keyPair": "murano-lb-key", "osImage":
"deployTelnet": True, "keyPair": "", "osImage":
{"type": "linux", "name": str(self.image.name),
"title": "Linux Image"}, "units": [{}],
"flavor": "m1.small", "type": "linuxTelnetService"}
Expand Down Expand Up @@ -204,7 +195,7 @@ def test_deploy_apache_service(self):
6. Checking deployments status
7. Send request to delete environment.
Duration: 320 s.
Duration: 920 s.
Deployment tags: Murano, Heat
"""
Expand All @@ -220,8 +211,7 @@ def test_deploy_apache_service(self):
self.environment.id)

post_body = {"availabilityZone": "nova", "name": "LinuxApache",
"deployApachePHP": True, "unitNamingPattern": "test-host",
"keyPair": "murano-lb-key", "instanceCount": [{}], "osImage":
"deployApachePHP": True, "keyPair": "", "osImage":
{"type": "linux", "name": str(self.image.name),
"title": "Linux Image"}, "units": [{}],
"flavor": "m1.small", "type": "linuxApacheService"}
Expand Down

0 comments on commit 6816570

Please sign in to comment.