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/util/config/provider/test/test_k8sprovider.py
2017-05-23 15:43:21 -04:00

25 lines
706 B
Python

import pytest
from util.config.provider import KubernetesConfigProvider
from test.fixtures import *
class TestKubernetesConfigProvider(KubernetesConfigProvider):
def __init__(self):
self.yaml_filename = 'yaml_filename'
self._service_token = 'service_token'
@pytest.mark.parametrize('directory,filename,expected', [
("directory", "file", "directory_file"),
("directory/dir", "file", "directory/dir_file"),
("directory/dir/", "file", "directory/dir_file"),
("directory", "file/test", "directory_file/test"),
])
def test_get_volume_path(directory, filename, expected):
provider = TestKubernetesConfigProvider()
assert expected == provider.get_volume_path(directory, filename)