예제 #1
0
def setup_module(module):
    global PRIV_BUILD_IMAGE, DH_BUILD_IMAGE
    PRIV_BUILD_IMAGE = uuid_value()
    DH_BUILD_IMAGE = uuid_value()
    if MOCK:
        return

    b = BuildImageBuilder(reactor_local_path=reactor_root)
    b.create_image(os.path.join(reactor_root, 'images', 'privileged-builder'),
                   PRIV_BUILD_IMAGE, use_cache=True)

    b2 = BuildImageBuilder(reactor_local_path=reactor_root)
    b2.create_image(os.path.join(reactor_root, 'images', 'dockerhost-builder'),
                    DH_BUILD_IMAGE, use_cache=True)
예제 #2
0
def setup_module(module):
    global PRIV_BUILD_IMAGE, DH_BUILD_IMAGE
    PRIV_BUILD_IMAGE = uuid_value()
    DH_BUILD_IMAGE = uuid_value()
    if MOCK:
        return

    b = BuildImageBuilder(reactor_local_path=reactor_root)
    b.create_image(os.path.join(reactor_root, 'images', 'privileged-builder'),
                   PRIV_BUILD_IMAGE,
                   use_cache=True)

    b2 = BuildImageBuilder(reactor_local_path=reactor_root)
    b2.create_image(os.path.join(reactor_root, 'images', 'dockerhost-builder'),
                    DH_BUILD_IMAGE,
                    use_cache=True)
예제 #3
0
def temp_image_name():
    return ImageName(repo=("atomic-reactor-tests-%s" % uuid_value()))
예제 #4
0
import pytest
import flexmock

from atomic_reactor.buildimage import BuildImageBuilder
from atomic_reactor.core import DockerTasker
from atomic_reactor.plugin import InputPluginsRunner
import atomic_reactor.cli.main
from atomic_reactor.constants import BUILD_JSON_ENV

from tests.util import uuid_value
from tests.constants import LOCALHOST_REGISTRY, DOCKERFILE_GIT, DOCKERFILE_OK_PATH, FILES, MOCK

if MOCK:
    from tests.docker_mock import mock_docker

PRIV_BUILD_IMAGE = uuid_value()
DH_BUILD_IMAGE = uuid_value()

logger = logging.getLogger('atomic_reactor.tests')

if MOCK:
    mock_docker()
dt = DockerTasker()
reactor_root = os.path.dirname(os.path.dirname(__file__))

with_all_sources = pytest.mark.parametrize('source_provider, uri', [
    ('git', DOCKERFILE_GIT),
    ('path', DOCKERFILE_OK_PATH),
])

# TEST-SUITE SETUP
예제 #5
0
def temp_image_name():
    return ImageName(repo=("atomic-reactor-tests-%s" % uuid_value()))