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 -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class net.ssehub.easy.instantiation.core.model.defaultInstantiators.AbstractFileInstantiator
determineTargetPath, toString
-
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 registryrepository- the repository within registry to usetag- optional tag, may be empty- Returns:
trueif 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
-