Skip to content
This repository has been archived by the owner on Mar 23, 2019. It is now read-only.

Enable validate-config tests and add a new test #883

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open

Enable validate-config tests and add a new test #883

wants to merge 7 commits into from

Commits on Jun 20, 2018

  1. Enable validate-config tests

    pilou- committed Jun 20, 2018
    Configuration menu
    Copy the full SHA
    9e48512 View commit details
    Browse the repository at this point in the history
  2. Fix TypeError exception (Python 3 compatibility)

    Error message:
    ______ TestAnsibleContainerConfig.test_should_also_replace_pwd_in_volumes ______
    
    self = <validate_config.TestAnsibleContainerConfig testMethod=test_should_also_replace_pwd_in_volumes>
    
        def test_should_also_replace_pwd_in_volumes(self):
            # test that ${PWD} gets resolved
            self.config.cli_vars_files = self.vars_files
            self.config.set_env('prod')
            container.ENV = 'conductor'
            container.utils.DataLoader = DataLoader
            container.utils.VariableManager = VariableManager
            container.utils.RoleInclude = RoleInclude
    >       conductor_config = AnsibleContainerConductorConfig(self.config._config)
    
    ansible-container/test/tests/validate_config.py:145:
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
    ansible-container/container/__init__.py:19: in __wrapped__
        return fn(*args, **kwargs)
    ansible-container/container/config.py:357: in __init__
        self._process_defaults()
    ansible-container/container/config.py:390: in _process_defaults
        callback=lambda processed: self._templar.set_available_variables(
    ansible-container/container/config.py:375: in _process_section
        yaml.round_trip_dump(value, buffer)
    [...]
    venv/3.6/lib/python3.6/site-packages/ruamel/yaml/emitter.py:422: in expect_flow_sequence
        self.write_indicator(u' ' * ind + u'[', True, whitespace=True)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
    
    self = <ruamel.yaml.dumper.RoundTripDumper object at 0x7fbda6e59e48>
    indicator = '[', need_whitespace = True, whitespace = True, indention = False
    
        def write_indicator(self, indicator, need_whitespace,
                            whitespace=False, indention=False):
            # type: (Any, Any, bool, bool) -> None
            if self.whitespace or not need_whitespace:
                data = indicator
            else:
                data = u' ' + indicator
            self.whitespace = whitespace
            self.indention = self.indention and indention
            self.column += len(data)
            self.open_ended = False
            if bool(self.encoding):
                data = data.encode(self.encoding)
    >       self.stream.write(data)
    E       TypeError: a bytes-like object is required, not 'str'
    
    venv/3.6/lib/python3.6/site-packages/ruamel/yaml/emitter.py:1059: TypeError
    pilou- committed Jun 20, 2018
    Configuration menu
    Copy the full SHA
    bc16f8d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    11ddabf View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c0369d7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9c1b52c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    bd1c048 View commit details
    Browse the repository at this point in the history
  7. add test for #882

    pilou- committed Jun 20, 2018
    Configuration menu
    Copy the full SHA
    3aba711 View commit details
    Browse the repository at this point in the history