def test_annotations_storage_with_prefix():
    storage = AnnotationsProgressStorage(prefix='my-operator.my-company.com')
    assert storage.prefix == 'my-operator.my-company.com'
示例#2
0
def test_key_hashing(prefix, provided_key, expected_key):
    storage = AnnotationsProgressStorage(prefix=prefix)
    returned_key = storage.make_key(provided_key)
    assert returned_key == expected_key
def test_annotations_storage_with_defaults():
    storage = AnnotationsProgressStorage()
    assert storage.prefix == 'kopf.zalando.org'
示例#4
0
def test_annotations_store_deprecates_nonprefixed():
    with pytest.deprecated_call(match=r'Non-prefixed storages are deprecated'):
        storage = AnnotationsProgressStorage(prefix=None)
    assert storage.prefix is None