mirror of
https://github.com/openshift/installer.git
synced 2026-02-05 06:46:36 +01:00
33 lines
1.0 KiB
Python
Executable File
33 lines
1.0 KiB
Python
Executable File
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import unittest
|
|
|
|
import sys
|
|
import glob
|
|
import yaml
|
|
|
|
ASSETS_DIR = ""
|
|
|
|
class UnmanagedLoadBalancer(unittest.TestCase):
|
|
def setUp(self):
|
|
"""Parse the Cluster Infrastructure object into a Python data structure."""
|
|
self.machines = []
|
|
cluster_infra = f'{ASSETS_DIR}/manifests/cluster-infrastructure-02-config.yml'
|
|
with open(cluster_infra) as f:
|
|
self.cluster_infra = yaml.load(f, Loader=yaml.FullLoader)
|
|
|
|
def test_cluster_infra_object(self):
|
|
"""Assert that the Cluster infrastructure object contains the LoadBalancer configuration."""
|
|
self.assertIn("loadBalancer", self.cluster_infra["status"]["platformStatus"]["openstack"])
|
|
|
|
loadBalancer = self.cluster_infra["status"]["platformStatus"]["openstack"]["loadBalancer"]
|
|
|
|
self.assertIn("type", loadBalancer)
|
|
self.assertEqual("UserManaged", loadBalancer["type"])
|
|
|
|
|
|
if __name__ == '__main__':
|
|
ASSETS_DIR = sys.argv.pop()
|
|
unittest.main(verbosity=2)
|