This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/data/model/helpers/test/test_build_helper.py
Charlton Austin e6d201e0b0 feat(build runner): added in context, dockerfile_location
this is a new feature meant to allow people to use any file as
  a dockerfile and any folder as a context directory
2017-03-28 13:55:31 -04:00

14 lines
546 B
Python

import pytest
from data.model.helpers.build_helper import _get_config_expand
@pytest.mark.parametrize('org_config,expected', [
(None, {}),
({}, {}),
({'some other key': 'some other value'}, {'some other key': 'some other value'}),
({'context': 'some/context', 'dockerfile_path': 'some/context/with/Dockerfile'},
{'context': 'some/context', 'dockerfile_path': 'some/context/with/Dockerfile', 'subdir': 'some/context'}),
])
def test_super_user_build_endpoints(org_config, expected):
assert _get_config_expand(org_config) == expected