Class RedisLauncher

java.lang.Object
me.ahoo.cosid.test.container.RedisLauncher

public final class RedisLauncher extends Object
Provides a real Redis for backend contract tests.

Uses cosid.test.redis.uri / COSID_TEST_REDIS_URI (for example redis://localhost:6379) when set, otherwise starts a shared Redis container. Tests should skip when isAvailable() is false.

  • Field Details

  • Method Details

    • isAvailable

      public static boolean isAvailable()
      Whether a Redis can be provided: an explicit URI is set or Docker is available.
      Returns:
      true if getUri() can succeed
    • getUri

      public static String getUri()
      Redis URI in the form redis://host:port.
      Returns:
      redis uri