Example #1
0
def test_manifest_not_available_after_delete():
    registry_state = RegistryState()
    registry_state.dispatch_entries([
        [
            1,
            {
                "type": RegistryActions.MANIFEST_MOUNTED,
                "repository": "alpine",
                "hash": "abcdefgh",
            },
        ],
        [
            1,
            {
                "type": RegistryActions.MANIFEST_INFO,
                "hash": "abcdefgh",
                "content_type": "application/json",
                "dependencies": [],
            },
        ],
        [
            1,
            {
                "type": RegistryActions.MANIFEST_UNMOUNTED,
                "repository": "alpine",
                "hash": "abcdefgh",
            },
        ],
    ])

    assert not registry_state.is_manifest_available("alpine", "abcdefgh")
Example #2
0
def test_manifest_not_available_initially():
    registry_state = RegistryState()
    assert not registry_state.is_manifest_available("alpine", "abcdefgh")