Class DockerBuildImageMock

java.lang.Object
net.ssehub.easy.instantiation.core.model.defaultInstantiators.AbstractFileInstantiator
net.ssehub.easy.producer.scenario_tests.mocks.DockerBuildImageMock
All Implemented Interfaces:
net.ssehub.easy.instantiation.core.model.vilTypes.IVilType

public class DockerBuildImageMock extends net.ssehub.easy.instantiation.core.model.defaultInstantiators.AbstractFileInstantiator
Mocks the instantiator to build Docker images.
Author:
Monika Staciwa
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    dockerBuildImage(net.ssehub.easy.instantiation.core.model.artifactModel.Path baseDirectory, net.ssehub.easy.instantiation.core.model.artifactModel.Path dockerFile, String name)
    Executes a specific Dockerfile and builds an image.
    static String
    Changes the mocked result for the following calls.

    Methods inherited from class net.ssehub.easy.instantiation.core.model.defaultInstantiators.AbstractFileInstantiator

    determineTargetPath, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • result

      private static String result
  • Constructor Details

    • DockerBuildImageMock

      public DockerBuildImageMock()
  • Method Details

    • dockerBuildImage

      public static String dockerBuildImage(net.ssehub.easy.instantiation.core.model.artifactModel.Path baseDirectory, net.ssehub.easy.instantiation.core.model.artifactModel.Path dockerFile, String name) throws net.ssehub.easy.instantiation.core.model.common.VilException
      Executes a specific Dockerfile and builds an image.
      Parameters:
      baseDirectory - the base directory for the build context
      dockerFile - the docker file for the container to create
      name - name of the image with following schema (repository:tag)
      Returns:
      the container id, may be null/undefined
      Throws:
      net.ssehub.easy.instantiation.core.model.common.VilException - in case of artifact / parameter problems
    • setResult

      public static String setResult(String res)
      Changes the mocked result for the following calls.
      Parameters:
      res - the result values
      Returns:
      the original value before calling this method