Class DockerPushImageMock

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

public class DockerPushImageMock extends net.ssehub.easy.instantiation.core.model.defaultInstantiators.AbstractFileInstantiator
Mocks the instantiator to push a Docker image to a repository.
Author:
Monika Staciwa
  • Field Summary

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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    dockerPushImage(String imageName, String registry, String repository, String tag)
    Returns the name of a Docker image.
    static boolean
    setResult(boolean res)
    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 boolean result
  • Constructor Details

    • DockerPushImageMock

      public DockerPushImageMock()
  • Method Details

    • dockerPushImage

      public static boolean dockerPushImage(String imageName, String registry, String repository, String tag) throws net.ssehub.easy.instantiation.core.model.common.VilException
      Returns the name of a Docker image.
      Parameters:
      imageName - name of the image, "repository:tag"
      registry - the target registry
      repository - the repository within registry to use
      tag - optional tag, may be empty
      Returns:
      true if removed
      Throws:
      net.ssehub.easy.instantiation.core.model.common.VilException - in case of artifact / parameter problems
    • setResult

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