Files
fuel-qa/system_test/tests/ostf_base_actions.py
Artem Grechanichenko a88049c182 Test for pacemaker resources when disk is full
Adding test case for covering filling root situation on primary controller.
 Add health_check_all, health_check_ha to ostf_base_actions.py.
 Move health_check to ostf_base_actions.py

 Closes-Bug: #1500446

Change-Id: I17055527e99c72b790544e7baef997eab20258e0
2015-11-26 10:52:52 +02:00

80 lines
2.8 KiB
Python

# Copyright 2015 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.
from proboscis import SkipTest
from system_test.helpers.decorators import make_snapshot_if_step_fail
from system_test.helpers.decorators import deferred_decorator
from system_test.helpers.decorators import action
from system_test.tests import base_actions_factory
class HealthCheckActions(base_actions_factory.BaseActionsFactory):
"""Basic actions for OSTF tests
health_check - run sanity and smoke OSTF tests
health_check_sanity_smoke_ha - run sanity, smoke and ha OSTF tests
"""
@deferred_decorator([make_snapshot_if_step_fail])
@action
def health_check(self):
"""Run health checker
Skip action if cluster doesn't exist
"""
if self.cluster_id is None:
raise SkipTest(
"The cluster_id is not specified, can not run ostf"
)
self.fuel_web.run_ostf(
cluster_id=self.cluster_id,
should_fail=getattr(self, 'ostf_tests_should_failed', 0),
failed_test_name=getattr(self, 'failed_test_name', None))
@deferred_decorator([make_snapshot_if_step_fail])
@action
def health_check_sanity_smoke_ha(self):
"""Run health checker Sanity, Smoke and HA
Skip action if cluster doesn't exist
"""
if self.cluster_id is None:
raise SkipTest(
"The cluster_id is not specified, can not run ostf"
)
self.fuel_web.run_ostf(
cluster_id=self.cluster_id,
test_sets=['sanity', 'smoke', 'ha'],
should_fail=getattr(self, 'ostf_tests_should_failed', 0),
failed_test_name=getattr(self, 'failed_test_name', None))
@deferred_decorator([make_snapshot_if_step_fail])
@action
def health_check_ha(self):
"""Run health checker HA
Skip action if cluster doesn't exist
"""
if self.cluster_id is None:
raise SkipTest(
"The cluster_id is not specified, can not run ostf"
)
self.fuel_web.run_ostf(
cluster_id=self.cluster_id,
test_sets=['ha'],
should_fail=getattr(self, 'ostf_tests_should_failed', 0),
failed_test_name=getattr(self, 'failed_test_name', None))