Skip to content

Commit

Permalink
Remove redundant cinder tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MylesJP committed May 29, 2024
1 parent 3af8d41 commit 2ddde43
Showing 1 changed file with 0 additions and 40 deletions.
40 changes: 0 additions & 40 deletions zaza/openstack/charm_tests/cinder/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,46 +305,6 @@ def verify(stdin, stdout, stderr):
'lsblk -sn -o SIZE /dev/vdb',
privkey=privkey, verify=verify)

def test_300_apipaste_includes_audit_section(self):
"""Test api-paste.ini renders audit section when enabled."""
service_name = 'cinder'
api_paste_ini_path = f"/etc/{service_name}/api-paste.ini"
expected_content = [
"[filter:audit]",
"paste.filter_factory = keystonemiddleware.audit:filter_factory",
f"audit_map_file = /etc/{service_name}/api_audit_map.conf",
f"service_name = {service_name}"
]

set_default = {'audit-middleware': False}
set_alternate = {'audit-middleware': True}

with self.config_change(set_default, set_alternate):
try:
api_paste_content = zaza.model.file_contents(
self.lead_unit,
api_paste_ini_path,
)
except Exception as e:
self.fail("Error fetching api-paste.ini: {}".format(str(e)))
for line in expected_content:
self.assertIn(line, api_paste_content)

def test_301_apipaste_excludes_audit_section(self):
"""Test api_paste.ini does not render audit section when disabled."""
service_name = 'cinder'
section_heading = '[filter:audit]'
api_paste_ini_path = f"/etc/{service_name}/api-paste.ini"

try:
api_paste_content = zaza.model.file_contents(
self.lead_unit,
api_paste_ini_path
)
except Exception as e:
self.fail("Error fetching api-paste.ini: {}".format(str(e)))
self.assertNotIn(section_heading, api_paste_content)

@property
def services(self):
"""Return a list services for the selected OpenStack release."""
Expand Down

0 comments on commit 2ddde43

Please sign in to comment.