Add ceph-osd test (#193)
This commit is contained in:
committed by
Frode Nordahl
parent
7f09c33b44
commit
41952b1f74
@@ -12,4 +12,4 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
"""Collection of code for setting up and testing ceph-osd."""
|
||||
"""Collection of code for setting up and testing ceph."""
|
||||
|
||||
15
zaza/charm_tests/ceph/osd/__init__.py
Normal file
15
zaza/charm_tests/ceph/osd/__init__.py
Normal file
@@ -0,0 +1,15 @@
|
||||
# Copyright 2018 Canonical Ltd.
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""Collection of code for setting up and testing ceph-osd."""
|
||||
49
zaza/charm_tests/ceph/osd/tests.py
Normal file
49
zaza/charm_tests/ceph/osd/tests.py
Normal file
@@ -0,0 +1,49 @@
|
||||
# Copyright 2018 Canonical Ltd.
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""Ceph-osd Testing."""
|
||||
|
||||
import logging
|
||||
import unittest
|
||||
|
||||
import zaza.charm_tests.test_utils as test_utils
|
||||
import zaza.model as zaza_model
|
||||
|
||||
|
||||
class SecurityTest(unittest.TestCase):
|
||||
"""Ceph Security Tests."""
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
"""Run class setup for running ceph security tests."""
|
||||
super(SecurityTest, cls).setUpClass()
|
||||
|
||||
def test_osd_security_checklist(self):
|
||||
"""Verify expected state with security-checklist."""
|
||||
expected_failures = []
|
||||
expected_passes = [
|
||||
'validate-file-ownership',
|
||||
'validate-file-permissions',
|
||||
]
|
||||
|
||||
logging.info('Running `security-checklist` action'
|
||||
' on Ceph OSD leader unit')
|
||||
test_utils.audit_assertions(
|
||||
zaza_model.run_action_on_leader(
|
||||
'ceph-osd',
|
||||
'security-checklist',
|
||||
action_params={}),
|
||||
expected_passes,
|
||||
expected_failures,
|
||||
expected_to_pass=True)
|
||||
@@ -12,7 +12,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
"""Ceph-osd Testing."""
|
||||
"""Ceph Testing."""
|
||||
|
||||
import logging
|
||||
from os import (
|
||||
|
||||
Reference in New Issue
Block a user