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
    Modifier and Type
    Field
    Description
    private static boolean
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    Logs out from all known registries.
    static boolean
    dockerLogout(String registry)
    Logs out from a registry.
    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

    • DockerLogoutMock

      public DockerLogoutMock()
  • Method Details

    • dockerLogout

      public static boolean dockerLogout() throws net.ssehub.easy.instantiation.core.model.common.VilException
      Logs out from all known registries.
      Returns:
      true if logged out (always true)
      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:
      true if 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