Пример #1
0
def registry_model(initialized_db):
    return OCIModel()
Пример #2
0
def oci_model(initialized_db):
    return OCIModel()
Пример #3
0
from image.docker.schema1 import (
    DockerSchema1ManifestBuilder,
    DOCKER_SCHEMA1_CONTENT_TYPES,
    DockerSchema1Manifest,
)
from image.docker.schema2.manifest import DockerSchema2ManifestBuilder
from image.docker.schema2.list import DockerSchema2ManifestListBuilder
from image.oci.manifest import OCIManifestBuilder
from image.oci.index import OCIIndexBuilder
from util.bytes import Bytes

from test.fixtures import *


@pytest.fixture(params=[
    OCIModel(),
])
def registry_model(request, initialized_db):
    return request.param


@pytest.fixture()
def oci_model(initialized_db):
    return OCIModel()


@pytest.mark.parametrize(
    "names, expected",
    [
        (["unknown"], None),
        (["latest"], {"latest"}),
Пример #4
0
from data.registry_model.modelsplitter import SplitModel
from data.model.blob import store_blob_record_and_temp_link
from image.docker.types import ManifestImageLayer
from image.docker.schema1 import (DockerSchema1ManifestBuilder,
                                  DOCKER_SCHEMA1_CONTENT_TYPES,
                                  DockerSchema1Manifest)
from image.docker.schema2.manifest import DockerSchema2ManifestBuilder
from image.docker.schema2.list import DockerSchema2ManifestListBuilder
from util.bytes import Bytes

from test.fixtures import *


@pytest.fixture(params=[
    PreOCIModel(),
    OCIModel(),
    OCIModel(oci_model_only=False),
    SplitModel(0, {'devtable'}, {'buynlarge'}, False),
    SplitModel(1.0, {'devtable'}, {'buynlarge'}, False),
    SplitModel(1.0, {'devtable'}, {'buynlarge'}, True)
])
def registry_model(request, initialized_db):
    return request.param


@pytest.fixture()
def pre_oci_model(initialized_db):
    return PreOCIModel()


@pytest.fixture()
Пример #5
0
from image.docker.schema1 import (
    DockerSchema1ManifestBuilder,
    DOCKER_SCHEMA1_CONTENT_TYPES,
    DockerSchema1Manifest,
)
from image.docker.schema2.manifest import DockerSchema2ManifestBuilder
from image.docker.schema2.list import DockerSchema2ManifestListBuilder
from image.oci.manifest import OCIManifestBuilder
from image.oci.index import OCIIndexBuilder
from util.bytes import Bytes

from test.fixtures import *


@pytest.fixture(
    params=[OCIModel(),]
)
def registry_model(request, initialized_db):
    return request.param


@pytest.fixture()
def oci_model(initialized_db):
    return OCIModel()


@pytest.mark.parametrize(
    "names, expected",
    [
        (["unknown"], None),
        (["latest"], {"latest"}),