Class TestRuntime


  • public class TestRuntime
    extends java.lang.Object
    The place to obtain environment-dependent configuration for test of a Vespa deployment.
    Author:
    jvenstad
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.yahoo.config.provision.ApplicationId application()
      Returns the full id of the application this is testing.
      Deployment deploymentToTest()
      Returns the deployment this is testing.
      static TestRuntime get()
      Returns the config and authenticator to use when running integration tests.
      TestRuntime with​(ai.vespa.hosted.api.EndpointAuthenticator authenticator)
      Returns a copy of this runtime, with the given endpoint authenticator.
      com.yahoo.config.provision.zone.ZoneId zone()
      Returns the zone of the deployment this is testing.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • get

        public static TestRuntime get()
        Returns the config and authenticator to use when running integration tests. If the system property "vespa.test.config" is set (to a file path), a file at that location is attempted read, and config parsed from it. Otherwise, config is fetched over HTTP from the hosted Vespa API, assuming the deployment indicated by the optional "environment" and "region" system properties exists. When environment is not specified, it defaults to Environment.dev, while region must be set unless the environment is Environment.dev or Environment.perf.
      • with

        public TestRuntime with​(ai.vespa.hosted.api.EndpointAuthenticator authenticator)
        Returns a copy of this runtime, with the given endpoint authenticator.
      • application

        public com.yahoo.config.provision.ApplicationId application()
        Returns the full id of the application this is testing.
      • zone

        public com.yahoo.config.provision.zone.ZoneId zone()
        Returns the zone of the deployment this is testing.
      • deploymentToTest

        public Deployment deploymentToTest()
        Returns the deployment this is testing.