Class DockerLoginMock

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

public class DockerLoginMock extends net.ssehub.easy.instantiation.core.model.defaultInstantiators.AbstractFileInstantiator
Mocks the instantiator to log into a docker registry.
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
    dockerLogin(String registry, String user, String password)
    Logs into the given docker 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

    • DockerLoginMock

      public DockerLoginMock()
  • Method Details

    • dockerLogin

      public static boolean dockerLogin(String registry, String user, String password) throws net.ssehub.easy.instantiation.core.model.common.VilException
      Logs into the given docker registry. Stores the authentication configuration if successful and applies it automatically.
      Parameters:
      registry - the registry address
      user - the user name
      password - the password
      Returns:
      true if successful
      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