Merge console & console_output tests between v2 and v2.1
Currently v2 and v2.1 have separate functional tests and their corresponding sample files. As v2 and v2.1 are supposed to be identical, there is overhead to maintain two set of functional tests and sample files. We can have one set of tests which can run for both v2 and v2.1. This commit merges console & console_output functional tests. In V2.1 os-access-ip is separate plugin where in v2 it was mixed in server plugin itself. So os-access-ip extension is enabled to run merged functional tests for both v2 and v2.1. Change-Id: I249c10b9b154a374b61092f6fcbe9f3f2bff1dd3
This commit is contained in:
committed by
Ghanshyam Mann
parent
f713c7c7b5
commit
823d4f2ddd
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"os-getConsoleOutput": {
|
||||
"length": 50
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"output": "FAKE CONSOLE OUTPUT\nANOTHER\nLAST LINE"
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"os-getConsoleOutput": {
|
||||
"length": 50
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"output": "FAKE CONSOLE OUTPUT\nANOTHER\nLAST LINE"
|
||||
}
|
||||
@@ -603,19 +603,6 @@ class SchedulerHintsJsonTest(ApiSampleTestBaseV2):
|
||||
self._verify_response('scheduler-hints-post-resp', subs, response, 202)
|
||||
|
||||
|
||||
class ConsoleOutputSampleJsonTest(ServersSampleBase):
|
||||
extension_name = "nova.api.openstack.compute.contrib" + \
|
||||
".console_output.Console_output"
|
||||
|
||||
def test_get_console_output(self):
|
||||
uuid = self._post_server()
|
||||
response = self._do_post('servers/%s/action' % uuid,
|
||||
'console-output-post-req',
|
||||
{'action': 'os-getConsoleOutput'})
|
||||
subs = self._get_regexes()
|
||||
self._verify_response('console-output-post-resp', subs, response, 200)
|
||||
|
||||
|
||||
class ExtendedServerAttributesJsonTest(ServersSampleBase):
|
||||
extension_name = "nova.api.openstack.compute.contrib" + \
|
||||
".extended_server_attributes" + \
|
||||
|
||||
@@ -13,11 +13,27 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
from nova.tests.functional.v3 import test_servers
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('osapi_compute_extension',
|
||||
'nova.api.openstack.compute.extensions')
|
||||
|
||||
|
||||
class ConsoleOutputSampleJsonTest(test_servers.ServersSampleBase):
|
||||
extension_name = "os-console-output"
|
||||
extra_extensions_to_load = ["os-access-ips"]
|
||||
_api_version = 'v2'
|
||||
|
||||
def _get_flags(self):
|
||||
f = super(ConsoleOutputSampleJsonTest, self)._get_flags()
|
||||
f['osapi_compute_extension'] = CONF.osapi_compute_extension[:]
|
||||
f['osapi_compute_extension'].append(
|
||||
'nova.api.openstack.compute.contrib.console_output.'
|
||||
'Console_output')
|
||||
return f
|
||||
|
||||
def test_get_console_output(self):
|
||||
uuid = self._post_server()
|
||||
|
||||
@@ -18,6 +18,8 @@ from nova.tests.functional.v3 import test_servers
|
||||
|
||||
class ConsolesSamplesJsonTest(test_servers.ServersSampleBase):
|
||||
sample_dir = "consoles"
|
||||
extra_extensions_to_load = ["os-access-ips"]
|
||||
_api_version = 'v2'
|
||||
|
||||
def setUp(self):
|
||||
super(ConsolesSamplesJsonTest, self).setUp()
|
||||
|
||||
Reference in New Issue
Block a user