Update 'zuul.yaml'

Reviewed-by: Goncharov, Artem <artem.goncharov@t-systems.com>
Co-authored-by: gtema <artem.goncharov@gmail.com>
Co-committed-by: gtema <artem.goncharov@gmail.com>
This commit is contained in:
2023-01-02 18:56:58 +00:00
committed by zuul
parent e0dc83ddc4
commit ba65aca9eb
20 changed files with 240 additions and 310 deletions

View File

@ -28,6 +28,7 @@ def read_data(filename):
with open(filepath, 'r') as fd:
return yaml.safe_load(fd)
def rewrite_data(filename, data):
"""Rewrites data formatting it

View File

@ -15,7 +15,7 @@ import copy
import otc_metadata.data
__all__ = ['Docs']
__all__ = ['Service']
BUILTIN_DATA = otc_metadata.data.read_data('docs.yaml')

View File

@ -40,7 +40,8 @@ class Services(object):
# sort docs list by <service_type>_<title>
self._service_data["documents"] = sorted(
sorted_docs, key=lambda x: f"{x.get('service_type')}{x.get('title')}"
sorted_docs,
key=lambda x: f"{x.get('service_type')}{x.get('title')}"
)
# sort services by <service_type>_<service_title>
self._service_data["services"] = sorted(
@ -183,7 +184,10 @@ class Services(object):
]
if "repositories" in srv and environment:
for repo in srv["repositories"]:
if "environment" in repo and repo["environment"] == environment:
if (
"environment" in repo
and repo["environment"] == environment
):
srv_res["repository"] = repo["repo"]
for doc in self.all_docs:
if (

View File

@ -1,23 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2010-2011 OpenStack Foundation
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
#
# 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.
from unittest import TestCase
class TestCase(TestCase):
"""Test case base class for all unit tests."""

View File

@ -19,10 +19,10 @@ test_otc-metadata
Tests for `otc-metadata` module.
"""
from otc-metadata.tests import base
from unittest import TestCase
class TestOtc-metadata(base.TestCase):
class TestOtcMetadata(TestCase):
def test_something(self):
pass