def test_init_admin_disabled_or_missing(self): ns = NetworkSettings(os.path.join(files_dir, 'network_settings.yaml')) # remove admin, apex section will re-add it ns['networks'].pop('admin', None) assert_raises(NetworkSettingsException, NetworkSettings, ns) # remove admin and apex ns.pop('apex', None) ns['networks'].pop('admin', None) assert_raises(NetworkSettingsException, NetworkSettings, ns)
def test_init_missing_dns_domain(self): ns = NetworkSettings(os.path.join(files_dir, 'network_settings.yaml')) # remove storage ns.pop('dns-domain', None) assert_is_instance(NetworkSettings(ns), NetworkSettings)