porthole/kube_utility_container/tests/utility/ceph/test_ceph_utility_container.py

32 lines
1.3 KiB
Python

# Copyright 2020 AT&T Intellectual Property. All other rights reserved.
#
# 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.
import unittest
from kube_utility_container.tests.utility.base import TestBase
class TestCephUtilityContainer(TestBase):
@classmethod
def setUpClass(cls):
cls.deployment_name = 'ceph-utility'
super(TestCephUtilityContainer, cls).setUpClass()
def test_verify_ceph_is_healthy(self):
"""To verify ceph-utility is healthy"""
exec_cmd = ['utilscli', 'ceph', 'status']
expected = 'HEALTH_OK'
result_set = self.client.exec_cmd(self.deployment_name, exec_cmd)
self.assertIn(
expected, result_set, 'Unexpected value for command: {}, '
'Command Output: {}'.format(exec_cmd, result_set))