system-config/testinfra/test_bridge.py
Clark Boylan c4461e3d02 Run cloud launcher on bridge.o.o
This formerly ran on puppetmaster.openstack.org but needs to be
transitioned to bridge.openstack.org so that we properly configure new
clouds.

Depends-On: https://review.openstack.org/#/c/598404
Change-Id: I2d1067ef5176ecabb52815752407fa70b64a001b
2018-09-05 13:33:26 -07:00

52 lines
1.5 KiB
Python

# Copyright 2018 Red Hat, 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.
testinfra_hosts = ['bridge.openstack.org']
def test_clouds_yaml(host):
clouds_yaml = host.file('/etc/openstack/clouds.yaml')
assert clouds_yaml.exists
assert b'password' in clouds_yaml.content
all_clouds_yaml = host.file('/etc/openstack/all-clouds.yaml')
assert all_clouds_yaml.exists
assert b'password' in all_clouds_yaml.content
def test_openstacksdk_config(host):
f = host.file('/etc/openstack')
assert f.exists
assert f.is_directory
assert f.user == 'root'
assert f.group == 'root'
assert f.mode == 0o750
del f
f = host.file('/etc/openstack/limestone_cacert.pem')
assert f.exists
assert f.is_file
assert f.user == 'root'
assert f.group == 'root'
assert f.mode == 0o640
def test_cloud_launcher_cron(host):
with host.sudo():
crontab = host.check_output('crontab -l')
assert 'run_cloud_launcher.sh' in crontab