Merge "Add tests for component registry suite for vCenter" into stable/mitaka
This commit is contained in:
commit
7fcac5584c
|
@ -16,7 +16,8 @@
|
|||
"unit-tests": "gulp unit-tests",
|
||||
"func-tests": "./run_ui_func_tests.sh",
|
||||
"nightly-func-tests": "./run_ui_func_tests.sh static/tests/functional/nightly/*.js",
|
||||
"prepublish": "gulp build"
|
||||
"prepublish": "gulp build",
|
||||
"component-tests": "./run_component_registry_tests.sh"
|
||||
},
|
||||
"dependencies": {
|
||||
"autoprefixer": "5.2.0",
|
||||
|
|
|
@ -0,0 +1,122 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright 2016 Mirantis, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
set -eu
|
||||
|
||||
# Variables for tests
|
||||
export NO_NAILGUN_START=${NO_NAILGUN_START:-0}
|
||||
export TEST_PREFIX=${TEST_PREFIX:-'test_*'}
|
||||
export FUEL_WEB_ROOT=$(readlink -f ${FUEL_WEB_ROOT:-"$(dirname $0)/../fuel-web"})
|
||||
export ARTIFACTS=${ARTIFACTS:-"$(pwd)/test_run/ui_component"}
|
||||
export CONF_PATH="$(pwd)/static/tests/functional/component_registry/plugin_conf"
|
||||
export SCRIPT_PATH="${CONF_PATH}/update_components.sh"
|
||||
export PLUGIN_RPM=${PLUGIN_RPM:-''}
|
||||
if [ -z "${PLUGIN_RPM}" ]; then
|
||||
plugins='https://product-ci.infra.mirantis.net/view/All/job/9.0.build-fuel-plugins'
|
||||
path='lastSuccessfulBuild/artifact/built_plugins/fuel_plugin_example_v4-4.0-4.0.0-1.noarch.rpm'
|
||||
plugin_url=${PLUGIN_URL:-"${plugins}/${path}"}
|
||||
|
||||
export PLUGIN_RPM="${CONF_PATH}/plugin.rpm"
|
||||
wget -O "${PLUGIN_RPM}" "${plugin_url}"
|
||||
fi
|
||||
|
||||
# Variables for nailgun
|
||||
export NAILGUN_PORT=${NAILGUN_PORT:-5544}
|
||||
export NAILGUN_START_MAX_WAIT_TIME=${NAILGUN_START_MAX_WAIT_TIME:-30}
|
||||
export NAILGUN_DB_HOST=${NAILGUN_DB_HOST:-/var/run/postgresql}
|
||||
export NAILGUN_DB=${NAILGUN_DB:-nailgun}
|
||||
export NAILGUN_DB_USER=${NAILGUN_DB_USER:-nailgun}
|
||||
export NAILGUN_DB_USERPW=${NAILGUN_DB_USERPW:-nailgun}
|
||||
export DB_ROOT=${DB_ROOT:-postgres}
|
||||
|
||||
export NAILGUN_ROOT=$FUEL_WEB_ROOT/nailgun
|
||||
export NAILGUN_STATIC=$ARTIFACTS/static
|
||||
export NAILGUN_TEMPLATES=$NAILGUN_STATIC
|
||||
export NAILGUN_CHECK_URL='/api/version'
|
||||
|
||||
mkdir -p "$ARTIFACTS"
|
||||
|
||||
function install_plugin {
|
||||
plugin_rpm=$1
|
||||
|
||||
mkdir -p "${nailgun_plugins_path}"
|
||||
local plugin_dir=$(sudo alien -i "${plugin_rpm}" | grep -oP 'Setting up \K[^ ]*')
|
||||
export PLUGIN_PATH=$(echo ${nailgun_plugins_path}/${plugin_dir//[-_]/\*})
|
||||
|
||||
meta=${PLUGIN_PATH}/metadata.yaml
|
||||
plugin_name=$(grep -oP '^name: \K(.*)' "${meta}")
|
||||
plugin_version=$(grep -oP '^version: \K(.*)' "${meta}")
|
||||
|
||||
sudo sed -i -e "s/fuel_version: \['8.0'\]/fuel_version: \['9.0'\]/" "${meta}"
|
||||
|
||||
fuel --os-username admin --os-password admin plugins \
|
||||
--register "${plugin_name}==${plugin_version//\'/}"
|
||||
}
|
||||
|
||||
function remove_plugin {
|
||||
fuel --os-username admin --os-password admin plugins \
|
||||
--remove "${plugin_name}==${plugin_version//\'/}" 2>/dev/null || \
|
||||
echo "${plugin_name} was removed"
|
||||
}
|
||||
|
||||
function run_component_tests {
|
||||
local GULP='./node_modules/.bin/gulp'
|
||||
local TESTS_DIR='static/tests/functional/component_registry'
|
||||
local TESTS=$TESTS_DIR/${TEST_PREFIX}.js
|
||||
local result=0
|
||||
|
||||
export SERVER_ADDRESS=${SERVER_ADDRESS:-'127.0.0.1'}
|
||||
export SERVER_PORT=${NAILGUN_PORT}
|
||||
export nailgun_plugins_path='/var/www/nailgun/plugins'
|
||||
|
||||
pip install python-fuelclient
|
||||
fuelclient="${VENV}/lib/python2.7/site-packages/fuelclient"
|
||||
sed -i -e "s/if self.auth_required/if True/" "${fuelclient}/client.py"
|
||||
|
||||
if [ "${NO_NAILGUN_START}" -ne 1 ]; then
|
||||
pushd "$FUEL_WEB_ROOT" > /dev/null
|
||||
tox -e stop
|
||||
tox -e cleanup
|
||||
tox -e start
|
||||
popd > /dev/null
|
||||
fi
|
||||
|
||||
${GULP} build --no-sourcemaps --extra-entries=sinon --static-dir="$NAILGUN_STATIC"
|
||||
if [ $? -ne 0 ]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
install_plugin "${PLUGIN_RPM}"
|
||||
|
||||
for test_case in $TESTS; do
|
||||
echo "INFO: Running test case ${test_case}"
|
||||
|
||||
ARTIFACTS=$ARTIFACTS \
|
||||
${GULP} functional-tests --suites="${test_case}" || result=1
|
||||
done
|
||||
|
||||
remove_plugin
|
||||
|
||||
if [ "${NO_NAILGUN_START}" -ne 1 ]; then
|
||||
pushd "$FUEL_WEB_ROOT" > /dev/null
|
||||
tox -e stop
|
||||
popd > /dev/null
|
||||
fi
|
||||
|
||||
return $result
|
||||
}
|
||||
|
||||
run_component_tests
|
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
* Copyright 2016 Mirantis, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License. You may obtain
|
||||
* a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
**/
|
||||
|
||||
define([
|
||||
'intern/dojo/node!lodash',
|
||||
'intern/chai!assert',
|
||||
'intern/dojo/node!child_process',
|
||||
'intern/dojo/node!leadfoot/Command'
|
||||
], function(_, assert, childProcess, Command) {
|
||||
'use strict';
|
||||
|
||||
_.defaults(Command.prototype, {
|
||||
updatePlugin: function(files) {
|
||||
return new this.constructor(this, function() {
|
||||
return this.parent
|
||||
.then(function() {
|
||||
childProcess.exec('/bin/sh ${SCRIPT_PATH} ' + files,
|
||||
function(err) {
|
||||
if (err) return;
|
||||
});
|
||||
})
|
||||
.sleep(250); // wait for plugin update
|
||||
});
|
||||
},
|
||||
newClusterFillName: function(modal) {
|
||||
return new this.constructor(this, function() {
|
||||
return this.parent
|
||||
.waitForCssSelector('.create-cluster', 500)
|
||||
.clickByCssSelector('.create-cluster')
|
||||
.then(function() {
|
||||
modal.waitToOpen();
|
||||
})
|
||||
.waitForCssSelector('input[name=name]', 500)
|
||||
.setInputValue('input[name=name]', 'Temp');
|
||||
});
|
||||
},
|
||||
assertNextButtonEnabled: function() {
|
||||
return new this.constructor(this, function() {
|
||||
return this.parent
|
||||
.assertElementNotExists('button.next-pane-btn.disabled',
|
||||
'Next button is disabled');
|
||||
});
|
||||
},
|
||||
deleteCluster: function(modal) {
|
||||
return new this.constructor(this, function() {
|
||||
return this.parent
|
||||
.clickByCssSelector('button.delete-environment-btn')
|
||||
.then(function() {
|
||||
modal.waitToOpen();
|
||||
})
|
||||
.clickByCssSelector('button.remove-cluster-btn')
|
||||
.then(function() {
|
||||
modal.waitToClose();
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
- name: 'network:neutron:contrail'
|
||||
label: 'Contrail'
|
||||
description: 'Contrail SDN networking'
|
||||
bind: !!pairs
|
||||
- "cluster:net_provider": "neutron"
|
||||
- "cluster:net_segment_type": "tun"
|
||||
compatible:
|
||||
- name: 'hypervisor:kvm'
|
||||
- name: 'hypervisor:qemu'
|
||||
incompatible:
|
||||
- name: 'hypervisor:vmware'
|
||||
description: 'Contrail plugin is not compatible with VMware for now'
|
|
@ -0,0 +1,11 @@
|
|||
- name: 'network:neutron:ml2:dvs'
|
||||
label: 'Neutron with VMware DVS'
|
||||
description: 'Neutron with VMware DVS ML2 plugin'
|
||||
requires:
|
||||
- name: 'network:neutron:core:ml2'
|
||||
- name: 'hypervisor:vmware'
|
||||
message: 'The VMware DVS plugin requires vCenter as the hypervisor option.'
|
||||
compatible:
|
||||
- name: 'hypervisor:*'
|
||||
- name: 'network:neutron:ml2:vlan'
|
||||
- name: 'network:neutron:core:ml2'
|
|
@ -0,0 +1,21 @@
|
|||
- name: "network:neutron:core:nsx"
|
||||
label: "Neutron with NSXv plugin."
|
||||
description: "NSXv plugin for Fuel allows to integrate Mirantis OpenStack with VMware NSXv network virtualization platform."
|
||||
bind: !!pairs
|
||||
- "cluster:net_segment_type": "tun"
|
||||
compatible:
|
||||
- name: "hypervisor:vmware"
|
||||
- name: "hypervisor:qemu"
|
||||
- name: "storage:block:lvm"
|
||||
- name: "storage:image:ceph"
|
||||
- name: "storage:object:ceph"
|
||||
- name: "additional_service:ceilometer"
|
||||
incompatible:
|
||||
- name: "storage:block:ceph"
|
||||
- name: "storage:ephemeral:ceph"
|
||||
- name: "additional_service:sahara"
|
||||
- name: "additional_service:murano"
|
||||
- name: "additional_service:ironic"
|
||||
requires:
|
||||
- name: "hypervisor:vmware"
|
||||
message: "NSXv requires use vCenter."
|
|
@ -0,0 +1,16 @@
|
|||
- name: 'additional_service:smile'
|
||||
label: 'smile'
|
||||
description: 'smile'
|
||||
incompatible:
|
||||
- name: 'network:nova_network'
|
||||
requires:
|
||||
- name: 'hypervisor:vmware'
|
||||
- name: 'network:neutron:ml2:dvs'
|
||||
compatible:
|
||||
- name: 'additional_service:sahara'
|
||||
- name: 'network:neutron:ml2:dvs'
|
||||
label: 'dvs'
|
||||
description: 'dvs'
|
||||
|
||||
- name: 'network:nova_network'
|
||||
label: 'Nova network'
|
|
@ -0,0 +1,9 @@
|
|||
- name: 'additional_service:smile'
|
||||
label: 'smile'
|
||||
description: 'smile'
|
||||
incompatible:
|
||||
- name: 'additional_service:ceilometer'
|
||||
requires:
|
||||
- name: 'additional_service:murano'
|
||||
compatible:
|
||||
- name: 'additional_service:sahara'
|
|
@ -0,0 +1,9 @@
|
|||
- name: 'additional_service:smile'
|
||||
label: 'smile'
|
||||
description: 'smile'
|
||||
incompatible:
|
||||
- name: 'additional_service:ironic'
|
||||
requires:
|
||||
- name: 'additional_service:sahara'
|
||||
compatible:
|
||||
- name: 'additional_service:murano'
|
|
@ -0,0 +1,12 @@
|
|||
- name: 'additional_service:smile'
|
||||
label: 'smile'
|
||||
description: 'smile'
|
||||
incompatible:
|
||||
- name: 'network:neutron:ml2:tun'
|
||||
- name: 'hypervisor:vmware'
|
||||
requires:
|
||||
- name: 'additional_service:sahara'
|
||||
compatible:
|
||||
- name: 'storage:block:ceph'
|
||||
- name: 'network:neutron:ml2:dvs'
|
||||
label: 'DVS network'
|
|
@ -0,0 +1,13 @@
|
|||
- name: 'network:neutron:core:nsx'
|
||||
label: 'Neutron with NSXv plugin.'
|
||||
description: 'NSXv plugin for Fuel allows to integrate Mirantis OpenStack with VMware NSXv network virtualization platform.'
|
||||
bind: !!pairs
|
||||
- 'cluster:net_segment_type': 'tun'
|
||||
compatible:
|
||||
- name: 'hypervisor:vmware'
|
||||
- name: 'hypervisor:kvm'
|
||||
- name: 'hypervisor:qemu'
|
||||
- name: 'storage:block:lvm'
|
||||
requires:
|
||||
- name: 'hypervisor:vmware'
|
||||
message: 'NSXv requires the usage of vCenter.'
|
|
@ -0,0 +1,11 @@
|
|||
- name: 'network:neutron:core:nsx'
|
||||
label: 'Neutron with NSXv plugin.'
|
||||
description: 'NSXv plugin for Fuel allows to integrate Mirantis OpenStack with VMware NSXv network virtualization platform.'
|
||||
bind: !!pairs
|
||||
- 'cluster:net_segment_type': 'tun'
|
||||
compatible:
|
||||
- name: 'hypervisor:vmware'
|
||||
- name: 'storage:block:lvm'
|
||||
requires:
|
||||
- name: 'hypervisor:vmware'
|
||||
message: 'NSXv requires the usage of vCenter.'
|
|
@ -0,0 +1,8 @@
|
|||
- name: 'hypervisor:libvirt:rain'
|
||||
label: 'rain'
|
||||
description: 'rain hypervisor'
|
||||
incompatible:
|
||||
- name: 'hypervisor:xen'
|
||||
- name: 'hypervisor:xen'
|
||||
label: 'xen'
|
||||
description: 'xen hypervisor'
|
|
@ -0,0 +1,9 @@
|
|||
- name: 'hypervisor:libvirt:rain1'
|
||||
label: 'rain'
|
||||
description: 'rain hypervisor'
|
||||
incompatible:
|
||||
- name: 'hypervisor:qemu'
|
||||
- name: 'hypervisor:xen'
|
||||
- name: 'hypervisor:xen'
|
||||
label: 'xen'
|
||||
description: 'xen hypervisor'
|
|
@ -0,0 +1,5 @@
|
|||
- name: 'hypervisor:libvirt:sun'
|
||||
label: 'sun'
|
||||
description: 'sun hypervisor'
|
||||
incompatible:
|
||||
- name: 'hypervisor:qemu'
|
|
@ -0,0 +1,9 @@
|
|||
- name: 'hypervisor:xen'
|
||||
label: 'xen'
|
||||
description: 'hypervisor:xen'
|
||||
requires:
|
||||
- name: 'hypervisor:qemu'
|
||||
incompatible:
|
||||
- name: 'hypervisor:vmware'
|
||||
description: 'xen not compatible with vmware'
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
- name: 'hypervisor:xen'
|
||||
label: 'xen'
|
||||
description: 'xen'
|
||||
requires:
|
||||
- name: 'additional_service:murano'
|
||||
compatible:
|
||||
- name: 'additional_service:ceilometer'
|
||||
incompatible:
|
||||
- name: 'hypervisor:test:*'
|
||||
|
||||
- name: 'hypervisor:test:sun'
|
||||
label: 'sun'
|
||||
- name: 'hypervisor:test:rain'
|
||||
label: 'rain'
|
|
@ -0,0 +1,13 @@
|
|||
- name: 'network:neutron:contrail'
|
||||
label: 'Contrail'
|
||||
description: 'Contrail SDN networking'
|
||||
bind: !!pairs
|
||||
- 'cluster:net_provider': 'neutron'
|
||||
- 'cluster:net_segment_type': 'tun'
|
||||
compatible:
|
||||
- name: 'hypervisor:*'
|
||||
incompatible:
|
||||
- name: 'hypervisor:vmware'
|
||||
description: 'Contrail is not compatible with VMware for now'
|
||||
- name: 'network:neutron:ml2:dvs'
|
||||
description: 'Contrail is not compatible with VMware for now'
|
|
@ -0,0 +1,8 @@
|
|||
- name: 'network:neutron:ml2:dvs'
|
||||
label: 'DVS network'
|
||||
description: 'DVS network type'
|
||||
requires:
|
||||
- name: 'network:neutron:core:ml2'
|
||||
- name: 'hypervisor:vmware'
|
||||
incompatible:
|
||||
- name: 'network:neutron:core:contrail'
|
|
@ -0,0 +1,25 @@
|
|||
- name: 'network:neutron:ml2:dvs'
|
||||
label: 'DVS network'
|
||||
description: 'DVS network type'
|
||||
requires:
|
||||
- name: 'network:neutron:core:ml2'
|
||||
- name: 'hypervisor:vmware'
|
||||
- name: 'network:neutron:ml2:frog'
|
||||
label: 'frog'
|
||||
description: 'frog'
|
||||
incompatible:
|
||||
- name: 'network:neutron:ml2:tun'
|
||||
- name: 'storage:ephemeral:ceph'
|
||||
requires:
|
||||
- name: 'additional_service:sahara'
|
||||
- name: 'network:neutron:core:ml2'
|
||||
compatible:
|
||||
- name: 'network:neutron:ml2:dvs'
|
||||
- name: 'storage:block:ceph'
|
||||
- name: 'hypervisor:libvirt:qemu'
|
||||
- name: 'additional_service:murano'
|
||||
- name: 'hypervisor:xen'
|
||||
label: 'Xen'
|
||||
description: 'Xen hypervisor'
|
||||
incompatible:
|
||||
- name: 'hypervisor:vmware'
|
|
@ -0,0 +1,14 @@
|
|||
- name: 'storage:block:nfs'
|
||||
label: 'nfs'
|
||||
description: 'nfs'
|
||||
incompatible:
|
||||
- name: 'storage:object:sheepdog'
|
||||
message: 'not compatible with sheepdog'
|
||||
- name: 'storage:object:cat'
|
||||
message: 'not compatible with cat'
|
||||
- name: 'storage:object:sheepdog'
|
||||
label: 'sheepdog'
|
||||
description: 'sheepdog'
|
||||
- name: 'storage:object:cat'
|
||||
label: 'cat'
|
||||
description: 'cat'
|
|
@ -0,0 +1,8 @@
|
|||
- name: 'storage:block:zfs'
|
||||
label: 'zfs'
|
||||
description: 'zfs'
|
||||
incompatible:
|
||||
- name: 'storage:image:nfs'
|
||||
- name: 'storage:image:nfs'
|
||||
label: 'nfs'
|
||||
description: 'nfs'
|
|
@ -0,0 +1,5 @@
|
|||
- name: 'storage:image:swift'
|
||||
label: 'swift'
|
||||
description: 'swift'
|
||||
incompatible:
|
||||
- name: 'storage:image:ceph'
|
|
@ -0,0 +1,10 @@
|
|||
- name: 'storage:image:swift'
|
||||
label: 'swift'
|
||||
description: 'swift'
|
||||
incompatible:
|
||||
- name: 'storage:image:ceph'
|
||||
compatible:
|
||||
- name: 'storage:image:cat'
|
||||
- name: 'storage:image:cat'
|
||||
label: 'cat'
|
||||
description: 'cat'
|
|
@ -0,0 +1,5 @@
|
|||
- name: 'storage:object:cat'
|
||||
label: 'Stor ceph'
|
||||
description: 'stor ceph'
|
||||
incompatible:
|
||||
- name: 'storage:block:lvm'
|
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
default=${CONF_PATH}/$1.yaml
|
||||
components_file=${CONF_PATH}/$2.yaml
|
||||
|
||||
sudo sh -c "cat ${components_file} ${default} > ${PLUGIN_PATH}/components.yaml"
|
||||
|
||||
fuel --os-username admin --os-password admin plugins --sync
|
|
@ -0,0 +1,218 @@
|
|||
/*
|
||||
* Copyright 2016 Mirantis, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License. You may obtain
|
||||
* a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
**/
|
||||
|
||||
define([
|
||||
'intern!object',
|
||||
'tests/functional/helpers',
|
||||
'tests/functional/component_registry/component_helpers',
|
||||
'tests/functional/pages/common',
|
||||
'tests/functional/pages/modal'
|
||||
], function(registerSuite, helpers, componentHelpers, Common, Modal) {
|
||||
'use strict';
|
||||
|
||||
registerSuite(function() {
|
||||
var common, modal;
|
||||
|
||||
return {
|
||||
name: 'Additional components',
|
||||
setup: function() {
|
||||
common = new Common(this.remote);
|
||||
modal = new Modal(this.remote);
|
||||
return this.remote
|
||||
.then(function() {
|
||||
return common.getIn();
|
||||
});
|
||||
},
|
||||
afterEach: function() {
|
||||
return this.remote
|
||||
.pressKeys('\uE007') // Create
|
||||
.then(function() {
|
||||
return modal.waitToClose();
|
||||
})
|
||||
|
||||
// Delete created environment
|
||||
.deleteCluster(modal)
|
||||
.catch(function() {
|
||||
modal.close();
|
||||
modal.waitToClose();
|
||||
});
|
||||
},
|
||||
'Test additional, -network, !vmware, !dvs, +Sahara': function() {
|
||||
var smile = 'input[value=additional_service\\:smile]';
|
||||
var ml2 = 'input[value=network\\:neutron\\:core\\:ml2]';
|
||||
var vlan = 'input[value=network\\:neutron\\:ml2\\:vlan]';
|
||||
|
||||
return this.remote
|
||||
.updatePlugin('dvs_default test_addit_smile')
|
||||
.newClusterFillName(modal)
|
||||
|
||||
.pressKeys('\uE007') // go to Compute
|
||||
.clickByCssSelector('input[value=hypervisor\\:vmware]')
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Networking
|
||||
|
||||
//Check that smile is disabled when Nova network is enabled
|
||||
.clickByCssSelector('input[value=network\\:nova_network]')
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Storage
|
||||
.pressKeys('\uE007') // Additional Services
|
||||
.assertElementDisabled(smile, 'Smile checkbox is enabled with Nova network')
|
||||
|
||||
.clickByCssSelector('button.prev-pane-btn') // back to Storage
|
||||
.clickByCssSelector('button.prev-pane-btn') // back to Networking
|
||||
|
||||
// Check that smile is disabled when dvs network is disabled
|
||||
.clickByCssSelector(ml2)
|
||||
.clickByCssSelector(vlan)
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Storage
|
||||
.pressKeys('\uE007') // Additional Services
|
||||
.assertElementDisabled(smile, 'Smile checkbox is enabled without dvs network')
|
||||
|
||||
.clickByCssSelector('button.prev-pane-btn') // back to Storage
|
||||
.clickByCssSelector('button.prev-pane-btn') // back to Networking
|
||||
|
||||
// Create cluster with vCenter + Neutron with ML2 plugin + dvs + Sahara + smile
|
||||
.clickByCssSelector(ml2)
|
||||
.clickByCssSelector(vlan)
|
||||
.clickByCssSelector('input[value=network\\:neutron\\:ml2\\:dvs]')
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Storage
|
||||
.pressKeys('\uE007') // Additional Services
|
||||
.clickByCssSelector('input[value=additional_service\\:sahara]')
|
||||
.clickByCssSelector(smile)
|
||||
.pressKeys('\uE007'); // Finish
|
||||
},
|
||||
'Test additional, -Ceilometer, !Murano, +Sahara': function() {
|
||||
var smile = 'input[value=additional_service\\:smile]';
|
||||
var ceilometer = 'input[value=additional_service\\:ceilometer]';
|
||||
|
||||
return this.remote
|
||||
.updatePlugin('dvs_default test_addit_smile_ceil')
|
||||
.newClusterFillName(modal)
|
||||
|
||||
.pressKeys('\uE007') // go to Compute
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Networking
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Storage
|
||||
.pressKeys('\uE007') // Additional Services
|
||||
|
||||
// Check that smile is disabled when Murano is not enabled (by default)
|
||||
.assertElementDisabled(smile, 'Smile is enabled without Murano')
|
||||
|
||||
// Check that smile is not compatible with Ceilometer
|
||||
.clickByCssSelector('input[value=additional_service\\:murano]') // enable required Murano
|
||||
.clickByCssSelector(ceilometer)
|
||||
.assertElementDisabled(smile, 'Smile is enabled with Ceilometer')
|
||||
.clickByCssSelector(ceilometer) // disable Ceilometer
|
||||
.clickByCssSelector(smile)
|
||||
.assertElementDisabled(ceilometer, 'Ceilometer is enabled with smile')
|
||||
.assertElementsExist('i.tooltip-icon.glyphicon-warning-sign' +
|
||||
'[data-original-title="Not compatible with smile"]', 1,
|
||||
'No warning that Ceilometer is not compatible with smile')
|
||||
|
||||
// Create cluster with smile + murano
|
||||
.pressKeys('\uE007'); // Finish
|
||||
},
|
||||
'Test additional, -Ironic, !Sahara, +Murano': function() {
|
||||
var smile = 'input[value=additional_service\\:smile]';
|
||||
var ironic = 'input[value=additional_service\\:ironic]';
|
||||
|
||||
return this.remote
|
||||
.updatePlugin('dvs_default test_addit_smile_ironic')
|
||||
.newClusterFillName(modal)
|
||||
|
||||
.pressKeys('\uE007') // go to Compute
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Networking
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Storage
|
||||
.pressKeys('\uE007') // Additional Services
|
||||
|
||||
// Check that smile is disabled when Sahara is not enabled (by default)
|
||||
.assertElementDisabled(smile, 'Smile is enabled without Sahara')
|
||||
|
||||
// Check that smile is not compatible with Ironic
|
||||
.clickByCssSelector('input[value=additional_service\\:sahara]') // enable required Sahara
|
||||
.clickByCssSelector(ironic)
|
||||
.assertElementDisabled(smile, 'Smile is enabled with Ironic')
|
||||
.clickByCssSelector(ironic) // disable Ironic
|
||||
.clickByCssSelector(smile)
|
||||
.assertElementDisabled(ironic, 'Ironic is enabled with smile')
|
||||
.assertElementExists('i.tooltip-icon.glyphicon-warning-sign' +
|
||||
'[data-original-title="Not compatible with smile"]',
|
||||
1, 'No warning that Ironic is incompatible with smile')
|
||||
|
||||
// Create cluster with smile + Sahara
|
||||
.pressKeys('\uE007'); // Finish
|
||||
},
|
||||
'Test additional, -ml2:tun, -vmware, !Sahara, +block:ceph': function() {
|
||||
var smile = 'input[value=additional_service\\:smile]';
|
||||
var vmware = 'input[value=hypervisor\\:vmware]';
|
||||
var vlan = 'input[value=network\\:neutron\\:ml2\\:vlan]';
|
||||
var tun = 'input[value=network\\:neutron\\:ml2\\:tun]';
|
||||
var sahara = 'input[value=additional_service\\:sahara]';
|
||||
|
||||
return this.remote
|
||||
.updatePlugin('dvs_default test_addit_smile_sahara')
|
||||
.newClusterFillName(modal)
|
||||
|
||||
.pressKeys('\uE007') // go to Compute
|
||||
|
||||
// Check that smile is disabled when vCenter is enabled
|
||||
.clickByCssSelector(vmware)
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Networking
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Storage
|
||||
.pressKeys('\uE007') // Additional Services
|
||||
.clickByCssSelector(sahara)
|
||||
.assertElementDisabled(smile, 'Smile checkbox is enabled with vCenter')
|
||||
|
||||
.clickByCssSelector('button.prev-pane-btn') // back to Storage
|
||||
.clickByCssSelector('button.prev-pane-btn') // back to Networking
|
||||
.clickByCssSelector('button.prev-pane-btn') // back to Compute
|
||||
.clickByCssSelector(vmware)
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Networking
|
||||
|
||||
// Check that smile is disabled when Neutron with tunneling segmentation is enabled
|
||||
.clickByCssSelector(vlan)
|
||||
.clickByCssSelector(tun)
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Storage
|
||||
.pressKeys('\uE007') // Additional Services
|
||||
.clickByCssSelector(sahara)
|
||||
.assertElementDisabled(smile, 'Smile checkbox is enabled with tunneling segmentation')
|
||||
|
||||
.clickByCssSelector('button.prev-pane-btn') // back to Storage
|
||||
.clickByCssSelector('button.prev-pane-btn') // back to Networking
|
||||
|
||||
// Create cluster with VLAN + Ceph Block Storage + Sahara + smile
|
||||
.clickByCssSelector(tun)
|
||||
.clickByCssSelector(vlan)
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Storage
|
||||
.clickByCssSelector('input[value=storage\\:block\\:ceph]')
|
||||
.pressKeys('\uE007') // Additional Services
|
||||
.clickByCssSelector(sahara)
|
||||
.clickByCssSelector(smile)
|
||||
.pressKeys('\uE007'); // Finish
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
|
@ -0,0 +1,261 @@
|
|||
/*
|
||||
* Copyright 2016 Mirantis, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License. You may obtain
|
||||
* a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
**/
|
||||
|
||||
define([
|
||||
'intern!object',
|
||||
'tests/functional/helpers',
|
||||
'tests/functional/component_registry/component_helpers',
|
||||
'tests/functional/pages/common',
|
||||
'tests/functional/pages/modal'
|
||||
], function(registerSuite, helpers, componentHelpers, Common, Modal) {
|
||||
'use strict';
|
||||
|
||||
registerSuite(function() {
|
||||
var common, modal;
|
||||
|
||||
return {
|
||||
name: 'Hypervisors',
|
||||
setup: function() {
|
||||
common = new Common(this.remote);
|
||||
modal = new Modal(this.remote);
|
||||
return this.remote
|
||||
.then(function() {
|
||||
return common.getIn();
|
||||
});
|
||||
},
|
||||
afterEach: function() {
|
||||
return this.remote
|
||||
.then(function() {
|
||||
modal.close();
|
||||
})
|
||||
.then(function() {
|
||||
modal.waitToClose();
|
||||
})
|
||||
.catch(function() {});
|
||||
},
|
||||
'Test description of components in wizard with qemu': function() {
|
||||
return this.remote
|
||||
.updatePlugin('dvs_default test_hyperv_green_light_1')
|
||||
.newClusterFillName(modal)
|
||||
|
||||
.pressKeys('\uE007') // go to Compute
|
||||
.clickByCssSelector('input[value=hypervisor\\:vmware]') // Enable vcenter
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Networking
|
||||
|
||||
// Select Neutron with NSXv plugin and check that it has green light
|
||||
.clickByCssSelector('input[value=network\\:neutron\\:core\\:nsx]')
|
||||
.assertElementsExist('i.tooltip-icon.glyphicon-ok-sign[data-original-title=' +
|
||||
'"The component was tested with all the selected components"]',
|
||||
2, 'Neutron with NSXv plugin has no green light');
|
||||
},
|
||||
'Test description of components in wizard without qemu': function() {
|
||||
return this.remote
|
||||
.updatePlugin('dvs_default test_hyperv_green_light_2')
|
||||
.newClusterFillName(modal)
|
||||
|
||||
.pressKeys('\uE007') // go to Compute
|
||||
.clickByCssSelector('input[value=hypervisor\\:vmware]') // enable vCenter
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Networking
|
||||
|
||||
// Select Neutron with NSXv plugin and check that it has green light
|
||||
.clickByCssSelector('input[value=network\\:neutron\\:core\\:nsx]')
|
||||
.assertElementsExist('i.tooltip-icon.glyphicon-info-sign[data-original-title=' +
|
||||
'"This component was not tested with the following ' +
|
||||
'components: QEMU-KVM"]', 1,
|
||||
'Neutron with NSXv plugin has green light with QEMU-KVM');
|
||||
},
|
||||
'Test hypervisor:libvirt, -xen': function() {
|
||||
var rain = 'input[name=hypervisor\\:libvirt\\:rain]';
|
||||
var xen = 'input[name=hypervisor\\:xen]';
|
||||
|
||||
return this.remote
|
||||
.updatePlugin('dvs_default test_hyperv_rain')
|
||||
.newClusterFillName(modal)
|
||||
|
||||
.pressKeys('\uE007') // go to Compute
|
||||
|
||||
// Enable xen, check that rain is disabled
|
||||
.clickByCssSelector(xen)
|
||||
.assertElementDisabled(rain, 'Rain checkbox is enabled with xen')
|
||||
|
||||
// Disable xen, enable rain, check that xen is disabled
|
||||
.clickByCssSelector(xen)
|
||||
.clickByCssSelector(rain)
|
||||
.assertElementDisabled(xen, 'Xen checkbox is enabled with rain')
|
||||
|
||||
// Create cluster with rain hypervisor
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Networking
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Storage
|
||||
.pressKeys('\uE007') // Additional Services
|
||||
.pressKeys('\uE007') // Finish
|
||||
.pressKeys('\uE007') // Create
|
||||
.then(function() {
|
||||
return modal.waitToClose();
|
||||
})
|
||||
|
||||
// Delete created environment
|
||||
.deleteCluster(modal);
|
||||
},
|
||||
'Test hypervisor:libvirt, -qemu, -xen': function() {
|
||||
return this.remote
|
||||
.updatePlugin('dvs_default test_hyperv_rain1')
|
||||
.newClusterFillName(modal)
|
||||
|
||||
.pressKeys('\uE007') // go to Compute
|
||||
|
||||
// Check that rain and xen hypervisors are displayed as checkboxes
|
||||
.assertElementExists('input[name=hypervisor\\:xen][type="checkbox"]',
|
||||
'Xen is not displayed as a checkbox')
|
||||
.assertElementExists('input[name=hypervisor\\:libvirt\\:rain1][type="checkbox"]',
|
||||
'Rain is not displayed as a checkbox');
|
||||
},
|
||||
'Test hypervisor:libvirt, -qemu': function() {
|
||||
var sun = 'input[value=hypervisor\\:libvirt\\:sun]';
|
||||
var qemu = 'input[value=hypervisor\\:qemu]';
|
||||
|
||||
return this.remote
|
||||
.updatePlugin('dvs_default test_hyperv_sun')
|
||||
.newClusterFillName(modal)
|
||||
|
||||
.pressKeys('\uE007') // go to Compute
|
||||
|
||||
// Check that sun hypervisor is disabled when qemu is enabled (by default)
|
||||
.assertElementDisabled(sun, 'Sun checkbox is enabled with qemu')
|
||||
|
||||
// Disable qemu, enable sun and check that qemu is disabled
|
||||
.clickByCssSelector(qemu)
|
||||
.clickByCssSelector(sun)
|
||||
.assertElementDisabled(qemu, 'Qemu checkbox is enabled with sun')
|
||||
|
||||
// Create cluster with sun hypervisor
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Networking
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Storage
|
||||
.pressKeys('\uE007') // Additional Services
|
||||
.pressKeys('\uE007') // Finish
|
||||
.pressKeys('\uE007') // Create
|
||||
.then(function() {
|
||||
return modal.waitToClose();
|
||||
})
|
||||
|
||||
// Delete created environment
|
||||
.deleteCluster(modal);
|
||||
},
|
||||
'Test hypervisor, -vmware, !qemu': function() {
|
||||
var vmware = 'input[name=hypervisor\\:vmware]';
|
||||
var xen = 'input[name=hypervisor\\:xen]';
|
||||
|
||||
return this.remote
|
||||
.updatePlugin('dvs_default test_hyperv_xen')
|
||||
.newClusterFillName(modal)
|
||||
|
||||
.pressKeys('\uE007') // go to Compute
|
||||
|
||||
// Enable vCenter and check that xen is disabled
|
||||
.clickByCssSelector(vmware)
|
||||
.assertElementDisabled(xen, 'Xen checkbox is enabled with vCenter')
|
||||
|
||||
// Disable vCenter, enable xen and check that vCenter is disabled
|
||||
.clickByCssSelector(vmware)
|
||||
.clickByCssSelector(xen)
|
||||
.assertElementDisabled(vmware, 'vCenter checkbox is enabled with xen')
|
||||
|
||||
// Create cluster with xen hypervisor
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Networking
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Storage
|
||||
.pressKeys('\uE007') // Additional Services
|
||||
.pressKeys('\uE007') // Finish
|
||||
.pressKeys('\uE007') // Create
|
||||
.then(function() {
|
||||
return modal.waitToClose();
|
||||
})
|
||||
|
||||
// Delete created environment
|
||||
.deleteCluster(modal);
|
||||
},
|
||||
'Test hypervisor, -hyperv*, !Murano, +Ceilometer': function() {
|
||||
var sun = 'input[value=hypervisor\\:test\\:sun]';
|
||||
var rain = 'input[value=hypervisor\\:test\\:rain]';
|
||||
var xen = 'input[value=hypervisor\\:xen]';
|
||||
|
||||
return this.remote
|
||||
.updatePlugin('dvs_default test_hyperv_xen_sun')
|
||||
.newClusterFillName(modal)
|
||||
|
||||
.pressKeys('\uE007') // go to Compute
|
||||
|
||||
// Check that xen is not compatible with sun and rain hypervisors
|
||||
.clickByCssSelector(sun)
|
||||
.assertElementDisabled(xen, 'Xen checkbox is enabled with sun')
|
||||
.clickByCssSelector(rain)
|
||||
.assertElementDisabled(xen, 'Xen checkbox is enabled with sun + rain')
|
||||
.clickByCssSelector(sun)
|
||||
.assertElementDisabled(xen, 'Xen checkbox is enabled with rain')
|
||||
.clickByCssSelector(rain)
|
||||
|
||||
.clickByCssSelector(xen)
|
||||
.assertElementDisabled(sun, 'Sun checkbox is enabled with xen')
|
||||
.assertElementDisabled(rain, 'Rain checkbox is enabled with xen')
|
||||
|
||||
// Try to create cluster with xen without Murano
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Networking
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Storage
|
||||
.pressKeys('\uE007') // Additional Services
|
||||
.pressKeys('\uE007') // Finish
|
||||
.pressKeys('\uE007') // Create
|
||||
.then(function() {
|
||||
return modal.waitToClose();
|
||||
})
|
||||
.assertElementTextEquals('div.text-error', 'Requires [u\'additional_service:murano\'] ' +
|
||||
'for \'hypervisor:xen\' components were not satisfied.',
|
||||
'Error was not displayed');
|
||||
},
|
||||
'Test create cluster with xen + Murano + Ceilometer': function() {
|
||||
return this.remote
|
||||
.updatePlugin('dvs_default test_hyperv_xen_sun')
|
||||
.newClusterFillName(modal)
|
||||
|
||||
// Create cluster with xen + Murano + Ceilometer
|
||||
.pressKeys('\uE007') // go to Compute
|
||||
.clickByCssSelector('input[value=hypervisor\\:xen]')
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Networking
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Storage
|
||||
.pressKeys('\uE007') // Additional Services
|
||||
.clickByCssSelector('input[value=additional_service\\:murano]')
|
||||
.clickByCssSelector('input[value=additional_service\\:ceilometer]')
|
||||
.pressKeys('\uE007') // Finish
|
||||
.pressKeys('\uE007') // Create
|
||||
.then(function() {
|
||||
return modal.waitToClose();
|
||||
})
|
||||
|
||||
// Delete created environment
|
||||
.deleteCluster(modal);
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
|
@ -0,0 +1,282 @@
|
|||
/*
|
||||
* Copyright 2016 Mirantis, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License. You may obtain
|
||||
* a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
**/
|
||||
|
||||
define([
|
||||
'intern!object',
|
||||
'tests/functional/helpers',
|
||||
'tests/functional/component_registry/component_helpers',
|
||||
'tests/functional/pages/common',
|
||||
'tests/functional/pages/modal'
|
||||
], function(registerSuite, helpers, componentHelpers, Common, Modal) {
|
||||
'use strict';
|
||||
|
||||
registerSuite(function() {
|
||||
var common, modal;
|
||||
|
||||
return {
|
||||
name: 'Networking',
|
||||
setup: function() {
|
||||
common = new Common(this.remote);
|
||||
modal = new Modal(this.remote);
|
||||
return this.remote
|
||||
.then(function() {
|
||||
return common.getIn();
|
||||
});
|
||||
},
|
||||
afterEach: function() {
|
||||
return this.remote
|
||||
.then(function() {
|
||||
return modal.close();
|
||||
})
|
||||
.catch(function() {})
|
||||
.then(function() {
|
||||
return modal.waitToClose();
|
||||
});
|
||||
},
|
||||
'Test network, -vmware, -dvs, +hyperv*, bind:tun': function() {
|
||||
var vmware = 'input[name=hypervisor\\:vmware]';
|
||||
var contrail = 'input[value=network\\:neutron\\:contrail]';
|
||||
|
||||
return this.remote
|
||||
.updatePlugin('dvs_default test_network_contr_binded')
|
||||
.newClusterFillName(modal)
|
||||
|
||||
.pressKeys('\uE007') // go to Compute
|
||||
|
||||
// Check that Contrail is disabled when vCenter is enabled
|
||||
.clickByCssSelector(vmware)
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Networking
|
||||
// Go back to Compute and disable vCenter
|
||||
.clickByCssSelector('.prev-pane-btn')
|
||||
.clickByCssSelector(vmware)
|
||||
|
||||
// Create cluster with qemu + Contrail network + ceph + Sahara
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Networking
|
||||
.clickByCssSelector(contrail)
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Storage
|
||||
.clickByCssSelector('input[value=storage\\:block\\:ceph]')
|
||||
.pressKeys('\uE007') // Additional Services
|
||||
.clickByCssSelector('input[value=additional_service\\:sahara]')
|
||||
.pressKeys('\uE007') // Finish
|
||||
.pressKeys('\uE007') // Create
|
||||
.then(function() {
|
||||
return modal.waitToClose();
|
||||
})
|
||||
|
||||
// Check that all network configuration of neutron tun is available in Network tab
|
||||
.clickByCssSelector('a.network.cluster-tab')
|
||||
.assertElementTextEquals('.title .segmentation-type',
|
||||
'(Neutron with tunneling segmentation)',
|
||||
'No tunneling segmentation message')
|
||||
|
||||
// Back to Dashboard and delete created environment
|
||||
.clickByCssSelector('a.dashboard.cluster-tab')
|
||||
.deleteCluster(modal);
|
||||
},
|
||||
'Create cluster with vCenter + dvs network': function() {
|
||||
return this.remote
|
||||
.updatePlugin('dvs_default test_network_contr_binded')
|
||||
.newClusterFillName(modal)
|
||||
|
||||
.pressKeys('\uE007') // go to Compute
|
||||
|
||||
// Create cluster with vCenter + dvs network
|
||||
.clickByCssSelector('input[name=hypervisor\\:vmware]')
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // go to Networking
|
||||
.clickByCssSelector('input[value=network\\:neutron\\:ml2\\:dvs]')
|
||||
|
||||
// Create env with vCenter + nsxv
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Storage
|
||||
.pressKeys('\uE007') // Additional Services
|
||||
.pressKeys('\uE007') // Finish
|
||||
.pressKeys('\uE007') // Create
|
||||
.then(function() {
|
||||
return modal.waitToClose();
|
||||
})
|
||||
|
||||
// Delete created environment
|
||||
.deleteCluster(modal);
|
||||
},
|
||||
'Test that it is not possibility to create cluster with nsx + dvs': function() {
|
||||
return this.remote
|
||||
.updatePlugin('dvs_default nsxv_default')
|
||||
.newClusterFillName(modal)
|
||||
|
||||
.pressKeys('\uE007') // go to Compute
|
||||
.clickByCssSelector('input[name=hypervisor\\:vmware]') // enable vCenter
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Networking
|
||||
|
||||
// Check that there is no possibility to select multiple networks neutron:nsx and
|
||||
// neutron:ml2:dvs (choose nsxv, then ml2 + vlan + dvs)
|
||||
.clickByCssSelector('input[value=network\\:neutron\\:core\\:nsx]')
|
||||
.clickByCssSelector('input[value=network\\:neutron\\:core\\:ml2]')
|
||||
.clickByCssSelector('input[name=network\\:neutron\\:ml2\\:vlan]')
|
||||
.clickByCssSelector('input[name=network\\:neutron\\:ml2\\:dvs]')
|
||||
|
||||
// Create env with vCenter + ml2
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Storage
|
||||
.pressKeys('\uE007') // Additional Services
|
||||
.pressKeys('\uE007') // Finish
|
||||
.pressKeys('\uE007') // Create
|
||||
.then(function() {
|
||||
return modal.waitToClose();
|
||||
})
|
||||
|
||||
// Delete created environment
|
||||
.deleteCluster(modal);
|
||||
},
|
||||
'Create cluster with neutron:nsx': function() {
|
||||
return this.remote
|
||||
.updatePlugin('dvs_default nsxv_default')
|
||||
.newClusterFillName(modal)
|
||||
|
||||
.pressKeys('\uE007') // go to Compute
|
||||
.clickByCssSelector('input[name=hypervisor\\:vmware]') // enable vCenter
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Networking
|
||||
|
||||
// Check that there is no possibility to select multiple networks neutron:nsx and
|
||||
// neutron:ml2:dvs (choose nsxv)
|
||||
.clickByCssSelector('input[value=network\\:neutron\\:core\\:nsx]')
|
||||
|
||||
// Create env with vCenter + nsxv
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Storage
|
||||
.pressKeys('\uE007') // Additional Services
|
||||
.pressKeys('\uE007') // Finish
|
||||
.pressKeys('\uE007') // Create
|
||||
.then(function() {
|
||||
return modal.waitToClose();
|
||||
})
|
||||
|
||||
// Delete created environment
|
||||
.deleteCluster(modal);
|
||||
},
|
||||
'Test network, -contrail, !ml2, !vmware': function() {
|
||||
return this.remote
|
||||
.updatePlugin('contrail_default test_network_ml2')
|
||||
.newClusterFillName(modal)
|
||||
|
||||
.pressKeys('\uE007') // go to Compute
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Networking
|
||||
|
||||
// Check in wizard that network contrail is blocked when dvs network is selected
|
||||
// (choose contrail)
|
||||
.clickByCssSelector('input[value=network\\:neutron\\:contrail]')
|
||||
|
||||
// Create cluster with contrail
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Storage
|
||||
.pressKeys('\uE007') // Additional Services
|
||||
.pressKeys('\uE007') // Finish
|
||||
.pressKeys('\uE007') // Create
|
||||
.then(function() {
|
||||
return modal.waitToClose();
|
||||
})
|
||||
|
||||
// Delete created environment
|
||||
.deleteCluster(modal);
|
||||
},
|
||||
'Test network, -tun, -e:ceph, !Sahara, !ml2, +dvs, +b:ceph, +qemu, +Murano': function() {
|
||||
var vmware = 'input[value=hypervisor\\:vmware]';
|
||||
var xen = 'input[value=hypervisor\\:xen]';
|
||||
var vlan = 'input[value=network\\:neutron\\:ml2\\:vlan]';
|
||||
var tun = 'input[value=network\\:neutron\\:ml2\\:tun]';
|
||||
var frog = 'input[value=network\\:neutron\\:ml2\\:frog]';
|
||||
|
||||
return this.remote
|
||||
.updatePlugin('dvs_default test_network_ml2_frog')
|
||||
.newClusterFillName(modal)
|
||||
|
||||
.pressKeys('\uE007') // go to Compute
|
||||
|
||||
// Check that xen is incompatible with vCenter
|
||||
.clickByCssSelector(vmware)
|
||||
.assertElementDisabled(xen, 'Xen is enabled with vCenter')
|
||||
.clickByCssSelector(vmware)
|
||||
.clickByCssSelector(xen)
|
||||
.assertElementDisabled(vmware, 'vCenter is enabled with xen')
|
||||
.clickByCssSelector(xen)
|
||||
|
||||
// Check that frog is disabled with ml2:tun
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Networking
|
||||
.clickByCssSelector(vlan)
|
||||
.clickByCssSelector(tun)
|
||||
.assertElementDisabled(frog, 'frog is enabled with tun')
|
||||
.clickByCssSelector(tun)
|
||||
.clickByCssSelector(vlan)
|
||||
|
||||
// Create cluster with KVM + vCenter, frog + DVS network, Sahara + Murano
|
||||
.clickByCssSelector('button.prev-pane-btn') // back to Compute
|
||||
.clickByCssSelector(vmware)
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Networking
|
||||
.clickByCssSelector('input[value=network\\:neutron\\:ml2\\:dvs]')
|
||||
.clickByCssSelector(frog)
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Storage
|
||||
.assertElementDisabled('input[value=storage\\:ephemeral\\:ceph]',
|
||||
'Ephemerap Ceph is enabled with frog')
|
||||
.pressKeys('\uE007') // Additional Services
|
||||
.clickByCssSelector('input[value=additional_service\\:sahara]')
|
||||
.clickByCssSelector('input[value=additional_service\\:murano]')
|
||||
.pressKeys('\uE007') // Finish
|
||||
.pressKeys('\uE007') // Create
|
||||
.then(function() {
|
||||
return modal.waitToClose();
|
||||
})
|
||||
|
||||
// Delete created environment
|
||||
.deleteCluster(modal);
|
||||
},
|
||||
'Test create cluster without required Sahara': function() {
|
||||
return this.remote
|
||||
.updatePlugin('dvs_default test_network_ml2_frog')
|
||||
.newClusterFillName(modal)
|
||||
|
||||
.pressKeys('\uE007') // go to Compute
|
||||
|
||||
// Try to create cluster with KVM + vCenter hypervisors, frog + DVS network
|
||||
// without Sahara additional service (should not be created)
|
||||
.clickByCssSelector('input[value=hypervisor\\:vmware]')
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Networking
|
||||
.clickByCssSelector('input[value=network\\:neutron\\:ml2\\:frog]')
|
||||
.clickByCssSelector('input[value=network\\:neutron\\:ml2\\:dvs]')
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Storage
|
||||
.pressKeys('\uE007') // Additional Services
|
||||
.pressKeys('\uE007') // Finish
|
||||
.pressKeys('\uE007') // Create
|
||||
.then(function() {
|
||||
return modal.waitToClose();
|
||||
})
|
||||
.assertElementTextEquals('.text-error', 'Requires [u\'additional_service:sahara\'] for ' +
|
||||
'\'network:neutron:ml2:frog\' components were not satisfied.',
|
||||
'Error was not displayed');
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
|
@ -0,0 +1,210 @@
|
|||
/*
|
||||
* Copyright 2016 Mirantis, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License. You may obtain
|
||||
* a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
**/
|
||||
|
||||
define([
|
||||
'intern!object',
|
||||
'tests/functional/helpers',
|
||||
'tests/functional/component_registry/component_helpers',
|
||||
'tests/functional/pages/common',
|
||||
'tests/functional/pages/modal'
|
||||
], function(registerSuite, helpers, componentHelpers, Common, Modal) {
|
||||
'use strict';
|
||||
|
||||
registerSuite(function() {
|
||||
var common, modal;
|
||||
|
||||
return {
|
||||
name: 'Storage',
|
||||
setup: function() {
|
||||
common = new Common(this.remote);
|
||||
modal = new Modal(this.remote);
|
||||
return this.remote
|
||||
.then(function() {
|
||||
return common.getIn();
|
||||
});
|
||||
},
|
||||
afterEach: function() {
|
||||
return this.remote
|
||||
.then(function() {
|
||||
return modal.close();
|
||||
})
|
||||
.then(function() {
|
||||
return modal.waitToClose();
|
||||
})
|
||||
.catch(function() {});
|
||||
},
|
||||
'Test storage, -object': function() {
|
||||
var nfs = 'input[value=storage\\:block\\:nfs]';
|
||||
var cat = 'input[value=storage\\:object\\:cat]';
|
||||
var sheepdog = 'input[value=storage\\:object\\:sheepdog]';
|
||||
|
||||
return this.remote
|
||||
.updatePlugin('dvs_default test_storage_block_nfs')
|
||||
.newClusterFillName(modal)
|
||||
|
||||
.pressKeys('\uE007') // go to Compute
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Networking
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Storage
|
||||
|
||||
// Check that cat and sheepdog are disabled when nfs is enabled
|
||||
.clickByCssSelector(nfs)
|
||||
.assertElementDisabled(cat, 'Cat checkbox is enabled with nfs')
|
||||
.assertElementDisabled(sheepdog, 'Sheepdog checkbox is enabled with nfs')
|
||||
|
||||
// Check that nfs is disabled when cat and sheepdog are enabled
|
||||
.clickByCssSelector(nfs)
|
||||
.clickByCssSelector(cat)
|
||||
.assertElementDisabled(nfs, 'Nfs checkbox is enabled with cat')
|
||||
.clickByCssSelector(sheepdog)
|
||||
.assertElementDisabled(nfs, 'Nfs checkbox is enabled with sheepdog')
|
||||
.clickByCssSelector(cat)
|
||||
.clickByCssSelector(sheepdog)
|
||||
|
||||
// Create cluster with nfs Block Storage
|
||||
.clickByCssSelector(nfs)
|
||||
.pressKeys('\uE007') // Additional Services
|
||||
.pressKeys('\uE007') // Finish
|
||||
.pressKeys('\uE007') // Create
|
||||
.then(function() {
|
||||
return modal.waitToClose();
|
||||
})
|
||||
|
||||
// Delete created environment
|
||||
.deleteCluster(modal);
|
||||
},
|
||||
'Test storage -storage:image': function() {
|
||||
var nfs = 'input[value=storage\\:image\\:nfs]';
|
||||
var zfs = 'input[value=storage\\:block\\:zfs]';
|
||||
|
||||
return this.remote
|
||||
.updatePlugin('dvs_default test_storage_block_zfs')
|
||||
.newClusterFillName(modal)
|
||||
|
||||
.pressKeys('\uE007') // go to Compute
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Networking
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Storage
|
||||
|
||||
// Check that zfs block storage is disabled when nfs image storage enabled
|
||||
.clickByCssSelector(nfs)
|
||||
.assertElementDisabled(zfs, 'Zfs checkbox is enabled with nfs')
|
||||
|
||||
// Check that nfs image storage is disabled when zfs block storage enabled
|
||||
.clickByCssSelector(nfs) // disable nfs
|
||||
.clickByCssSelector(zfs)
|
||||
.assertElementDisabled(nfs, 'Nfs checkbox is enabled with zfs')
|
||||
|
||||
// Create cluster with zfs
|
||||
.pressKeys('\uE007') // Additional Services
|
||||
.pressKeys('\uE007') // Finish
|
||||
.pressKeys('\uE007') // Create
|
||||
.then(function() {
|
||||
return modal.waitToClose();
|
||||
})
|
||||
|
||||
// Delete created environment
|
||||
.deleteCluster(modal);
|
||||
},
|
||||
'Test storage:image, -image:ceph': function() {
|
||||
var swift = 'input[value=storage\\:image\\:swift]';
|
||||
var ceph = 'input[value=storage\\:image\\:ceph]';
|
||||
|
||||
return this.remote
|
||||
.updatePlugin('dvs_default test_storage_image_swift')
|
||||
.newClusterFillName(modal)
|
||||
|
||||
.pressKeys('\uE007') // go to Compute
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Networking
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Storage
|
||||
|
||||
// Check that Ceph image storage is inactive when swift image storage is
|
||||
// active and vice versa
|
||||
.clickByCssSelector(swift)
|
||||
.assertElementPropertyEquals(ceph, 'checked', false, 'Ceph is enabled with swift')
|
||||
.clickByCssSelector(ceph)
|
||||
.assertElementPropertyEquals(swift, 'checked', false, 'Swift is enabled with ceph');
|
||||
},
|
||||
'Test storage:image, -image:ceph, +storage:image': function() {
|
||||
var ceph = 'input[value=storage\\:image\\:ceph]';
|
||||
var swift = 'input[value=storage\\:image\\:swift]';
|
||||
|
||||
return this.remote
|
||||
.updatePlugin('dvs_default test_storage_image_swift_cat')
|
||||
.newClusterFillName(modal)
|
||||
|
||||
.pressKeys('\uE007') // go to Compute
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Networking
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Storage
|
||||
|
||||
// Check that Ceph image storage is inactive when swift image storage is
|
||||
// active and vice versa
|
||||
.clickByCssSelector('input[value=storage\\:image\\:cat]')
|
||||
.clickByCssSelector(ceph)
|
||||
.assertElementDisabled(swift, 'Swift is enabled with ceph')
|
||||
.clickByCssSelector(ceph) // disable Ceph
|
||||
.clickByCssSelector(swift)
|
||||
.assertElementDisabled(ceph, 'Ceph is enabled with swift')
|
||||
|
||||
// Create cluster with qemu + Neutron vlan + Swift + cat
|
||||
.pressKeys('\uE007') // Additional Services
|
||||
.pressKeys('\uE007') // Finish
|
||||
.pressKeys('\uE007') // Create
|
||||
.then(function() {
|
||||
return modal.waitToClose();
|
||||
})
|
||||
|
||||
// Delete created environment
|
||||
.deleteCluster(modal);
|
||||
},
|
||||
'Test storage:object, -block:lvm': function() {
|
||||
var cat = 'input[value=storage\\:object\\:cat]';
|
||||
|
||||
return this.remote
|
||||
.updatePlugin('dvs_default test_storage_object_cat')
|
||||
.newClusterFillName(modal)
|
||||
|
||||
.pressKeys('\uE007') // go to Compute
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Networking
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Storage
|
||||
|
||||
// Check that cat is disabled when LVM is enabled (by default)
|
||||
.assertElementDisabled(cat, 'cat is enabled with LVM')
|
||||
|
||||
// Create cluster with Ceph block storage + Stor ceph
|
||||
.clickByCssSelector('input[value=storage\\:block\\:ceph]')
|
||||
.clickByCssSelector(cat)
|
||||
.pressKeys('\uE007') // Additional Services
|
||||
.pressKeys('\uE007') // Finish
|
||||
.pressKeys('\uE007') // Create
|
||||
.then(function() {
|
||||
return modal.waitToClose();
|
||||
})
|
||||
|
||||
// Delete created environment
|
||||
.deleteCluster(modal);
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
|
@ -0,0 +1,111 @@
|
|||
/*
|
||||
* Copyright 2016 Mirantis, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License. You may obtain
|
||||
* a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
**/
|
||||
|
||||
define([
|
||||
'intern!object',
|
||||
'tests/functional/helpers',
|
||||
'tests/functional/component_registry/component_helpers',
|
||||
'tests/functional/pages/common',
|
||||
'tests/functional/pages/modal'
|
||||
], function(registerSuite, helpers, componentHelpers, Common, Modal) {
|
||||
'use strict';
|
||||
|
||||
registerSuite(function() {
|
||||
var common, modal;
|
||||
|
||||
return {
|
||||
name: 'UI components',
|
||||
setup: function() {
|
||||
common = new Common(this.remote);
|
||||
modal = new Modal(this.remote);
|
||||
return this.remote
|
||||
.then(function() {
|
||||
return common.getIn();
|
||||
});
|
||||
},
|
||||
'Test that all components, chosen in Wizard tab, are enabled on Setting tab': function() {
|
||||
return this.remote
|
||||
.updatePlugin('dvs_default contrail_default')
|
||||
.newClusterFillName(modal)
|
||||
|
||||
.pressKeys('\uE007') // go to Compute
|
||||
|
||||
// Create cluster with all compatible elements in wizard
|
||||
.clickByCssSelector('input[value=hypervisor\\:vmware]') // vCenter
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Networking
|
||||
.clickByCssSelector('input[value=network\\:neutron\\:ml2\\:dvs]') // VMware DVS
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Storage
|
||||
.clickByCssSelector('input[value=storage\\:image\\:ceph]') // image Ceph
|
||||
.clickByCssSelector('input[value=storage\\:object\\:ceph]') // object Ceph
|
||||
.clickByCssSelector('input[value=storage\\:ephemeral\\:ceph]') // ephemeral Ceph
|
||||
.pressKeys('\uE007') // Additional Services
|
||||
.clickByCssSelector('input[value=additional_service\\:sahara]') // Sahara
|
||||
.clickByCssSelector('input[value=additional_service\\:murano]') // Murano
|
||||
.clickByCssSelector('input[value=additional_service\\:ceilometer]') // Ceilometer
|
||||
.clickByCssSelector('input[value=additional_service\\:ironic]') // Ironic
|
||||
.pressKeys('\uE007') // Finish
|
||||
.pressKeys('\uE007') // Create
|
||||
.then(function() {
|
||||
return modal.waitToClose();
|
||||
})
|
||||
|
||||
// Check that all components, chosen in Wizard tab, are enabled on Setting tab
|
||||
.clickByCssSelector('a.settings.cluster-tab')
|
||||
.clickByCssSelector('a.subtab-link-storage')
|
||||
.assertElementPropertyEquals('input[name=images_ceph]', 'checked', true,
|
||||
'image Ceph is disabled') // image Ceph
|
||||
.assertElementPropertyEquals('input[name=objects_ceph]', 'checked', true,
|
||||
'object Ceph is disabled') // object Ceph
|
||||
.assertElementPropertyEquals('input[name=ephemeral_ceph]', 'checked', true,
|
||||
'ephemeral Ceph is disabled') // ephemeral Ceph
|
||||
.clickByCssSelector('a.subtab-link-openstack_services')
|
||||
.assertElementPropertyEquals('input[name=sahara]', 'checked', true,
|
||||
'Sahara is disabled') // Sahara
|
||||
.assertElementPropertyEquals('input[name=murano]', 'checked', true,
|
||||
'Murano is disabled') // Murano
|
||||
.assertElementPropertyEquals('input[name=ceilometer]', 'checked', true,
|
||||
'Ceilometer is disabled') // Ceilometer
|
||||
.assertElementPropertyEquals('input[name=ironic]', 'checked', true,
|
||||
'Ironic is disabled') // Ironic
|
||||
.assertElementExists('a.vmware.cluster-tab',
|
||||
'VMware tab is not presented') // vCenter
|
||||
|
||||
// Delete created environment
|
||||
.clickByCssSelector('a.dashboard.cluster-tab')
|
||||
.deleteCluster(modal);
|
||||
},
|
||||
'Test that when vcenter is selected as compute, contrail should be turned off': function() {
|
||||
return this.remote
|
||||
.updatePlugin('dvs_default contrail_default')
|
||||
.newClusterFillName(modal)
|
||||
|
||||
.pressKeys('\uE007') // go to Compute
|
||||
|
||||
// Check that contrail is disabled when vCenter is enabled
|
||||
.clickByCssSelector('input[value=hypervisor\\:vmware]')
|
||||
.assertNextButtonEnabled()
|
||||
.pressKeys('\uE007') // Networking
|
||||
.assertElementDisabled('input[value=network\\:neutron\\:contrail]',
|
||||
'Contrail checkbox is enabled with vCenter')
|
||||
.then(function() {
|
||||
return modal.waitToClose();
|
||||
});
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue