Class DockerLogoutMock
java.lang.Object
net.ssehub.easy.instantiation.core.model.defaultInstantiators.AbstractFileInstantiator
net.ssehub.easy.producer.scenario_tests.mocks.DockerLogoutMock
- All Implemented Interfaces:
net.ssehub.easy.instantiation.core.model.vilTypes.IVilType
public class DockerLogoutMock
extends net.ssehub.easy.instantiation.core.model.defaultInstantiators.AbstractFileInstantiator
Mocks the instantiator to log out from one or multiple registries.
- Author:
- Monika Staciwa
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanLogs out from all known registries.static booleandockerLogout(String registry) Logs out from a registry.static booleansetResult(boolean res) Changes the mocked result for the following calls.Methods inherited from class net.ssehub.easy.instantiation.core.model.defaultInstantiators.AbstractFileInstantiator
determineTargetPath, toString
-
Field Details
-
result
private static boolean result
-
-
Constructor Details
-
DockerLogoutMock
public DockerLogoutMock()
-
-
Method Details
-
dockerLogout
public static boolean dockerLogout() throws net.ssehub.easy.instantiation.core.model.common.VilExceptionLogs out from all known registries.- Returns:
trueif logged out (alwaystrue)- Throws:
net.ssehub.easy.instantiation.core.model.common.VilException- in case of artifact / parameter problems
-
dockerLogout
public static boolean dockerLogout(String registry) throws net.ssehub.easy.instantiation.core.model.common.VilException Logs out from a registry.- Parameters:
registry- the registry address- Returns:
trueif logged out- 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
-